cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1568
Views
9
Helpful
10
Replies

Preserve caller domain across CUBE

I am challenged when trying to preserve caller domain when CUBE is handling calls.

all calls that traverse the CUBE are having the CUBE fqdn as domain suffix when arriving at their destination, instead of the orignal caller domain.

fortvald
10 Replies 10

This should be doable with SIP profile(s). I see that you have that in your shared configuration. Can you please share the SIP dialog that you'd want to change and outline in detail what you want to achieve so that we can test it in the SIP profile test tool?



Response Signature


Hi Roger

Here are the 2 INVITE's, my goal is that the "From" contains the information received, when beeing sent.

Inbound:

30310: May 25 10:00:23.449: //100544/CCBE17428246/CUBE_VT/SIP/Msg/ccsipDisplayMsg:
Received: SIP TLS message from 10.10.30.149:41747 to 10.160.88.77:5061
INVITE sip:1046@cucm.cisco.test SIP/2.0
Via: SIP/2.0/TLS dcs01.confdev.dss.dencrypt.local;rport;branch=z9hG4bK.KmUc4p7gp7Z21Bv59Dcr3F8aac
Via: SIP/2.0/TLS 10.10.3.218:61343;branch=z9hG4bK.rciamc-Bu;rport=51100;received=10.10.20.64
From: "Flemming Ortvald" <sip:flemmingo@dcs.confdev.dss.dencrypt.local>;tag=gH0hb-DOE
To: <sip:1046@cucm.cisco.test>
CSeq: 21 INVITE
Call-ID: okRkNRQ7o7
Max-Forwards: 69
Supported: replaces, outbound, gruu, path, record-aware
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, PRACK, UPDATE
Content-Type: application/sdp
Contact: <sip:flemmingo@dcs.confdev.dss.dencrypt.local;gr=urn:uuid:b3d18dc9-c96f-0061-a3ab-7f62f52c5041>;+sip.instance="<urn:uuid:b3d18dc9-c96f-0061-a3ab-7f62f52c5041>";+org.linphone.specs="lime"
User-Agent: Linphone-Desktop/5.0.16 (ND4121) windows/10 Qt/5.15.2 LinphoneSDK/5.2.59
Record-Route: <sips:dcs01.confdev.dss.dencrypt.local:5061;lr>
Content-Length: 1043

v=0
o=flemmingo 0 1812 IN IP4 10.10.3.218
s=Talk
c=IN IP4 10.10.30.64
t=0 0
a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics
a=group:BUNDLE as
a=record:off
a=nortpproxy:yes
m=audio 27920 RTP/SAVP 96 0 8 101 97
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1
a=rtpmap:101 telephone-event/48000
a=rtpmap:97 telephone-event/8000
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
a=crypto:3 AES_256_CM_HMAC_SHA1_80 inline:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
a=crypto:4 AES_256_CM_HMAC_SHA1_32 inline:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
a=crypto:5 AEAD_AES_128_GCM inline:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
a=crypto:6 AEAD_AES_256_GCM inline:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
a=rtcp-mux
a=mid:as
a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
a=rtcp-fb:* trr-int 1000
a=rtcp-fb:* ccm tmmbr

Outbound:

30367: May 25 10:00:23.469: //100545/CCBE17428246/CUBE_VT/SIP/Msg/ccsipDisplayMsg:
Sent: SIP TLS message from 10.160.88.77:5061 to 10.160.88.70:5061
INVITE sip:1046@cucm.cisco.test:5061 SIP/2.0
Via: SIP/2.0/TLS 10.160.88.77:5061;branch=z9hG4bK9CA3277
From: "Flemming Ortvald" <sip:flemmingo@cube.cisco.test>;tag=2EF6CDC4-473
To: <sip:1046@cucm.cisco.test>
Date: Thu, 25 May 2023 10:00:23 GMT
Call-ID: CCC06124-FA1911ED-824CE0F0-FA8B711E@cube.cisco.test
Supported: 100rel,timer,resource-priority,replaces,X-cisco-srtp-fallback
Min-SE: 1800
Cisco-Guid: 3435009858-4195946989-2185683184-4203442462
User-Agent: Cisco-SIPGateway/IOS-17.11.1a
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1685008823
Contact: <sip:flemmingo@10.160.88.77:5061;transport=tls>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 68
P-Asserted-Identity: "Flemming Ortvald" <sip:flemmingo@cube.cisco.test>
Session-ID: afd32fb954eb50248e2a293e34605aaa;remote=00000000000000000000000000000000
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 695

v=0
o=CiscoSystemsSIP-GW-UserAgent 9619 1014 IN IP4 10.160.88.77
s=SIP Call
c=IN IP4 10.160.88.77
t=0 0
m=audio 8596 RTP/SAVP 114 0 8 101 19
c=IN IP4 10.160.88.77
a=rtpmap:114 opus/48000/2
a=fmtp:114 useinbandfec=1
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:19 CN/8000
a=ptime:20
a=crypto:1 AEAD_AES_256_GCM inline:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
a=crypto:2 AEAD_AES_128_GCM inline:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
a=crypto:3 AES_CM_128_HMAC_SHA1_80 inline:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
a=crypto:4 AES_CM_128_HMAC_SHA1_32 inline:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 

