Dial Plan assistance / understanding

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
Izzyg
Posts: 91
Joined: Tue Jun 25, 2013 1:14 pm
Location: Sip Land

Dial Plan assistance / understanding

Post by Izzyg »

1. Brekeke Product Name and Version:
Brekeke SIP Server 2.4.8.6/286.3

2. Java version:
1.6.0_45

3. OS type and the version:
Windows Server 2008 R2

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

5. Your problem:
understanding dial plan


Below are 2 dial plans, can anyone tell me what is the difference in them ? i see visually a different, but i dont understand the logic behind it

the first one didnt work for me, so i was hacking around and using the 2nd one now works

anyone able to help me, i would appriciate it alot







Matching Patterns:
$request=^INVITE
From=sip:.+@sip1.name.com
Remote-Party-ID=(.+)@
To=sip:(.+)@
$getUri(From)=@(.+)
$addr=10.0.0.156


Deploy Patterns:
$auth=false
From=%1@%3
To=sip:%2@192.168.1.110
$session=failover sip:%2@192.168.1.110 sip:%2@192.168.1.111
&failover.timer.inviting=5
&failover.timer.provisional=360
$continue=false


and this is the 2nd version of this dial plan


Matching Patterns:
$request=^INVITE
From=sip:(.+)@sip1.name.com
To=sip:(.+)@
$getUri(From)=@(.+)
$addr=10.0.0.156|11.0.0.156


Deploy Patterns:
$auth=false
From=%1@%3
P-Asserted-Identity=%1@%3
To=sip:%2@192.168.1.110
$session=failover sip:%2@192.168.1.110 sip:%2@192.168.1.111
&failover.timer.inviting=5
&failover.timer.provisional=360
$continue=false
Tata
Posts: 223
Joined: Sun Jan 27, 2008 1:03 pm

Post by Tata »

The first one has the following definition in the Matching Patterns.
Remote-Party-ID = (.+)@

It means that "Remote-Party-ID" header is required in INVITE to hit the DialPlan.
Depends on SIP client or SIP trunk, INVITE will not have "Remote-Party-ID" header.


The second one doesn't require "Remote-Party-ID" header.
So.. it will match any kind of INVITE packets.
Tata
Posts: 223
Joined: Sun Jan 27, 2008 1:03 pm

Post by Tata »

The second one can be simplified as the following.

[Matching Patterns]
$request = ^INVITE
$getUri(From) = sip:(.+@sip1.name.com)
To = sip:(.+)@
$addr = ^10.0.0.156$|^11.0.0.156$

[Deploy Patterns]
$auth = false
From = sip:%1
P-Asserted-Identity = sip:%1
To = sip:%2@192.168.1.110
$session = failover sip:%2@192.168.1.110 sip:%2@192.168.1.111
&failover.timer.inviting = 5
&failover.timer.provisional = 360
$continue = false


You need ^ in the front of IP address at $addr.
$addr = 10.0.0.156|11.0.0.156 will match 110.0.0.156, 111.0.0.156, 210.0.0.156 and 211.0.0.156...
Izzyg
Posts: 91
Joined: Tue Jun 25, 2013 1:14 pm
Location: Sip Land

Post by Izzyg »

Thanks!!!!

how can i also change that the "From" field should be formatted in E164 format ?
Tata
Posts: 223
Joined: Sun Jan 27, 2008 1:03 pm

Post by Tata »

any example?
Izzyg
Posts: 91
Joined: Tue Jun 25, 2013 1:14 pm
Location: Sip Land

Post by Izzyg »

Matching Patterns:

$request=^INVITE
To=sip:(.+)@
From=sip:(.+)@
$addr=10.0.0.1

Deploy Patterns:

$auth=false
P-Asserted-Identity=sip:%2@ourdomain.com;user=phone
From="%2" <sip:%2@ourdomain.com;user=phone>
To=sip:%1@72.0.0.1
$continue=false


in the Deploy i want to format it to E164
Tata
Posts: 223
Joined: Sun Jan 27, 2008 1:03 pm

Post by Tata »

It is not example. It is your current DialPlan rule.


For example...
If From-number is 1234567890, E164 expression is 123-456-7890.
Is it what you want?

Have you read the DialPlan tutorial?
Izzyg
Posts: 91
Joined: Tue Jun 25, 2013 1:14 pm
Location: Sip Land

Post by Izzyg »

I need to follow this instructions, and i need help how to implement it

https://support.vampcommunications.com/ ... nformation

also this one

https://support.vampcommunications.com/ ... E-examples


if anyone is able to help me how to setup my dial plan, i would really appreciate it
Laurie
Posts: 246
Joined: Mon Jan 07, 2008 12:25 pm

Post by Laurie »

These links require an account for reading the contents...

Can you summarize them?
Izzyg
Posts: 91
Joined: Tue Jun 25, 2013 1:14 pm
Location: Sip Land

Post by Izzyg »

Caller ID / Privacy Header Information

Q. When sending calls through SIPRotues, is it necessary for our system to include the P-Asserted-Identity or Remote-Party-ID fields in the header of the INVITE?

A. These fields are not required. If you do not pass one of these, we will automatically populate the appropriate header with your FROM header information depending on what the upstream carrier wants. However if you wish to control privacy you would use either Remote-Party-ID or P-Asserted-Identity. We prefer you to send P-Asserted-Identity. See below for formatting.


Q: How can I block caller id?

A: To block caller ID you would add one of the following headers (change to match your originating ANI). The privacy header tells the far end to mask caller ID.

(E.164 format or 10 digits required, do NOT use 11 digits)(we prefer P-Asserted-Identity and so do our carriers) (PAI takes presidence over Remote-Party-ID)

P-Asserted-Identity: "Sheldon Cooper" <sip:+12125551212@4.4.4.4>
Privacy: id

or

Remote-Party-ID: “Sheldon Cooper” <sip:+19195551212@4.4.4.4>;party=calling;screen=yes;privacy=full

You can NOT relay privacy by only sending a From header.

From: "Sheldon Cooper" <sip:+12125551212@4.4.4.4>

If you would like to review the RFC on this please visit this link:
http://www.ietf.org/rfc/rfc3325.txt



Additional INFO:

Some carriers WILL pass along the "UNKNOWN" field in a FROM/Remote-Party-Id/P-Asserted-Id header. Therefore it is recommended that you NOT put UNKNOWN in any of these headers. Standard procedure is for the terminating carrier to dip the ANI and provide the correct name, however, some carrier switches view the "UNKNOWN" as a privacy attempt and pass it along or do not terminate the call.

Example of what NOT to do:

From: "Unknown" sip:+19198900000@72.15.219.140;user=phone
Remote-Party-Id: "Unknown" sip:+19198900000@72.15.219.140;user=phone
P-Asserted-Identity: "Unknown" sip:+19198900000@72.15.219.140;user=phone

Example of what TO

From: "name" sip:+19198900000@72.15.219.140;user=phone
Remote-Party-Id: "name" sip:+19198900000@72.15.219.140;user=phone
P-Asserted-Identity: "name" sip:+19198900000@72.15.219.140;user=phone


















INVITE examples

Example 2: sending 11 digits, E.164, no prefix
INVITE sip:+19198900000@72.15.219.140 SIP/2.0.
Via: SIP/2.0/UDP xxx.xxx.xxx.xxx:5060;branch=z9hG4bK22f387ce;rport.
From: "SIPRoutes" <sip:9198900000@xxx.xxx.xxx.xxx>;tag=as08310909.
To: <sip:19198900000@72.15.219.140>.
Contact: <sip:9198900000@xxx.xxx.xxx.xxx>.
Call-ID: 1ea01a2f16e135cd1e6cacaf5e79202a@xxx.xxx.xxx.xxx.
CSeq: 102 INVITE.
User-Agent: Vamp UAC.
Max-Forwards: 70.
Date: Wed, 25 Apr 2012 16:14:16 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY.
Content-Type: application/sdp.
Content-Length: 240.
.
v=0.
o=root 3226 3226 IN IP4 xxx.xxx.xxx.xxx.
s=session.
c=IN IP4 xxx.xxx.xxx.xxx.
t=0 0.
m=audio 11444 RTP/AVP 0 18 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:18 G729/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.
a=sendrecv.
ambrosio
Posts: 215
Joined: Thu Mar 27, 2008 12:20 pm

Post by ambrosio »

so... what do you want?


> Example of what NOT to do:
> From: "Unknown" sip:+19198900000@72.15.219.140;user=phone

> Example of what TO
> From: "name" sip:+19198900000@72.15.219.140;user=phone

Try the following definition in the Deploy Pattern.
From/displayname = "name"

It replaces the From-header's display name with "name".
Izzyg
Posts: 91
Joined: Tue Jun 25, 2013 1:14 pm
Location: Sip Land

Post by Izzyg »

i dont want it to be name, i want to use the value that came in on the matching side
ambrosio
Posts: 215
Joined: Thu Mar 27, 2008 12:20 pm

Post by ambrosio »

To get the original displayname from the From header in Matching Pattern.
$getdisplayname( From ) = (.+)


To set the displayname in From header in Deploy Pattern
From/displayname = %1


It can be one line like the following.
From/displayname = %{$getdisplayname(From)}
Izzyg
Posts: 91
Joined: Tue Jun 25, 2013 1:14 pm
Location: Sip Land

Post by Izzyg »

is this also for Version 2?
ambrosio
Posts: 215
Joined: Thu Mar 27, 2008 12:20 pm

Post by ambrosio »

They are also for ver3 only.
Post Reply