Adding prefix 1 to RPID (Remote Party ID)

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
Vincent
Posts: 25
Joined: Thu Aug 27, 2009 9:53 am

Adding prefix 1 to RPID (Remote Party ID)

Post by Vincent »

1. Brekeke Product Name and Version:Bpbx 2.4.9.0

2. Java version:5.1

3. OS type and the version:Window 2008 Server

4. UA (phone), gateway or other hardware/software involved:Cisco,Grandstream and Yealink IP Phone

5. Your problem:
I'd like to add prefix 1 to a registered user ID before sending the call to our ITSP.

I'd prefer to send this call through the SIP server and not pbx.

Our system supports a maximum of 10 digits user id but we'd like to pass 11 digits to our ITSP.

I've tried adding prefix 1 to the Deploy pattern as indicated in the below dial plans but each time I call,it rings twice and disconnects.It seems our ITSP is rejecting the call/s.

(1)
[Matching Pattern]
$Request = ^INVITE
To:sip:(.+)@

[Deploy pattern]
$auth = false
To:sip:+1%1@ITSP ip
continue = false

(2)

[Matching Pattern]
$Request = ^INVITE
To:sip:(.+)@

[Deploy pattern]
$auth = false
To:sip:1%1@ITSP ip
continue = false

(3)

[Matching Pattern]
$Request = ^INVITE
To:sip:(.+)@

[Deploy pattern]
$auth = false
To:sip:001%1@ITSP ip
continue = false


I'd appreciate any information that could nudge me in the right direction.

Thanks,
Vincent.
Last edited by Vincent on Tue Jan 22, 2013 4:38 am, edited 1 time in total.
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

put these dial plan rules on top of default pbx dial plan rules
and donot need $continue = false

if all three dial plan rules are enabled and put in the order shown
the first dial plan rule will apply to all calls and send number +1+dialed numbers to itsp ip

capture packets and what response sent back from itsp
janP
Posts: 336
Joined: Sun Nov 25, 2007 2:55 pm

Post by janP »

Vincent.
Do you want to add the prefix in the callee number?

which SIP response code does the ITSP return for the rejecting?
Vincent
Posts: 25
Joined: Thu Aug 27, 2009 9:53 am

Post by Vincent »

Hope:

I want to send the call through the SIP server.What I'm trying to do is to pass CLI (Caller ID) to our ITSP.

The Caller ID in this case is the registered user account number. Right now we're successfully passing 10 digit CLI but our clients are requesting for 11 digits and our account factory (system) can only generate a maximum of 10 digit account number so we have to pass the remaining one digit through a dial plan.

Thanks.
Vincent
Posts: 25
Joined: Thu Aug 27, 2009 9:53 am

Post by Vincent »

JanP:

I'm trying to pass CLI (Caller ID) to our ITSP.

The Caller ID in this case is the registered user account number. Right now we're successfully passing 10 digit CLI but our clients are requesting for 11 digits and our account factory (system) can only generate a maximum of 10 digit account number so we have to pass the remaining one digit through a dial plan.

which SIP response code does the ITSP return for the rejecting? 404

404 is being returned because +1 is prefixed to the dialed number.

I want +1 to be placed in front of the registered user account number.Example this is the user account number 9865431243 and I
want to add +1 in front of the account number.

We're sending the call this way now 9865431234 (10 digit account number)
But I want to send it this way +19865431234 (11 digit)

Thanks.
Vincent
Posts: 25
Joined: Thu Aug 27, 2009 9:53 am

Post by Vincent »

Hi Hope and JanP,

I guess the User ID is appended in the "From" header. If that's true,how about this dial plan?

[Matching Pattern]
$Request = ^INVITE
From:sip:11(.+)@
To:sip:(.+)@

[Deploy pattern]
$auth = false
From:sip:%1@
To:sip:+1%2@ITSP ip
continue = false

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

Post by hope »

try dial plan rule below:

[Matching Pattern]
$request = ^INVITE
From = sip:11(.+)@
To = sip:(.+)@

[Deploy pattern]
$auth = false
From = sip:+1%1@
To = sip:%2@ITSP ip

with above dial plan, if a user registered at brekeke such as 112223333
and this user dial to 4445555

brekeke will send call with From number +12223333 and To number 4445555

is this what you need?
Vincent
Posts: 25
Joined: Thu Aug 27, 2009 9:53 am

Post by Vincent »

Hope:

Matching Patterns
$request = ^INVITE
From = sip:11(.+)@
To = sip:(.+)@

Deploy Patterns
$auth = false
From = sip:+1%1@
To = sip:%2@ITSP ip

