cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
654
Views
0
Helpful
8
Replies

Change From field in CUBE

j.huizinga
Level 6
Level 6

Hi

We have a CUBE that connects to a provider. The From field (INVITE) has the following format when send to provider:

From: "<name as configured on IP phone>" <sip:extension@provider>

What provider wants now is: From: "<extension>" <sip:main-number@provider>

The sip part is fixed for each call, only the extension is of course different each time. This can be done with profiles on the CUBE, but I can't get it to work 100%. Any idea? 

Thanks!

 

JH

8 Replies 8

Create a SIP profile with () around the extension part on the match side and then on the replacement side put that in as \1. I’m writing this on a mobile, so I can’t easily get you a complete suggestion. Have a look at this document on how SIP profiles work. SIP Profiles on CUBE Enterprise Common Use Cases 

Also it could be useful to try your SIP profile on this tool before you put it into your gateway. https://cway.cisco.com/tools/SipProfileTest/



Response Signature


This document also have a great section on SIP profiles. In Depth Explanation of Cisco IOS and IOS-XE Call Routing 



Response Signature


Something like this should work.

rule 10 request INVITE sip-header From modify "From: ".*" <sip:(.*)@.*" "From: "\1" <sip:main-number@provider>"



Response Signature


Hello Roger

Thank you for your input.

I tried your solution but get an "% Invalid input detected at '^' marker." error. The error points to ".*" (right behind the first "From:) Looks like a missing " somewhere?

You know?

 

Thank you for your help

 

JH

 

Try with this.

rule 10 request INVITE sip-header From modify ".*<sip:(.*)@.*" ""\1" <sip:main-number@provider>"



Response Signature


j.huizinga
Level 6
Level 6

Hello Roger

I applied the last suggestion from you, but now I have:  Error: Invalid Pattern-quote is not escaped

I shall check the documentation, but maybve you see what is wrong

Thank you very much!

JH

I didn’t know, but there is this nice thing called Google. I took your error message and searched for it and the first hit was this post. https://community.cisco.com/t5/unified-communications-infrastructure/cube-sip-profile-to-change-from-clid-error-invalid-pattern-quote/td-p/3863309

As you have " as part of the result in the replacement part you’d need to escape them. Try with this.

rule 10 request INVITE sip-header From modify ".*<sip:(.*)@.*" "\"\1\" <sip:main-number@provider>"



Response Signature


Hello Roger

OK, now I don't have an error, I shall check if it works, and thank you for the other links, I just must learn the syntax of these profiles. 

 

Thank you!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: