Control outbound SIP URI based on Inbound SIP URI

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
kevinb
Posts: 9
Joined: Wed Feb 15, 2012 2:10 am
Location: United Kingdom

Control outbound SIP URI based on Inbound SIP URI

Post by kevinb »

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/ ... terns.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 Pattern

$request=^INVITE
$addr=1.1.1.1
$registered=false
To=sip:(.+)@
From=sip:+441231234567@thespecifieddomain.com

Deploy Pattern

To=sip:%1@2.2.2.2
From=sip:+441111111111@1.1.1.1
$auth=false
&net.sip.transport.follow.request=true

Thanks
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

you can use alias
http://wiki.brekeke.com/wiki/How-to-use-Alias-function

what error response when making call with the dial plan rule?
kevinb
Posts: 9
Joined: Wed Feb 15, 2012 2:10 am
Location: United Kingdom

Post by kevinb »

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.
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

add \ before + in matching patterns From line

Matching Pattern

$request=^INVITE
$addr=1.1.1.1
$registered=false
To=sip:(.+)@
From=sip:\+441231234567@thespecifieddomain.com

Deploy Pattern

To=sip:%1@2.2.2.2
From=sip:+441111111111@1.1.1.1
$auth=false
&net.sip.transport.follow.request=true
kevinb
Posts: 9
Joined: Wed Feb 15, 2012 2:10 am
Location: United Kingdom

Post by kevinb »

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
kevinb
Posts: 9
Joined: Wed Feb 15, 2012 2:10 am
Location: United Kingdom

Post by kevinb »

would it be something like the below?

From=sip:\^+441231234[000-999]@thespecifieddomain.com
kevinb
Posts: 9
Joined: Wed Feb 15, 2012 2:10 am
Location: United Kingdom

Post by kevinb »

hope

I have managed to do this with some trial and error.

Thanks for your help though.
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

it is like
From = sip:\+441231234[0-9]{3}@xxx

you can test your regular expression from website below
http://rubular.com
Post Reply