cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1411
Views
1
Helpful
12
Replies

Modify the SIP SDP field

DuBu
Level 1
Level 1

Hi 

Would like to know if there is a way we could modify the SIP SDP message. Basically we see the wrong IP address in the "o" field of the SDP message because of which the calls are failing. So, is there a way to modify the SDP field to have the correct ip address in the "o" field?

 

 

12 Replies 12

b.winter
VIP
VIP

where do you want to modify it? CUCM, CUBE, ...?
For CUBE: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/cube/configuration/cube-book/voi-sip-param-mod.html this is your CUBE bible, so bookmark it.

If you need more examples, probably there are more than enough in the forum.
Here you can test your sip-profiles: https://cway.cisco.com/tools/SipProfileTest/

Thanks for your response!

 

I am looking for the CUBE...

Basically , i am trying to modify the Originator  header of the SDP  message 

For e.g what we see currently is this 

o=CiscoSystemsSIP-GW-UserAgent 4505 8868 IN IP4  X.X.X.X
I would like to change the Ip address from X.X.X.X to Y.Y.Y.Y.

rule 1 request OPTIONS sdp-header Session-Owner modify "IP4 X.X.X.X" "IP4 Y.Y.Y.Y"

Is this correct?

 

 

 

TechLvr
Spotlight
Spotlight

@DuBu You can achieve that using sip profiles on your CUBE router. The sample sip profile below changes the IP address in the "o" field from "10.10.10.10“ to "192.168.0.10". 

voice class sip-profiles 10
request INVITE sdp-header Session-Owner modify "10.10.10.10“ "192.168.0.10"

You need to create the above SIP profile on your CUBE router with the relevant IP addresses, and then associate that profile to the outgoing dial peer facing the destination where you are routing the call. See example below on how to associate a sip profile with a dial peer. 

dial-peer voice 10 voip
voice-class sip profiles 10

 

Hi

Here is what i did 

voice class sip-profiles 10
 rule 1 request ANY sdp-header Session-Owner modify  "10.10.10.10“ "192.168.0.10"

Applied this to the Dial Peer but still when i check the debugs the "o" field has the wrong ip address..

Any suggestions?

 

Do you want it to be applied in the inbound direction or in the outbound direction.
Per default, SIP-profiles are applied in the outbound directions (outgoing SIP messages).

If you want them for inbound, you have to configure "voice service voip --> sip --> sip-profiles inbound" and then use the keyword "inbound" when applying the sip-profile to a dial-peer.

Are there any specific reasons for why you did not follow the suggestion made by @TechLvr ? What you outlined as what you did is similar, but not exactly the same as what was suggested for you. It’s obviously okay to make changes as long as you’re sure that what you’re putting in would yield the same end result.

To check what happens with a SIP profile you can use debug voip translation.



Response Signature


Hi Roger

I had tried what @TechLvr has suggested as well. Have tried the following ( one at a time) but the "originator" field ip address does not change. I am applying this to the Outbound Dial-peer

voice class sip-profiles 10
 rule 1 request INVITE sdp-header Session-Owner modify  "10.10.10.10“ "192.168.0.10"

and 

voice class sip-profiles 10
 rule 1 request ANY sdp-header Session-Owner modify  "10.10.10.10“ "192.168.0.10"

 

 

I used 10.10.10.10 and 192.168.0.10 only as an example. Are you applying the correct IP addresses in the sip profile? Could you share a copy of the SIP invite?  

 

Hi @TechLvr   Yes, i do understand the ip addresses you mentioned were just as an example ,  I have used the correct ip address in the sip profile. I will be trying the following today and share the output of what i see in the debugs 

Create  a Sip-Profile

voice class sip-profiles 1

rule 1 request ANY sdp-header Session-Owner modify  “10.10.10.10"  "192.168.0.10"   --> This will change the session-owner on any request message the CUBE is sending out.

rule 2 response ANY sdp-header Session-Owner modify  "10.10.10.10“ "192.168.0.10"  --> This will change the session-owner on any response the CUBE is sending out after receiving a request message.

 Apply the SIP Profile to the Outbound Dial Peer

 

Turn on these debugs in parallel to check what happens to the call.

  • debug voip ccapi inout 
  • debug voip translation 
  • debug ccsip message 

This should show you what dial peers that are used in the call, what effect the translation in the SIP profile has and what is sent in the SIP dialogue.



Response Signature


Have you tested your SIP profile in the test tool that @b.winter posted the link to?



Response Signature


Make sure the call hit the dial-peer which you applied the profile.



Response Signature