with the above dial plan, if a user registered at brekeke such as 112223333
and this user dial to 4445555

brekeke will send call with From number +12223333 and To number 4445555

is this what you need? Yes that's what I want but Brekeke is adding the +1 to the dialed number +144455555 instead of the User Id.

I also tried placing the +1 in the To header of the Deploy pattern like this:
Deploy Patterns
$auth = false
From = sip:%1@
To = sip:+1%2@ITSP ip

and with this I got the call status showing provisioning.It stays in provisioning for a while and disconnects with no response message.

Do you have any more ideas on how I can tweak the dial plan to make it achieve the desired goal?

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

Post by hope »

do you need +1 added to caller number or destination number?
what is itsp_ip and can brekeke server reach itsp_ip (try ping to itst_ip)?
capture packet and check if there is invite sent from brekeke to itsp_IP
Vincent
Posts: 25
Joined: Thu Aug 27, 2009 9:53 am

Post by Vincent »

Hope:
Do you need +1 added to caller number or destination number?

Vincent:
I need +1 to be added to Caller number.
Example: if a user registered at Brekeke as 112223333
and this user dial to 4445555

Brekeke will send call with From number +12223333 and To number 4445555

is this what you need? Yes that's what I need.

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

Post by hope »

Matching Patterns
$request = ^INVITE
From = sip:11(.+)@
To = sip:(.+)@
Deploy Patterns
$auth = false
From = sip:+1%1@
To = sip:%2@ITSP ip
have you tried the dial plan rule above?
what is the result?
the order of the lines in rule matching / deploy patterns should be the same as shown above
Vincent
Posts: 25
Joined: Thu Aug 27, 2009 9:53 am

Post by Vincent »

Matching Patterns
$request = ^INVITE
From = sip:11(.+)@
To = sip:(.+)@

Deploy Patterns
$auth = false
From = sip:+1%1@
To = sip:%2@ITSP ip

With the above dial plan I get error 603.The reason is because +1 is placed in front of the dialed number.

However if I switch the To and From position like this:

Matching Patterns
$request = ^INVITE
To = sip:11(.+)@
From = sip:(.+)@

Deploy Patterns
$auth = false
To = sip:%1@ITSP
From = sip:+1%2@our server ip.

only + gets sent without 1.
Example: if a user registered at Brekeke as 2223333
and this user dials 4445555

I want Brekeke to send the call with From number +12223333 and To number 4445555

But now Brekeke is sending the call with From +2223333.

The problem now is that Brekeke is not adding 1 to the registered User number.
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

set following at advanced page and restart server

net.listener.loglevel.file=255
net.sip.loglevel.file=255

make call and check sv log for original From and To number
and From and To sent by brekeke and what rule applied to the call

http://wiki.brekeke.com/wiki/log-SIP-packets
Harold
Posts: 289
Joined: Sun Sep 21, 2008 10:31 pm
Location: Japan

Post by Harold »

Vincent,

From-header definition with the ending '@' is not allowed because it is not valid SIP-URI.

At first, disable all of current DialPlan rules.

Second, add the following DialPlan rule.

Matching Patterns
$request = ^INVITE
From = sip:(.+)@
To = sip:(.+)@

Deploy Patterns
From = sip:+1%1@<YOUR_SERVER_IP>
To = sip:%2@<ITSP_IP>
$auth = false

Replace <YOUR_SERVER_IP> and <ITSP_IP> with the actual IP addresses.
Vincent
Posts: 25
Joined: Thu Aug 27, 2009 9:53 am

Post by Vincent »

Hi Hope and Harold,

This dial plan works within our environment but not with our ITSP,so I guess our ITSP is not sending the CLI to the end point.I'll check with them and let you know,thanks.

Matching Patterns
$request = ^INVITE
To = sip:11(.+)@
From = sip:(.+)@

Deploy Patterns
$auth = false
To = sip:%1@<ITSP_IP>
From = sip:+1%2@<OUR_SERVER_IP>
Mr Tho
Posts: 25
Joined: Wed May 25, 2016 3:03 am

Post by Mr Tho »

Vincent wrote:Hi Hope and Harold,

This dial plan works within our environment but not with our ITSP,so I guess our ITSP is not sending the CLI to the end point.I'll check with them and let you know,thanks.

Matching Patterns
$request = ^INVITE
To = sip:11(.+)@
From = sip:(.+)@

Deploy Patterns
$auth = false
To = sip:%1@<ITSP_IP>
From = sip:+1%2@<OUR_SERVER_IP>
You can set in ARS in matting patterns, To field:
Post Reply