Author |
Message |
kevinb Brekeke Junior Member
Joined: 15 Feb 2012 Posts: 9
Location: United Kingdom
|
Posted: Wed Feb 15, 2012 4:44 am Post subject: Control outbound SIP URI based on Inbound SIP URI |
|
|
1. Brekeke Product Name and version:
Brekeke SIP Server 2.4.7.3/286.1
2. Java version:
1.6.0_22
3. OS type and the version:
Linux 2.6.18-194.el5
4. UA (phone), gateway or other hardware/software involved:
Lync Mediation Server to Brekeke TCP on Port 5060
5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/networkpatterns.html :
Pattern 9
6. Your problem:
I am trying to adjust the "From=sip:xxxxx" which is sent onto our provider based on matching the "From=sip:xxxxx" that we are sending to the Brekeke SIP server, I can manipulate the "From" which is being sent to the provider so i'm ok with that but it is blanketing it so all calls etc are changed, I would like to be able to have dial plans that can handle multiple outputs based on what were sending to the Brekeke box, so calls from certain SIP ID's/Numbers ideally a range can display a different CLI to that of another set of SIP ID's/Numbers.
Please see the dial plan as it is at present, however the call just fails any advice on this would be greatly appreciatted.
Matching Patterns | $request = ^INVITE $addr = 1.1.1.1 $registered = false To = sip:(.+)@ From = sip:+441231234567@thespecifieddomain.com
|
Deploy Patterns | To = sip:%1@2.2.2.2 From = sip:+441111111111@1.1.1.1 $auth = false &net.sip.transport.follow.request = true
|
Thanks |
|
Back to top |
|
hope Brekeke Master Guru
Joined: 15 Jan 2008 Posts: 862
|
|
Back to top |
|
kevinb Brekeke Junior Member
Joined: 15 Feb 2012 Posts: 9
Location: United Kingdom
|
Posted: Wed Feb 15, 2012 2:26 pm Post subject: |
|
|
Thanks hope,
I will post the error message once I get back in the office, I have had a look at the alias section and it's not making much sense, if I for instance had a alias called "bob", where would that syntax sit in my previous plans as listed above and what would it look like as I'm really struggling with that bit, all I want to to is match the alias and send a cli based on it.
Also can you create an alias based on a range so for example the sip=+4412341234xxx would cover the all options in that range and then have an alias based on the next range of numbers example sip=+4412341235xxx..
I hope that makes sense. |
|
Back to top |
|
hope Brekeke Master Guru
Joined: 15 Jan 2008 Posts: 862
|
Posted: Wed Feb 15, 2012 4:34 pm Post subject: |
|
|
add \ before + in matching patterns From line
Matching Patterns | $request = ^INVITE $addr = 1.1.1.1 $registered = false To = sip:(.+)@ From = sip:\+441231234567@thespecifieddomain.com
|
Deploy Patterns | To = sip:%1@2.2.2.2 From = sip:+441111111111@1.1.1.1 $auth = false &net.sip.transport.follow.request = true
|
|
|
Back to top |
|
kevinb Brekeke Junior Member
Joined: 15 Feb 2012 Posts: 9
Location: United Kingdom
|
Posted: Thu Feb 16, 2012 2:26 am Post subject: |
|
|
hope,
Thanks for the prompt reply,
Does that mean then that in this case, if the originating SIP address matches from the "\" onwards, (the red text) it will follow the deployment pattern?
From=sip:\+441231234567@thespecifieddomain.com
If so is there a wildcard indicator you can put on the last 3 digits of the number, like below?
From=sip:\+441231234???@thespecifieddomain.com
I guess if thats the case you would need a dial plan that catches all, then another one for the specific pattern match? I'm a newbie to this so appreciatte your patience and your advice.
Thanks |
|
Back to top |
|
kevinb Brekeke Junior Member
Joined: 15 Feb 2012 Posts: 9
Location: United Kingdom
|
Posted: Thu Feb 16, 2012 2:37 am Post subject: |
|
|
would it be something like the below?
From=sip:\^+441231234[000-999]@thespecifieddomain.com |
|
Back to top |
|
kevinb Brekeke Junior Member
Joined: 15 Feb 2012 Posts: 9
Location: United Kingdom
|
Posted: Fri Feb 17, 2012 2:08 am Post subject: |
|
|
hope
I have managed to do this with some trial and error.
Thanks for your help though. |
|
Back to top |
|
hope Brekeke Master Guru
Joined: 15 Jan 2008 Posts: 862
|
Posted: Fri Feb 17, 2012 3:49 pm Post subject: |
|
|
it is like
From = sip:\+441231234[0-9]{3}@xxx
you can test your regular expression from website below
http://rubular.com |
|
Back to top |
|
|