cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2083
Views
30
Helpful
14
Replies

CUBE sip profile & copy-list feature error when handling FROM header

Liv_Liv
Level 1
Level 1

Hi,

I´m trying to define a transformation for the From header a CUBE is receiving & sending. 

call flow is: Phone --> Customer´s OLD PBX --> Cisco CUBE --> 3rd party SBC --> ITSP

 

CUBE receives the following INVITE from OLD PBX (Incoming)

 

Received:

INVITE sip:60XXXXXXX@11.111.111.11:5060;transport=tcp SIP/2.0
Via: SIP/2.0/TCP 22.222.22.22:5060;branch=z9hG4bKm-3mD6IbrD2t-3QJPEvHKA4y_qDzsd,SIP/2.0/TCP 33.333.33.33:5060;branch=z9hG4bKm-3mD6IbrD2t-3QJPEvHKA4y_qD,SIP/2.0/TCP 44.444.44.44:5060;oc-node=101;branch=z9hG4bKm-3mD6IbrD2t-3QJPEvHKA;rport=33620;received=44.444.44.44;raddress=44.444.44.44;conkey=tcp_44.444.44.44_33620
From: "40008" <sip:003468XXXXXXX@customer.cu>;tag=xJwWGQ
To: <sip:60XXXXXXX@11.111.111.11:5060;transport=tcp>
Call-ID: 4y_qD52NWzF2TazrWo5bNw
CSeq: 667842 INVITE
Contact: <sip:22.222.22.22:5060;transport=tcp;oc-node=101>
Max-Forwards: 69
Content-Type: application/sdp
P-Asserted-Identity: "003468XXXXXXX" <sip:003468XXXXXXX@customer.cu>
Record-Route: <sip:22.222.22.22:5060;transport=tcp;lr>,<sip:33.333.33.33:5060;transport=tcp;lr;nst-node=44.444.44.44:5060;nst-dir=orig>
Content-Length: 295

 

My goal is to retain the display (40008) and make the CUBE paste it in the Outgoing INVITE he generates for the Outbound, in this way: 

From: "003468XXXXXXX" <sip:40008@customer.cu>;tag=xJwWGQ

 

For this purpose, I´m using variables and the sip copylist feature. This is what I built: 

 

voice class sip-profile 10

request INVITE peer-header sip From copy "(4000.)" u01

request INVITE sip-header From modify "sip:(.*)@" "sip:\u01@"

 

voice class sip-copylist 1

sip-header From

 

Then, I apply the sip-copylist in the Inbound dial-peers (facing OLD PBX) and sip-profile in the Outbound dial-peers (facing the 3rd party SBC)

 

I´ve tested this transformation with the Cisco SIP profile test tool and apparently everything is working as expected. However when I put this in production, I notice that this is NOT working and I have the CUBE changing the From header not correctly, resulting in this Outbound INVITE: 

 

Sent:
INVITE sip:60XXXXXXX@11.111.111.11:5060 SIP/2.0
Via: SIP/2.0/TCP 22.222.22.22:5060;branch=z9hG4bK2061EFAF3
From: "003468XXXXXXX" <sip:\u01@customer.cu>;tag=xJwWGQ
To: <sip:60XXXXXXX@11.111.111.11:5060;transport=tcp>

 

So it seems that CUBE is putting in the FROM header the variable id instead of the variable value.

I´m sure I´m missing something but I cannot understand why I get the results expected when I test this with the SIP profile tool, but doesn´t work when putting it into a real CUBE (I´m fairly new in manipulating headers)

 

Anybody can shed some light into this?

 

thanks in advance,

 

14 Replies 14

Make sure you follow the outline for how to create and consume a sip copy list in this document. https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/cube/configuration/cube-book/copy_sip_headers.html?bookSearch=true

 



Response Signature


Hi Roger, thanks for replying,
Yes actually thats the doc I am using for learning when building the
profile and copylist, however it seems to have some typos.
I'm still not able to find what I'm doing wrong.
Thanks

From what I could see your configuration does not really match the document. Read it again and modify your configuration to follow the example in more detail. As the saying goes “The devil is in the details”.

