Author |
Message |
wayne106 Brekeke Addict
Joined: 25 Jan 2008 Posts: 32
|
Posted: Fri Jan 25, 2008 4:59 am Post subject: Dial plan how to add CLI prefix or replace with CLI from DB |
|
|
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 |
|
Back to top |
|
hope Brekeke Master Guru
Joined: 15 Jan 2008 Posts: 862
|
Posted: Fri Jan 25, 2008 11:42 am Post subject: |
|
|
Hi,
Here is the link of dial plan syntax
http://www.brekeke-sip.com/download/bss/v2_1/sip_admin_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 |
|
Back to top |
|
wayne106 Brekeke Addict
Joined: 25 Jan 2008 Posts: 32
|
Posted: Mon Jan 28, 2008 8:29 am Post subject: Thanks |
|
|
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 |
|
Back to top |
|
hope Brekeke Master Guru
Joined: 15 Jan 2008 Posts: 862
|
|
Back to top |
|
wayne106 Brekeke Addict
Joined: 25 Jan 2008 Posts: 32
|
Posted: Tue Jan 29, 2008 12:44 pm Post subject: |
|
|
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 |
|
Back to top |
|
Mohney Brekeke Talented
Joined: 20 Nov 2007 Posts: 79
|
Posted: Fri Feb 01, 2008 11:52 am Post subject: |
|
|
Hi Wayne
Use "$replaceuri = true" in the Deploy Patterns. |
|
Back to top |
|
wayne106 Brekeke Addict
Joined: 25 Jan 2008 Posts: 32
|
Posted: Wed Feb 06, 2008 2:18 pm Post subject: |
|
|
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 |
|
Back to top |
|
|