04-06-2023 06:05 AM
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?
04-06-2023 06:36 AM - edited 04-06-2023 06:38 AM
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/
04-06-2023 08:28 AM
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?
04-06-2023 08:45 AM - edited 04-06-2023 08:46 AM
@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
04-06-2023 09:46 AM
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?
04-06-2023 09:59 AM
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.
04-06-2023 10:25 AM
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.
04-06-2023 06:14 PM
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"
04-06-2023 09:20 PM
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?
04-06-2023 09:35 PM
Hi @TechLvr Yes, i do understand the ip addresses you mentioned were just as an example
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
04-07-2023 12:18 AM
Turn on these debugs in parallel to check what happens to the call.
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.
04-07-2023 12:23 AM
Have you tested your SIP profile in the test tool that @b.winter posted the link to?
04-06-2023 10:46 PM
Make sure the call hit the dial-peer which you applied the profile.
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