Also check this document on how to debug this. https://www.cisco.com/c/en/us/support/docs/voice/ip-telephony-voice-over-ip-voip/211306-In-Depth-Explanation-of-Cisco-IOS-and-IO.html



Response Signature


I´ve modified my setup like this: 

request INVITE peer-header sip From copy "\"(4000.)\"" u01
request INVITE sip-header From modify "sip:(.*)@" "sip:\u01@"


But I´m still getting the exact same results. 

Kinda frustrating because the Sip profile test tool and Cisco CUBE DNA analyzer both validate my setup and show it as working like as expected. 

 

The debugs are showing the following, what I understand is that my profile doesn´t catch the variable correctly, and I also believe the copy operation is not been performed but I´m unable to find out why:

*Jan 13 10:35:32.599: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sipSPISetSipProfilesTag: voice class SIP Profiles tag is set : 10
*Jan 13 10:35:32.600: //-1/xxxxxxxxxxxx/SIP/Info/sipSPI_Check_If_ICE_Needed: CANDIDATE attribute, level 1not found.
*Jan 13 10:35:32.601: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sipSPISetSipProfilesTag: voice class SIP Profiles tag is set : 10
*Jan 13 10:35:32.603: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_modify_remove_header: Header before modification : From: "003468XXXXXXX" <sip:003468XXXXXXX@customer.cu>;tag=5BC43465-20AA
*Jan 13 10:35:32.603: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_modify_remove_header: Header after modification : From: "003468XXXXXXX" <sip:\u01@customer.cu>;tag=5BC43465-20AA
*Jan 13 10:35:32.603: //-1/xxxxxxxxxxxx/SIP/Info/ccsip_process_tcp_queue_event: Event type: send msg, connid: 3581, fd: 15


also tried the following:

request INVITE peer-header sip From copy "\"(4000.)\"" u01
request INVITE sip-header From modify "<sip:(.*)@>" "<sip:\u01@>"

 

with absolutely no effect: 

*Jan 13 10:53:07.908: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sipSPISetSipProfilesTag: voice class SIP Profiles tag is set : 10
*Jan 13 10:53:07.909: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_modify_remove_header: Header before modification : From: "003468XXXXXXX" <sip:003468XXXXXXX@customer.cu>;tag=5BD44EB0-1991
*Jan 13 10:53:07.909: //-1/xxxxxxxxxxxx/SIP/Info/critical/64/sip_profiles_application_modify_remove_header: SIP profiles application couldnt modify the header : From: "003468XXXXXXX" <sip:003468XXXXXXX@customer.cu>;tag=5BD44EB0-1991
*Jan 13 10:53:07.910: //-1/xxxxxxxxxxxx/SIP/Info/ccsip_process_tcp_queue_event: Event type: send msg, connid: 10, fd: 5


Roger, I appreciate your help very much. If you spotted a clear error or wrong statement in my setup, do you mind pointing me into it so I can review and understand why I´m still failing at this?

thanks

 

Try with this.

voice class sip-copylist 1
 sip-header From
! 
dial-peer voice <tag of inbound dial-peer> voip
 voice-class sip copy-list 1

voice class sip-profile 10
 request INVITE peer-header sip From copy "sip:(.*)@" u01
 request INVITE sip-header From modify ".*@(.*)" "From \"\u01\" <sip:\u01@\1"
!
dial-peer voice <tag of outbound dial-peer> voip
 voice-class sip profiles 10 

Please not that I have not tested it with the tool you reference, never actually used it or known that such a tool did exist, nor have I validated it in a SBC. It's just based on the two documents that I linked to.

What I do note is that your output from the debug doesn't have any information about the copy list being used. If you look at the example output it has this.

 

 

### Copylist Details
00440: Mar  8 18:59:49.796: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_peer_copy_pattern: sed_match succeeded
000441: Mar  8 18:59:49.797: //187/D6138E000000/SIP/Info/info/64/sip_profiles_application_peer_copy_pattern: SIP Profiles COPY variables AVL tree created
000442: Mar  8 18:59:49.797: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_prefix_slash_in_copy_var_val: ret_dst: 5001
000443: Mar  8 18:59:49.797: //187/D6138E000000/SIP/Info/info/64/sip_profiles_application_peer_copy_pattern: SIP Profiles COPY variable: u1 val: 5001
000444: Mar  8 18:59:49.797: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_modify_remove_header: Header before modification : Contact: <sip:5001@14.50.228.61:5060>
000445: Mar  8 18:59:49.797: //187/D6138E000000/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: Node found: COPY variable: u1 val: 5001
000446: Mar  8 18:59:49.797: //187/D6138E000000/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: substituted_replace_pattern :  : .117.64.94>
000448: Mar  8 18:59:49.797: //187/D6138E000000/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: Final substituted_replace_pattern : <sip:5001@165.117.64.94>
000449: Mar  8 18:59:49.797: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_app_modify_header: Passing substituted replace pattern
000450: Mar  8 18:59:49.798: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_modify_remove_header: Header after modification : Contact: <sip:5001@165.117.64.94>
000451: Mar  8 18:59:49.798: //187/D6138E000000/SIP/Msg/ccsipDisplayMsg:

 

 



Response Signature


thanks Roger, 

Tried with your exact suggestion: 

 

request INVITE peer-header sip From copy "sip:(.*)@" u01
request INVITE sip-header From modify ".*@(.*)" "INVITE sip:\u01@\1"

 

As a result, what I get now is that the From header is completely removed from the outgoing INVITE message sent to the SBC, and then the exact text chain INVITE sip:\u01@customer.cu>;tag=5C356D24-1F49 is being inserted at the end of the outgoing INVITE message right before the SDP info. Kinda strange. Debug shows the following:

 

*Jan 13 12:39:12.694: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sipSPISetSipProfilesTag: voice class SIP Profiles tag is set : 10
*Jan 13 12:39:12.694: //-1/xxxxxxxxxxxx/SIP/Info/sipSPI_Check_If_ICE_Needed: CANDIDATE attribute, level 1not found.
*Jan 13 12:39:12.696: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sipSPISetSipProfilesTag: voice class SIP Profiles tag is set : 10
*Jan 13 12:39:12.698: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_modify_remove_header: Header before modification : From: "003468XXXXXXX" <sip:003468XXXXXXX@customer.cu>;tag=5C356D24-1F49
*Jan 13 12:39:12.698: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_modify_remove_header: Header after modification : INVITE sip:\u01@customer.cu>;tag=5C356D24-1F49
*Jan 13 12:39:12.698: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_modify_remove_header: Header Name is Modified:Removing From header
*Jan 13 12:39:12.698: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_modify_remove_header: New Header is Added to msg:INVITE sip:\u01@customer.cu>;tag=5C356D24-1F49

and the resulting outgoing INVITE is the following: 

 

*Jan 13 12:39:12.698: //8463066/2C88D4A58F94/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:6XXXXXXXX@11.111.11.11:5060 SIP/2.0
Via: SIP/2.0/TCP customer.cu:5060;branch=z9hG4bK20759F262F
To: <sip:6XXXXXXXX@10.111.134.20>
Date: Wed, 13 Jan 2021 12:39:12 GMT
Call-ID: 2C8970CD-54D311EB-8F9AD4B6-4A8BEE7D@customer.cu
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE:  1800
Cisco-Guid: 0747164837-1423118827-2408895670-1250684541
User-Agent: Cisco-SIPGateway/IOS-15.5.3.S4b
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1610541552
Contact: <sip:003468XXXXXXX@customer.cu:5060;transport=tcp>
Call-Info: <sip:customer.cu:5060>;method="NOTIFY;Event=telephone-event;Duration=2000"
Expires: 180
Allow-Events: kpml, telephone-event
Max-Forwards: 68
P-Asserted-Identity: "003468XXXXXXX" <sip:003468XXXXXXX@customer.cu>
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 298
INVITE sip:\u01@customer.cu>;tag=5C356D24-1F49

v=0
o=CiscoSystemsSIP-GW-UserAgent 8414 1492 IN IP4 11.111.11.11
s=SIP Call
c=IN IP4 11.111.11.11
t=0 0
m=audio 46676 RTP/AVP 8 0 101 19
c=IN IP4 10.111.134.72
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:19 CN/8000
a=ptime:20

