03-16-2021 03:07 PM - edited 03-16-2021 03:24 PM
Hello! Struggling with this one challenge.
We use CER to route calls to ATT IPFlex product. They look at diversion headers first to route calls to PSAP. Passing the call through CER inserts a diversion header of "911" into the SIP invite to PSTN as seen here:
Diversion: <sip:911@X.X.X.X>;reason=deflection;privacy=off;screen=yes
When the call leaves the cube it has the CER primary DID as it should in the from field so if PSAP has to call back it would route into CER. My goal is creating a SIP profile on the CUBE to match a 911 invite and copy that FROM field into the Diversion header field and put that profile on the existing outbound to PSTN dial-peer.
Alternatively can I create a new pattern match for 911 and have a dedicated outbound to PSTN dial-peer for 911 and just do a request INVITE sip-header diversion REMOVE to remove it completely on the outbound dial-peer as well? I'd like to see if I can do this with a copy method on an existing peer matching 911 in the TO field in a sip profile though. Just having a hard time determining what that command line is in the SIP profile. Been digging through documents for a few hours now.
Thanks!
Solved! Go to Solution.
03-16-2021 04:07 PM
You're right. So change the second line to this
request INVITE sip-header sip DIVERSION modify "911@(.*)" "DIVERSION sip:\u01@\1"
03-19-2021 08:58 AM
Howdy! Thanks for your help. We had to modify what you posted above slightly to get it to work but you lead me to the right answer. Here is what we ultimately ended up doing:
voice class sip-profiles 20
request INVITE sip-header From copy "sip:(.*)@" u01
request INVITE sip-header Diversion modify "sip:911@(.*)" "sip:\u01@\1"
Worked like a champ. Now calls out to ATT IPFLEX SIP trunks are showing the PSAP the right info.
03-16-2021 03:47 PM
I believe this SIP profile should do the trick. I may have something off here but it looks right to me.
voice class sip-profiles 1
request INVITE sip-header sip FROM copy "sip:(.*)@" u01
request INVITE sip-header sip DIVERSION modify ".*@(.*)" "DIVERSION sip:\u01@\1"
03-16-2021 04:02 PM
Thanks for the reply!
Would that match any call going out? I'm specifically only looking to modify the diversion on calls where the TO: is 911. Like IF this THEN that.
03-16-2021 04:07 PM
You're right. So change the second line to this
request INVITE sip-header sip DIVERSION modify "911@(.*)" "DIVERSION sip:\u01@\1"
03-16-2021 04:08 PM
And this one will insert the FROM: number into the Diversion? Sorry just want to make sure I understand fully. Change control is a beast
03-16-2021 04:40 PM
03-19-2021 08:58 AM
Howdy! Thanks for your help. We had to modify what you posted above slightly to get it to work but you lead me to the right answer. Here is what we ultimately ended up doing:
voice class sip-profiles 20
request INVITE sip-header From copy "sip:(.*)@" u01
request INVITE sip-header Diversion modify "sip:911@(.*)" "sip:\u01@\1"
Worked like a champ. Now calls out to ATT IPFLEX SIP trunks are showing the PSAP the right info.
03-19-2021 11:05 AM
Glad I could help. And glad you got it working.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide