Dial plan how to add CLI prefix or replace with CLI from DB

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
wayne106
Posts: 34
Joined: Fri Jan 25, 2008 4:50 am

Dial plan how to add CLI prefix or replace with CLI from DB

Post by wayne106 »

Hello,
Running latest evaluation copy of BSS, we are looking to replace our existing asterix system with BSS.

On the dial plan there seems to be some detail missing from the help doc's I am trying to achieve the following:-
When user dials anything starting 0 I add a prefix and send it to our gateway. I need to change the CLI, I can hard code this but I would like to either prefix their CLI or ideally change it for user name (from the DB) or say, their description or email from the DB
is this possible? heres what I have:-

$request=^INVITE
To=sip:(0.+)@

To=sip:123456%1@1.2.3.4

I tried From=207456%1<sip:207456%1>

But this added the called number not the calling number.
%1 is not documented anywhere other than its used in dial plan examples so it maybe me being thick but can someone explain the relationship of %1 and what it contains?

Thanks!

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

Post by hope »

Hi,

Here is the link of dial plan syntax
http://www.brekeke-sip.com/download/bss ... min_en.pdf
from page 35 to 60, maybe it's useful to you.

for the "%1", it refers to the numbers in the first parenthesis in the "TO" of the matching patterns.

And in your matching patterns, maybe you need to put the prefix "0" outside the parenthesis, then dial plan can match the dialed number starting with "0"
such as, To=sip:0(.+)@

Good Luck
wayne106
Posts: 34
Joined: Fri Jan 25, 2008 4:50 am

Thanks

Post by wayne106 »

That worked, missed that document before, do you know if there is anyway to extract a CLI from the DB for that user and replace the From: with the DB value?

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

Post by hope »

Hi,

I'm not sure what's your exact action.
Could you give more details, if possible?

there is a link about "how to work with 3rd party DB"

http://www.brekeke-sip.com/download/bss ... ase_en.pdf

hope it can give you some idea.
wayne106
Posts: 34
Joined: Fri Jan 25, 2008 4:50 am

Post by wayne106 »

Hello, thanks again for the reply, I will read that, been meaning to get round to it anyway.
What I am trying to do is this:-
When I create the user I create user:bob Pass:bob2 email: 123456789

When the user makes a call, they will authenticate as above, but their From: could be anything, including bob, I want to replace the From: header and replace it with the value in the email field, in this case 123456789.

The reason is because the call will then hit a bigger switch and authenticate them on their CLI/ANI so its important thats it valid, and that they cannot change it to , say another customers CLI/ANI I know you can change the From: field but can you replace it with the value in the DB?

Wayne
Mohney
Posts: 79
Joined: Tue Nov 20, 2007 12:05 pm

Post by Mohney »

Hi Wayne

Use "$replaceuri = true" in the Deploy Patterns.
wayne106
Posts: 34
Joined: Fri Jan 25, 2008 4:50 am

Post by wayne106 »

Hi Mohney, I will try this, for some reason I assumed it only replaced the IP part for NAT eg auth number 1234 from my nat endpoint is 1234@192.168.12.1 BSS replaces the IP with its ip before passing it on.

Thanks

Wayne
Post Reply