Just to be sure that I´m explaining myself clairly enough: what I need is to catch/copy the Display name value (a.k.a caller ID name, etc... that is, the value between "") in the From header of the Incoming INVITE message, and paste it into the user portion of the URI in the Outgoing INVITE sent by the CUBE, like this:

 

Original FROM header received by the CUBE (Inbound INVITE)

From: "40008" <sip:003468XXXXXXX@customer.cu>;tag=xJwWGQ

 

Resulting FROM header sent by the CUBE (Outgoing INVITE after manipulation)

From: "003468XXXXXXX" <sip:40008@customer.cu>;tag=xJwWGQ

 

again thanks for your valuable input.

 

 

 

 

 

 

 

 

 

I did notice that I initial did have a couple of flaws in the suggestion, so I have updated my post. Can you please check again?



Response Signature


I don't see that the copy list is invoked in the output of your debug. You should see something like this.

00440: Mar  8 18:59:49.796: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_peer_copy_pattern: sed_match succeeded
000441: Mar  8 18:59:49.797: //187/D6138E000000/SIP/Info/info/64/sip_profiles_application_peer_copy_pattern: SIP Profiles COPY variables AVL tree created
000442: Mar  8 18:59:49.797: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_prefix_slash_in_copy_var_val: ret_dst: 40008


Response Signature


I took another pass at this. Can you please try this?

voice class sip-copylist 1
 sip-header From
! 
dial-peer voice <tag of inbound dial-peer> voip
 voice-class sip copy-list 1

voice class sip-profile 10
 request INVITE peer-header sip From copy "sip:(.*)@" u01
request INVITE peer-header sip From copy "From: \"(.*)\" <" u02
request INVITE sip-header From modify ".*@(.*)" "From: \"\u01\" <sip:\u02@\1" ! dial-peer voice <tag of outbound dial-peer> voip voice-class sip profiles 10

This anyway results in an outcome in the tool that looks to match your wanted result.

Snag_183c2b9.png



Response Signature


Hi Roger, 

tried with what you exactly proposed and it still didn´t work, but at least got a better debug output. 

With this: 

request INVITE peer-header sip From copy "sip:(.*)@" u01
request INVITE peer-header sip From copy "From: (.*) <" u02
request INVITE sip-header From modify ".*@(.*)" "From: \u01 <sip:\u02@\1"

I got the following: 

 

*Jan 13 15:01:07.578: //-1/xxxxxxxxxxxx/SIP/Info/sipSPI_Check_If_ICE_Needed: CANDIDATE attribute, level 1not found.
*Jan 13 15:01:07.580: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sipSPISetSipProfilesTag: voice class SIP Profiles tag is set : 10
*Jan 13 15:01:07.581: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_peer_copy_pattern: sed_match succeeded
*Jan 13 15:01:07.581: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_prefix_slash_in_copy_var_val: ret_dst: :003468XXXXXXX
*Jan 13 15:01:07.581: //8465370/FFCD053C98EA/SIP/Info/info/64/sip_profiles_application_peer_copy_pattern: SIP Profiles COPY variable: u1 val: :003468XXXXXXX
*Jan 13 15:01:07.581: //-1/xxxxxxxxxxxx/SIP/Info/critical/64/sip_profiles_application_peer_copy_pattern: Configured match pattern does not exist in the header
*Jan 13 15:01:07.581: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_modify_remove_header: Header before modification : From: "003468XXXXXXX" <sip:003468XXXXXXX@10.111.111.72>;tag=5CB75A68-136B
*Jan 13 15:01:07.581: //8465370/FFCD053C98EA/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: Node found: COPY variable: u1 val: :003468XXXXXXX
*Jan 13 15:01:07.581: //8465370/FFCD053C98EA/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: substituted_replace_pattern : From: :003468XXXXXXX
*Jan 13 15:01:07.581: //8465370/FFCD053C98EA/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: configured_replace_pattern :  <sip:\u02@\1
*Jan 13 15:01:07.581: //8465370/FFCD053C98EA/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: substituted_replace_pattern : From: :003468XXXXXXX <sip:
*Jan 13 15:01:07.581: //8465370/FFCD053C98EA/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: configured_replace_pattern : @\1
*Jan 13 15:01:07.581: //8465370/FFCD053C98EA/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: substituted_replace_pattern : From: :003468XXXXXXX <sip:@\
*Jan 13 15:01:07.581: //8465370/FFCD053C98EA/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: configured_replace_pattern : 1
*Jan 13 15:01:07.581: //8465370/FFCD053C98EA/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: Final substituted_replace_pattern : From: :003468XXXXXXX <sip:@\1
*Jan 13 15:01:07.581: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_app_modify_header: Passing substituted replace pattern
*Jan 13 15:01:07.582: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_modify_remove_header: Header after modification : From: :003468XXXXXXX <sip:@10.111.111.72>;tag=5CB75A68-136B
*Jan 13 15:01:07.582: //-1/xxxxxxxxxxxx/SIP/Info/ccsip_process_tcp_queue_event: Event type: send msg, connid: 3591, fd: 15

So from what I could notice in the debug above, the copy operation with the desired variables was now at least being finally done. 

The resulting INVITE was still not good as the From was malformed (I was getting a 400 error message - invalid From):

 

*Jan 13 15:00:49.143: //8465365/F4CF4D8798DF/SIP/Msg/ccsipDisplayMsg:
Sent: 
INVITE sip:68XXXXXXX@10.111.111.20:5060 SIP/2.0
Via: SIP/2.0/TCP 10.111.111.72:5060;branch=z9hG4bK2077E71BD
From: :003468XXXXXXX <sip:@10.111.111.72>;tag=5CB71261-1FBD
To: <sip:68XXXXXXX@10.111.111.20>
Date: Wed, 13 Jan 2021 15:00:49 GMT
Call-ID: F4D01105-54E611EB-98E5D4B6-4A8BEE7D@10.111.111.72
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 4107226503-1424364011-2564805814-1250684541
User-Agent: Cisco-SIPGateway/IOS-15.5.3.S4b
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1610550049
Contact: <sip:003468XXXXXXX@10.111.111.72:5060;transport=tcp>
Call-Info: <sip:10.111.111.72:5060>;method="NOTIFY;Event=telephone-event;Duration=2000"
Expires: 180Allow-Events: kpml, telephone-event
Max-Forwards: 68
P-Asserted-Identity: "003468XXXXXXX" <sip:003468XXXXXXX@10.111.111.72>
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 298

But once I noticed that the copy variable function was now being performed, I went back again to my profile I newly wrote this morning and that finally did the trick...can´t explain why the copy operation wasn´t performed from the beginning as no other config change has been made (I suspect a buggy behaviour). Seems that your proposed solution "activated" something and after that, my profile worked well. See: 

 

*Jan 13 15:06:53.647: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sipSPISetSipProfilesTag: voice class SIP Profiles tag is set : 10
*Jan 13 15:06:53.648: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_peer_copy_pattern: sed_match succeeded
*Jan 13 15:06:53.648: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_prefix_slash_in_copy_var_val: ret_dst: 40008
*Jan 13 15:06:53.648: //8465467/CE1280009951/SIP/Info/info/64/sip_profiles_application_peer_copy_pattern: SIP Profiles COPY variable: u1 val: 40008
*Jan 13 15:06:53.649: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_modify_remove_header: Header before modification : From: "003468XXXXXXX" <sip:003468XXXXXXX@10.111.134.72>;tag=5CBCA23B-D1F
*Jan 13 15:06:53.649: //8465467/CE1280009951/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: Node found: COPY variable: u1 val: 40008
*Jan 13 15:06:53.649: //8465467/CE1280009951/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: substituted_replace_pattern : sip:40008
*Jan 13 15:06:53.649: //8465467/CE1280009951/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: configured_replace_pattern : @
*Jan 13 15:06:53.649: //8465467/CE1280009951/SIP/Info/info/64/sip_profiles_check_and_get_variables_in_replace_pattern: Final substituted_replace_pattern : sip:40008@
*Jan 13 15:06:53.649: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_app_modify_header: Passing substituted replace pattern
*Jan 13 15:06:53.649: //-1/xxxxxxxxxxxx/SIP/Info/info/64/sip_profiles_application_modify_remove_header: Header after modification : From: "003468XXXXXXX" <sip:40008@10.111.111.72>;tag=5CBCA23B-D1F
*Jan 13 15:06:53.650: //-1/xxxxxxxxxxxx/SIP/Info/ccsip_process_tcp_queue_event: Event type: send msg, connid: 10, fd: 5

