911 CID and routing issue

Hi all,

Running 1.4.22 . When testing 911 functionality I ran into a problem that I don’t know how to solve. I have a trunk coming into one physical location. The BTN registered to the trunk has the address of that location tied to it.

However, I have several other physical locations I want to serve with this trunk. For these locations I have EDID’s from the carrier (Broadvox) which have their particular address registered with the carrier for 911 purposes. 911 calls at the main location work fine. The issue is at the remote locations.

The remote locations have their EMERGENCYCID set properly and asterisk sees this fine. Below is a snip from full with identifying info changed.

[Feb 26 11:45:37] DEBUG[17388] app_macro.c: Executed application: Set
[Feb 26 11:45:37] VERBOSE[17388] logger.c: – Executing [s@macro-outbound-ca llerid:7] Set(“SIP/404-098aaf38”, “EMERGENCYCID=“Company Name” EDID_NUMBER_OF_LOCATION”)
in new stack

EDID#_OF_LOCATION in this case matches the desired DID number not the BTN

Trouble is, this caller ID info is not what is presented to the 911 system. In the trunk configuration, I have fromuser=BTN. When the sip request goes out it looks like this as can be seen from snip of a tcpdump as decoded by wireshark.

Session Initiation Protocol
Request-Line: INVITE sip:911@BROADVOXTRUNKIP SIP/2.0
Method: INVITE
Resent Packet: False
Message Header
Via: SIP/2.0/UDP MYASTERISKIP:5060;branch=z9hG4bK70f91681;rport
From: “Company Name EDID#_OF_LOCATION” sip:MY_BTN@MYASTERISKIP;tag=as22a7e595
SIP Display info: "Company Name EDID#_OF_LOCATION"
SIP from address: sip:MY_BTN@MYASTERISKIP
SIP tag: as22a7e595
To: sip:911@BROADVOXTRUNKIP
SIP to address: sip:911@BROADVOXTRUNKIP
Contact: sip:MY_BTN@MYASTERISKIP
Contact Binding: sip:MY_BTN@MYASTERISKIP
URI: sip:MY_BTN@MYASTERISKIP
SIP contact address: sip:MY_BTN@MYASTERISKIP
Call-ID: 29b7c5d35a709b64620496cf20b01ec6@MYASTERISKIP

The call is routed and presents based upon the Contact info, not the SIP Display info. The Contact Info is AFAIK determined by the fromuser= in the trunk configuration and is thus the same for all calls. If I leave out the fromuser=, then the sip contact info shows as unknown@MYASTERISKIP and then the call gets routed to a National 911 call center which is even worse.

Does anyone know a way to set this value based upon the calling extension? If it can’t be done, I dead in the water…

Thanks.