Create callback table for emergency calls

Requirements:
If the To: “Number” = 911 or 933 then
A) Use From: “calling” and From: “calling_sip_host” to lookup geoheader
B) Insert geoheader into SIP Invite
C) Use geolocation field to look up matching record in AEUI table, change extasgn1 to be calling (extension)
D) Replace From: calling to use aeui1 or Insert aeui1 into P-Asserted Identity Field
E) Route call to Bandwidth SBCs - NAP

If extension and or ipaddress is not found, then reject the call with a 4xx response (:call_rejected is 403)

If the To: “Number” is not 911 or 933 then
A) Use To: “number” to look up callbacknum1 to lookup geolocation in AEUI table
If extasgn1 is > than 1 then use extasgn1 as extension & lookup geolocation in the Geolocation Table to find the value of the ipaddress
If extasgn1 is null then use callbacknum1 as extension & lookup geolocation in the Geolocation Table to find value of the ipaddress
C) Use extension & ipaddress to change the To: Header to call extension via direct peer (xbind in case of a hangup)
D) Route call to extension@ipaddress

if the callback number is not found in the temporary table, have another routine that looks up the callback in the aeui_table and pull the default number (to be used as the To:) and use the geolocation value to index to the first matching in the geolocation_table, retrieving the IP address to be used in the To: header or building a NAP on the fly.

Need to clear extasgn1 field after 1 hour (configurable) starting when a field is assigned. This timer is a variable in seconds.

Attachments

Create callback table for emergency calls Attachment
ng911.zip DeleteScript and instructions(4 Kb) Downloaded 6 time