And the resulting INVITE is now finally just as I needed: 

 

*Jan 13 15:06:53.650: //8465467/CE1280009951/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:68XXXXXXX@10.111.111.20:5060 SIP/2.0
Via: SIP/2.0/TCP 10.111.134.72:5060;branch=z9hG4bK20780320DE
From: "003468XXXXXXX" <sip:40008@10.111.111.72>;tag=5CBCA23B-D1F
To: <sip:68XXXXXXX@10.111.111.20>
Date: Wed, 13 Jan 2021 15:06:53 GMT
Call-ID: CE13437E-54E711EB-9957D4B6-4A8BEE7D@10.111.111.72
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE:  1800
Cisco-Guid: 3457318912-1424429547-2572276918-1250684541
User-Agent: Cisco-SIPGateway/IOS-15.5.3.S4b
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1610550413
Contact: <sip:003468XXXXXXX@10.111.111.72:5060;transport=tcp>
Call-Info: <sip:10.111.111.72:5060>;method="NOTIFY;Event=telephone-event;Duration=2000"
Expires: 180
Allow-Events: kpml, telephone-event
Max-Forwards: 68
P-Asserted-Identity: "003468XXXXXXX" <sip:003468XXXXXXX@10.111.111.72>
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 295

Your observation in the lack of invoking the copy list in the output of the debug was crucial. Im very grateful for your help and continuous support in this community. 

I will leave the thread open for a couple of days just in case anything strange again arises as I still need to ask my customer to test it. If everything goes OK I will mark this as resolved. 

Again thank you very much for your contribution !!

 

 

 

Glad you got it to work.

Between when I wrote my reply with the second suggestion and you testing I made a few alterations to the post as I also saw that it did not do what you'd wanted it to do. The post as it stands now should be correct I think.

voice class sip-profile 10
 request INVITE peer-header sip From copy "sip:(.*)@" u01
 request INVITE peer-header sip From copy "From: \"(.*)\" <" u02
 request INVITE sip-header From modify ".*@(.*)" "From: \"\u01\" <sip:\u02@\1"

But as you already got it to work with your own profile that's of lesser value.

It would however be great if you could add your final setup to the post for the greater benefit of the community.



Response Signature


Out of curiosity I ran the tool with data from the debug section of the In Depth explanation doc and from what I can tell it does seem to copy and replace as expected, however as you also say you did that it's still not an absolute guaranties that my suggested configuration would work.

Snag_1154f16.png



Response Signature


yes seems that Sip profile test tool and CUBE DNA analyzer cannot guarantee to provide a real working result in a prod environment. Very strange as in the past I used the tool with less complex profiles and worked like a charm as a lab environment. 

I´ll wait a bit more just in case somebody else is able to spot the issue here. 

Thank you for your help Roger.

Djeten
Level 1
Level 1

I have a similar issue and I can't seem to fix it.

We have a Direct Routing trunk to MS Teams. I want to route calls from MS Teams to our PBX. So far so good. But the calls coming from MS Teams have this in the invite: FROM: "name"<sip:+32xxxxxxxx;ext=655@sip.pstnhub.microsoft.com:5061;user=phone>;tag=682a512aa8e54069bc7c8e246d575e46 and the invite that is sent to our PBX is this: From: "name" <sip:32xxxxxxxx@192.168.25.153>;tag=292069F6-1051

I would like to have the Invite that is sent to our PBX uses the internal number 655 instead of the e164 external number.

I have created a sip-copylist

voice class sip-copylist 1
sip-header FROM

I have added this copylist to the incoming dial-peer

I have created this sip profile:

voice class sip-profiles 340
rule 10 request INVITE peer-header sip FROM copy "<sip:+32xxxxxxxx;ext=(.*)@" u06
rule 20 request INVITE sip-header From modify "<sip:32xxxxxxxx@" "<sip:\u06@"

This sip profile was added to the outgoing dial peer.

Now I see this in the outgoing Invite: From: "name" <sip:@192.168.25.153>;tag=2A75EEEE-EB6

So the profile is in use, but the copy isn't executed...

Anybody see where I have gone wrong?