fortvald

Use a SIP copy-list on the inbound dial-peer to capture the values of the header that you need (stays in the internal buffer).
and then use a SIP profile on the outbound dial-peer, to use the values from the buffer to modify the SIP headers.
There a Cisco docs available describing your scenario and lots of old posts, that ask the same question in principle.

As @b.winter and @Jonathan Schulenberg wrote earlier you’ll need to use a SIP copy list to copy the content of the From field as it arrives on the inbound call leg to the SBC and then use that in a SIP profile to make the change that you require on the outbound call leg.

Unfortunately the SIP profile test tool is currently not operational, so I can’t run this through it to simulate the changes needed. That said there are plenty of examples on this available, so you’ll likely be able to find out how to do this.



Response Signature


It is proberly me, but the examples I have found, and tried to follow doesn't yield the result I hope to achive.

Current config and log attached, if anyone wants to chime in.

"Show voip trace" attached in "trace.zip"

fortvald

Please don't post such a long output in a thread message. That makes the forum post unnecessarily loooong.

Could you please describe, which dial-peers you are intending to use, so that anybody checking your config can corelate the info correctly

And please provide another output of a call with the following debugs:
debug voice ccapi ind 1
debug voice ccapi ind 2
debug voice ccapi ind 74
debug ccsip messages
debug voice translations

Edit: one more question: Is the domain always the same, which you want to use on the outgoing call-leg? If yes, this would make the config more easily and you don't need to use SIP copy-list. Then you just could use a static value in the SIP-profile(s), instead of a possible dynamic mapping between in- and outbound leg

Answer to question first, there are more incoming domains in play, so looking for the most generic way to solve the challenge.

Dial-peers involved:

Dir: Inbound, Peer-Tag: 100

Dir: Outbound, Peer-Tag: 400

CUBE log attached, along with "show voip trace" of the call in a zip file

fortvald

Hi,
about your trace / config:
In the trace it clearly states, that the rule for modifying the "From" and "Contact" header isn't matching:

 

May 29 12:01:18.748: //-1/xxxxxxxxxxxx/RXRULE/sed_subst: No match! number=From: "Flemming Ortvald" <sips:flemmingo@cube.cisco.test>;tag=43FEF2B4-CE7 matchPattern=<sip:(.*)@cube.cisco.test> replacePattern=\1@dcs.confdev.dss.dencrypt.local>

May 29 12:01:18.748: //-1/xxxxxxxxxxxx/RXRULE/sed_subst: No match! number=Contact: <sips:flemmingo@10.160.88.77:5061> matchPattern=<sip:(.*)@cube.cisco.test> replacePattern=\1@

 


Furthermore:
Rules 6 and 8 aren't configured correctly in my opinion. You are just copying the number, but don't add the "<sip:" anymore.

According to rules 7 and 8 in your SIP-profile 100, you are trying to use the peer-header "Contact", but you are not copying the "Contact" header value within your copy-list 800:

 

voice class sip-copylist 800
 sip-header SIP-Req-URI
 sip-header FROM
 sip-header TO
 sip-header SIP-StatusLine

 

I would try the following:

 

voice class sip-copylist 800
 sip-header From
 sip-header Contact
!
voice class sip-profiles 100
 rule 5 request INVITE peer-header sip From copy ".*@(dcs.confdev.dss.dencrypt.local>).*" u01
 rule 6 request INVITE peer-header sip Contact copy ".*@(dcs.confdev.dss.dencrypt.local>).*" u02
 rule 7 request INVITE sip-header From modify "(<sip:.*)@cube.cisco.test>(.*)" "\1@\u01\2"
 rule 8 request INVITE sip-header Contact modify "(<sip:.*)@cube.cisco.test>(.*)" "\1@\u02\2"

 

