08-16-2023 10:40 AM - edited 08-16-2023 10:42 AM
The "Cisco-Gucid" header exists in one call leg (first appears in the "100 Trying" response), but not in another (a new INVITE). I'm trying to use SIP profile to copy the header over (from dial-peer 2010 to dial peer 9012).
But the result was - CUBE added the header as "Cisco-Gucid:\u01" instead of escaping the variable u01. My questions are:
voice class sip-copylist 100
sip-header Cisco-Gucid
voice class sip-profiles 9012
request INVITE peer-header sip Cisco-Gucid copy "Cisco-Gucid:(.*)" u01
request INVITE sip-header Cisco-Gucid add "Cisco-Gucid:\u01"
dial-peer voice 2010
description Inbound Instance 1 - CUCM - CVP
voice-class sip copy-list 100
dial-peer voice 9012 voip
description SIP-REC TCP ( INT-1 )
voice-class sip profiles 9012
08-16-2023 12:00 PM - edited 08-16-2023 11:33 PM
Split your SIP profile into two parts, one used inbound on your inbound dial peer to copy the value and another that uses what was copied earlier on the outbound dial peer to add what was copied earlier. For this you’ll need to turn on use of inbound SIP profiles as it normally does not work in the inbound direction. See this document for more information. Explain Cisco IOS and IOS XE Call Routing
08-16-2023 12:03 PM
Thank you for your suggestion. I'll try that. But that didn't answer my question - will the "ADD" action honor the variable? i.e. can I use variables with "ADD" action? Thanks!
08-16-2023 12:05 PM - edited 08-16-2023 11:32 PM
Yes that should work.
08-16-2023 12:10 PM
But it does not. I have a TAC case opened. They have no clue.
08-16-2023 01:47 PM
Try with what I suggested.
08-16-2023 11:40 PM
Maybe a workaround could be, that you have 2 rules:
rule 1 to add an empty header with "add"
and rule 2 to modify the header with the value of the variable
08-17-2023 02:34 AM
This is what I think that you need to have.
voice service voip
sip
sip-profiles inbound
!
voice class sip-copylist 100
sip-header Cisco-Gucid
!
voice class sip-profiles 2010
request INVITE peer-header sip Cisco-Gucid copy "Cisco-Gucid:(.*)" u01
!
voice class sip-profiles 9012
request INVITE sip-header Cisco-Gucid add "Cisco-Gucid:\u01"
!
dial-peer voice 2010
description Inbound Instance 1 - CUCM - CVP
voice-class sip copy-list 100
voice-class sip profiles 2010 inbound
!
dial-peer voice 9012 voip
description SIP-REC TCP ( INT-1 )
voice-class sip profiles 9012
Try it out and let me know how it goes.
08-17-2023 05:45 AM
Roger,
Thank you for your suggestion. I tried that but didn't seem to work. TAC said they need to clarify with the developers to see if this is supported. Here is my use case:
I want to copy the Cisco-Gucid header from the "100 Trying" (or "200 Ok") to the 3rd INVITE. TAC said it's probably not supported as the "100 Trying" and "200 Ok" are on an outgoing dial-peer (though the messages are incoming). The "sip copy-list" only takes effect on incoming dial-peer.
I was under the impression that the copy-list takes effect on "incoming message". From software design perspective, we just need to make sure the "copy from" event happens before the "add to" event. In this case, the "copy from" events are the "100 Trying" and "200 Ok" (circled in the diagram). The "add to" even is in the INVITE (also circled), which will not happen until the call to CVP is established.
I'm following https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/cube/configuration/cube-book/copy_sip_headers.html. Is there another way to achieve my goal? Thanks!
08-17-2023 01:33 PM - edited 08-18-2023 03:35 AM
These messages are inbound on the outbound call leg. It’s imperative to comprehend the concept that there are always two call legs, one inbound and another one outbound. As you yourself wrote the copy is limited to work on the inbound call leg, that is as well stated in the documentation I shared earlier, but you should wait for confirmation from the BU at Cisco as they should have the detailed insight into how this operates.
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