cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1610
Views
0
Helpful
18
Replies

copy header from incoming invite to outgoing invite with sip profiles

Djeten
Level 1
Level 1

Hello,

We have a Direct Routing SIP Trunk on our SBC to MS Teams. We want to have MS Teams users to be able to call users on our CUCM and vice versa.

This works, but calls coming from MS Teams have this From header in the INVITE:

FROM: "name"<sip:+32xxxxxxxx;ext=655@sip.pstnhub.microsoft.com:5061;user=phone>;tag=65cd84363b64418681a4755c66aea53f

The From header in the outgoing INVITE then lookes like this:

From: "name" <sip:32xxxxxxxx@192.168.25.153>;tag=426821A8-1ACA

I would prefer if the From header in the outgoing INVITE would have the internal extension, like this:

From: "name" <sip:655@192.168.25.153>;tag=426821A8-1ACA

 

To do this, I have this configuration:

voice class sip-copylist 1
sip-header From


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@"

#outgoing dial peer
dial-peer voice 340 voip
voice-class sip profiles 340

#incoming dial peer
dial-peer voice 290 voip
voice-class sip copy-list 1

 

The result of this, is that the From header in the outgoing INVITE now looks like this:

From: "name" <sip:@192.168.25.153>;tag=426821A8-1ACA

So the SIP Profile is executed, but the copy command did not work. 

Where is the error in my config?

 

18 Replies 18

b.winter
VIP
VIP

Hi,
is the extension included in the full e164 number?
e.g. +32xxxxx655

Do you see, that manipulation of both rules in the debug? It seems, that the ext is not copied to the cache.
Also be aware, the everything in the cache only is stored, until the next outgoing message. So, if there is an outgoing message, before your INVITE, then the cache is emtpy.

No, we have multiple e164 numbers that are shared by multiple users with each a separate internal extension.

e.g +32xxxxx655 could be used by users 655,656 end 657, and +32xxxxx656 could be used by users 658 and 659...

Ok. I see.
Could you provide a log output from such a call?
debug voice ccapi ind 1
debug voice ccapi ind 2
debug voice ccapi ind 74
debug ccsip messages
debug ccsip translate
debug voice translations

The replace pattern is empty when the SIP-Profile for the outgoing INVITE is applied:

Mar 15 13:16:06.174: //-1/xxxxxxxxxxxx/RXRULE/sed_subst: Successful substitution; pattern=From: "Didier Derveaux" <sip:3257798265@192.168.25.153>;tag=42A096A4-C4D matchPattern=<sip:3257798265@ replacePattern=<sip:@ replaced pattern=From: "Didier Derveaux" <sip:@192.168.25.153>;tag=42A096A4-C4D

Could you do another debug:

debug ccsip mess
debug ccsip info
debug ccsip feature sip-profile
debug voice ccapi ind 1
debug voice ccapi ind 2
debug voice ccapi ind 74
debug ccsip translation

And please don't post the output as normal text in a message. Save it as a text file and append the file to your message.

debug.txt attached - had to zip it because I got the error that the txt extension did not match the content of the file for some reason

Your copying isn't applied anywhere, thats why your variable u06 is empty.

Just a guess, because I don't know if the header-names in the copy-lists are case sensitive or not:
The message from MS teams has all the headers in upper-case (INVITE, FROM, ...)

In your sip-copylist, you have "sip-header From" --> the "From" is not all upper-case and maybe that's why it isn't matching and therefore nothing is copied.

Try to delete and configure the copy-list again with "sip-header FROM" and do another test.

Otherwise, maybe the behavior of not-copying is a bug in that version.

I have already tried that. Issue stays the same.

 

Yeah, was just a guess.
But I don't see any misconfig in your config. The debugs confirm, that you use the correct in- and outbound dial-peers.

Maybe you need to try a different version (I have seen a lot of discussions about different buggy 17.3.x versions) or you open a case.

Edit: @Djeten found the discussion about the buggy 17.x versions --> minium version recommended was 17.6.4. Maybe you could try with this version

OK, thanks for the support. I will try this.

Edit:

When I look for new firmware, I see no 17.6.4

https://software.cisco.com/download/home/284364978/type/282046477/release/Amsterdam-17.3.4a

 

It is defensively available for download from Cisco.

image.png



Response Signature


Can I run this firmware on a Cloud Services Router 1000V? The firmware you are suggesting is for ISR 4321 and 4331...

It's for those routers, because your config states, that you are using a 4321. Why do you need it for a C1000V then?
And no, you cannot use this file for this router, as it is only for a 4k router. Check the download section, which firmwares are available for a C1000V (the forum is not here to google stuff for you ...)

I suppose you are referring to lines like these:

request ANY sip-header User-Agent modify "(IOS.*)" "\1\x0D\x0AX-MS-SBC: Cisco UBE/ISR4321/\1"

But this was simply copied from the instructions to configure the SIP trunk to MS Teams, and I haven't addapted it to reflect the correct version.

But I am using a CSR1000V for this...

And I had checked the downloads for this type, that is why I said I couldn't find the firmware you suggested...