cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2329
Views
0
Helpful
7
Replies

Match 911 calls and modify diversion header

JasunKAR
Level 1
Level 1

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!

2 Accepted Solutions

Accepted Solutions

VON CLAWSON
Level 3
Level 3

You're right. So change the second line to this

request INVITE sip-header sip DIVERSION modify "911@(.*)" "DIVERSION sip:\u01@\1"

Please rate if this helps.

View solution in original post

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.  

View solution in original post

7 Replies 7

VON CLAWSON
Level 3
Level 3

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"

Please rate if this helps.

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.  

VON CLAWSON
Level 3
Level 3

You're right. So change the second line to this

request INVITE sip-header sip DIVERSION modify "911@(.*)" "DIVERSION sip:\u01@\1"

Please rate if this helps.

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

Yes, I believe so.
Please rate if this helps.

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.  

Glad I could help. And glad you got it working.

 

 

 

Please rate if this helps.