Multiple destination codes

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
noiptel
Posts: 68
Joined: Mon Feb 22, 2010 9:24 pm
Location: USA

Multiple destination codes

Post by noiptel »

1. Brekeke Product Name and version: Advance

2. Java version:

3. OS type and the version:

4. UA (phone), gateway or other hardware/software involved:

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html :

6. Your problem: I would like for the below rule to only accept calls to codes 571234, 572345, 573456,574567and 578567

How can I add all these codes to the below $geturi(to) rule?

Matching:
$request=^INVITE
$geturi(to)=sip:9085(57xxxx.+)@(.+)

$auth=false
To=sip:9590%1@10.10.100.10:5061
$continue=false

Thanking you in advance
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

Matching:
$request=^INVITE
$geturi(to)=sip:908557(1234|3456|5678|4567)(.+)@(.+)

Deploy
$auth=false
To=sip:959057%1%2@10.10.100.10:5061

or use alias if need to check more numbers

http://wiki.brekeke.com/wiki/How-to-use-Alias-function
noiptel
Posts: 68
Joined: Mon Feb 22, 2010 9:24 pm
Location: USA

Post by noiptel »

Thank you Hope.

Actually, I would like to use the $alias.lookup function as we now have about 14,000 codes that we are able to terminate calls to.

I have added all 14,000 codes to the Alias database and have added the below (draft) rule.

Matching:
$request=^INVITE
$geturi(to)=sip:90855(57.+)@(.+)
$alias.lookup(??)=(.+)

Deploy:
$auth=false
To=sip:9590%1@10.10.100.10:5061
$continue=false

The calls sent by Customer have a total of 16 digits including the tech prefix and Country code. The list of 14K codes are code breakouts with 12 to 14 dgits. I like would for every call that we receive to check if it matches a code in the Alias Database. If the first 12 to 14 digits of the Customer call matchs a code in the Alias Database then call can be Deployed otherwise a sip cc 503 will be returned to Customer.

Ex.
call sent by Customer 12345678901234567

1234 is the tech prefix
567 is country code
8901234567 is the DID where call is going to

Alias Database sample codes:
123456789012
12345678902341
123456789021
123456789123
........

The rule must match the call sent by Customer with Ailas code 123456789012

Please let me know if you have any questions.

Thanking you in advance.
noiptel
Posts: 68
Joined: Mon Feb 22, 2010 9:24 pm
Location: USA

Post by noiptel »

I would like to clarify my previous post, and see if someone can help me with this. What we want is to allow only numbers that start with the codes loaded in the alias database. For instance if all numbers start with 567, we have to lookup for the next 6 or 7 digits for a match.

The rule example below works only if I add the whole dialed number match in the alias database as shown.

Matching:
$request=^INVITE
To=sip:1234(567.+)@
$alias.lookup("%1")=(.+)

Deploy:
$auth=false
To=sip:8910%1@10.10.100.10
$continue=false

Alias Name: 567123456789
Group ID: [Blank]
Entity: 9999

How could we set the rule to look up only for the first 9 or 10 digits of the dialed number? I have tried "$alias.lookup("%1.+") and did not work.
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

how about following dial plan rule

Matching:
$request=^INVITE
To=sip:1234(567)(.+)@
$alias.lookup("%2")=9999

Deploy:
$auth=false
To=sip:8910%1%2@10.10.100.10
$continue=false
noiptel
Posts: 68
Joined: Mon Feb 22, 2010 9:24 pm
Location: USA

Post by noiptel »

Hope,

The rule you proposed didn't work for us because we would have to add the whole end of the number to the alias database instead of just the 6 or 7 digits in the middle of the number that we want to check; however using your same idea I was able to make it work with the two rules below, now the alias database can have 6 and 7 digits codes indistinctly.

Thank you for your help.

RULE#1:
Matching:
$request=^INVITE
To=sip:1234567(.......)(.+)@
$alias.lookup("%1")=9999

Deploy:
$auth=false
To=sip:8910567%1%2@10.10.100.10
$continue=true


RULE#2
Matching:
$request=^INVITE
To=sip:1234567(......)(.+)@
$alias.lookup("%1")=9999

Deploy:
$auth=false
To=sip:8910567%1%2@10.10.100.10
$continue=false
Post Reply