Where you could also remove rule 6, as you could only work with the value in the buffer variable u01 (it's the same domain)

For all the other rules in the profile 100, if you just want to change from "<sips:" to "<sip:", you could just use:

rule x request ANY sip-header To modify "<sips:(.*)" "<sip:\1"



Something like this might work.

voice class sip-copylist 10
 sip-header From
!
dial-peer voice <tag> voip !Not sure what dial peer you intend to be used in the inbound direction from CM to the SBC, put the number of the one you use in the tag
 voice-class sip copy-list 10
!
voice class sip-profiles 10
 request INVITE peer-header sip From copy "sip:.*@(.*>)" u01
 request ANY sip-header From modify "From:(.*)@.*>" "From:\1@\u01"
! 
dial-peer voice <tag> voip !Not sure what dial peer you intend to be used in the outbound direction from SBC to the whatever you're passing the call to, put the number of the one you use in the tag
 voice-class sip profiles 10

However please note it's not been tested, nor could I run it in the SIP profile test tool as it still doesn't work.

Your shared output has this for the two invites that are involved in the call flow.

Inbound
32507: May 25 12:50:58.185: //101873/A11EB7C185D9/CUBE_VT/SIP/Msg/ccsipDisplayMsg:
Received: SIP TLS message from 10.10.30.149:43365 to 10.160.88.77:5061
INVITE sip:1046@cucm.cisco.test SIP/2.0
Via: SIP/2.0/TLS dcs01.confdev.dss.dencrypt.local;rport;branch=z9hG4bK.9ypaKNt4evHNXDF8175ZS1tyFg
Via: SIP/2.0/TLS 10.10.3.218:61343;branch=z9hG4bK.ZF6r-QKKV;rport=51100;received=10.10.20.64
From: "Flemming Ortvald" <sip:flemmingo@dcs.confdev.dss.dencrypt.local>;tag=Y-igwtHOC
To: <sip:1046@cucm.cisco.test>
CSeq: 21 INVITE
Call-ID: 8L-yxgVko-
Max-Forwards: 69
Supported: replaces, outbound, gruu, path, record-aware
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, PRACK, UPDATE
Content-Type: application/sdp
Contact: <sip:flemmingo@dcs.confdev.dss.dencrypt.local;gr=urn:uuid:b3d18dc9-c96f-0061-a3ab-7f62f52c5041>;+sip.instance="<urn:uuid:b3d18dc9-c96f-0061-a3ab-7f62f52c5041>";+org.linphone.specs="lime"
User-Agent: Linphone-Desktop/5.0.16 (ND4121) windows/10 Qt/5.15.2 LinphoneSDK/5.2.59
Record-Route: <sips:dcs01.confdev.dss.dencrypt.local:5061;lr>
Content-Length: 1045

v=0
o=flemmingo 822 1582 IN IP4 10.10.3.218
s=Talk
c=IN IP4 10.10.30.64
t=0 0
a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics
a=group:BUNDLE as
a=record:off
a=nortpproxy:yes
m=audio 19090 RTP/SAVP 96 0 8 101 97
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1
a=rtpmap:101 telephone-event/48000
a=rtpmap:97 telephone-event/8000
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
a=crypto:3 AES_256_CM_HMAC_SHA1_80 inline:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
a=crypto:4 AES_256_CM_HMAC_SHA1_32 inline:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
a=crypto:5 AEAD_AES_128_GCM inline:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
a=crypto:6 AEAD_AES_256_GCM inline:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
a=rtcp-mux
a=mid:as
a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid
a=rtcp-fb:* trr-int 1000
a=rtcp-fb:* ccm tmmbr


Outbound
32564: May 25 12:50:58.213: //101874/A11EB7C185D9/CUBE_VT/SIP/Msg/ccsipDisplayMsg:
Sent: SIP TLS message from 10.160.88.77:5061 to 10.160.88.70:5061
INVITE sip:1046@cucm.cisco.test SIP/2.0
Via: SIP/2.0/TLS 10.160.88.77:5061;branch=z9hG4bK9ECE1C3D
From: "Flemming Ortvald" <sip:flemmingo@cube.cisco.test>;tag=2F92F93B-4EA
To: <sip:1046@cucm.cisco.test>
Date: Thu, 25 May 2023 12:50:58 GMT
Call-ID: A1219DCB-FA3111ED-85DFE0F0-FA8B711E@cube.cisco.test
Supported: 100rel,timer,resource-priority,replaces,X-cisco-srtp-fallback
Min-SE: 1800
Cisco-Guid: 2703144897-4197519853-2245648624-4203442462
User-Agent: Cisco-SIPGateway/IOS-17.11.1a
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1685019058
Contact: <sip:flemmingo@10.160.88.77:5061;transport=tls>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 68
P-Asserted-Identity: "Flemming Ortvald" <sip:flemmingo@cube.cisco.test>
Session-ID: d933c5a43f115d5e8f616250ff89d9f6;remote=00000000000000000000000000000000
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 695

v=0
o=CiscoSystemsSIP-GW-UserAgent 4693 5147 IN IP4 10.160.88.77
s=SIP Call
c=IN IP4 10.160.88.77
t=0 0
m=audio 8646 RTP/SAVP 114 0 8 101 19
c=IN IP4 10.160.88.77
a=rtpmap:114 opus/48000/2
a=fmtp:114 useinbandfec=1
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:19 CN/8000
a=ptime:20

 



Response Signature


Jonathan Schulenberg
Hall of Fame
Hall of Fame

Admittedly I am on my phone and speed reading but I did not see a copy list in your config. You’ll need that to copy something from the incoming to outgoing call leg. CUBE is a B2BUA, not a proxy. Especially in its default E164 mode it only maintains the user portion / left hand side of a SIP URI. You may want to read through URI-Based Dialing Enhancements as well.