cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1309
Views
15
Helpful
4
Replies

Change INVITE package header with - Conditional SIP Profiles

stillnick
Level 1
Level 1

Hi all.

I have an issue that's been driving me crazy since last week.

 

My SIP provider is sending the INVITE package with wrong sip number as you can see bellow:

Received:
INVITE sip:765617@10.1.222.2:5060 SIP/2.0 (should be 0893540111)
v:SIP/2.0/UDP 27.127.233.78;rport;branch=z9hG4bK7cvF8Zyv4U9yD
Route:<sip:765617@203.54.247.182:50506>
Max-Forwards:65
f:<sip:0477770613@27.127.233.78>;tag=4rDev7jZe34jH
t:<sip:0893540111@sip>
i:9f452181-e17c-1239-eabe-00163ea67143
CSeq:31664763 INVITE

 

I've been trying to apply Conditional SIP Profile to change this header with the TO number listed bellow. (DOC I've been using: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/cube/configuration/cube-book/copy_sip_headers.html )

 

 

I applied all changes listed for incoming calls but nothing happens.

Is that anything missing in this DOC that I need to do? Is that a way I can list the content of the variable u01 so I can make sure I'm getting the right information?

 

Thanks a lot

1 Accepted Solution

Accepted Solutions

stillnick
Level 1
Level 1

Just coming back to post what I did to fix this issue.

 

On incoming dial-peer (dial-peer 9 voip) I changed the following line.

 

voice-class sip profiles 1

TO

voice-class sip profiles 1 incoming

 

I don't know why, but for some reason CUBE wasn't applying my SIP profiles without the "incoming" word at the end. Now it's all working as intended.

 

 

Thanks for everyone that tried to help.

View solution in original post

4 Replies 4

Please post the configuration you have come up with so far for us to verify it.



Response Signature


Vaijanath Sonvane
VIP Alumni
VIP Alumni

Hi,

Below is the SIP Profile that you need to meet your requirements:

voice class sip-profiles 1 
   request INVITE sip-header t copy "sip:(.*)@" u01
   request INVITE sip-header SIP-Req-URI modify ".*@(.*)" "INVITE sip:\u01@\1"

The good think is there is a great Cisco tool available to test SIP profiles without even touching Cisco CUBE Router. Here is the URL:

https://cway.cisco.com/tools/SipProfileTest/ 

This is how this tool works:

Untitled.png

 

The above SIP Profile may solve your issue but the question is, if you want 0893540111 in the INVITE packet then why Service Provider is sending 765617? ? Did you work with them to correct the issue?

 

 

Please rate helpful posts and if applicable mark "Accept as a Solution".
Thanks, Vaijanath S.

stillnick
Level 1
Level 1

Just coming back to post what I did to fix this issue.

 

On incoming dial-peer (dial-peer 9 voip) I changed the following line.

 

voice-class sip profiles 1

TO

voice-class sip profiles 1 incoming

 

I don't know why, but for some reason CUBE wasn't applying my SIP profiles without the "incoming" word at the end. Now it's all working as intended.

 

 

Thanks for everyone that tried to help.

This is because by default a SIP profile is applied in the outbound direction. To make it apply in the inbound direction you’ll need to configure it with the command you used and also enable it in global configuration with this command.

voice service voip
 sip
  sip-profiles inbound


Response Signature