Author |
Message |
Izzyg Brekeke Talented
Joined: 25 Jun 2013 Posts: 91
Location: Sip Land
|
Posted: Sun Jul 13, 2014 4:39 pm Post subject: Dial Plan assistance / understanding |
|
|
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
|
|
|
Back to top |
|
Tata Brekeke Master Guru
Joined: 27 Jan 2008 Posts: 223
|
Posted: Mon Jul 14, 2014 11:44 am Post subject: |
|
|
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. |
|
Back to top |
|
Tata Brekeke Master Guru
Joined: 27 Jan 2008 Posts: 223
|
Posted: Mon Jul 14, 2014 11:47 am Post subject: |
|
|
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... |
|
Back to top |
|
Izzyg Brekeke Talented
Joined: 25 Jun 2013 Posts: 91
Location: Sip Land
|
Posted: Wed Jul 16, 2014 3:07 pm Post subject: |
|
|
Thanks!!!!
how can i also change that the "From" field should be formatted in E164 format ? |
|
Back to top |
|
Tata Brekeke Master Guru
Joined: 27 Jan 2008 Posts: 223
|
Posted: Wed Jul 16, 2014 6:59 pm Post subject: |
|
|
any example? |
|
Back to top |
|
Izzyg Brekeke Talented
Joined: 25 Jun 2013 Posts: 91
Location: Sip Land
|
Posted: Thu Jul 17, 2014 10:29 am Post subject: |
|
|
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 |
|
Back to top |
|
Tata Brekeke Master Guru
Joined: 27 Jan 2008 Posts: 223
|
Posted: Tue Jul 22, 2014 12:57 am Post subject: |
|
|
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? |
|
Back to top |
|
Izzyg Brekeke Talented
Joined: 25 Jun 2013 Posts: 91
Location: Sip Land
|
|
Back to top |
|
Laurie Brekeke Master Guru
Joined: 07 Jan 2008 Posts: 245
|
Posted: Wed Jul 23, 2014 5:13 pm Post subject: |
|
|
These links require an account for reading the contents...
Can you summarize them? |
|
Back to top |
|
Izzyg Brekeke Talented
Joined: 25 Jun 2013 Posts: 91
Location: Sip Land
|
Posted: Thu Jul 24, 2014 5:11 am Post subject: |
|
|
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. |
|
Back to top |
|
ambrosio Brekeke Master Guru
Joined: 27 Mar 2008 Posts: 215
|
Posted: Thu Jul 24, 2014 3:59 pm Post subject: |
|
|
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". |
|
Back to top |
|
Izzyg Brekeke Talented
Joined: 25 Jun 2013 Posts: 91
Location: Sip Land
|
Posted: Thu Jul 24, 2014 8:02 pm Post subject: |
|
|
i dont want it to be name, i want to use the value that came in on the matching side |
|
Back to top |
|
ambrosio Brekeke Master Guru
Joined: 27 Mar 2008 Posts: 215
|
Posted: Fri Jul 25, 2014 1:19 pm Post subject: |
|
|
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)} |
|
Back to top |
|
Izzyg Brekeke Talented
Joined: 25 Jun 2013 Posts: 91
Location: Sip Land
|
Posted: Fri Jul 25, 2014 4:28 pm Post subject: |
|
|
is this also for Version 2? |
|
Back to top |
|
ambrosio Brekeke Master Guru
Joined: 27 Mar 2008 Posts: 215
|
Posted: Fri Jul 25, 2014 10:20 pm Post subject: |
|
|
They are also for ver3 only. |
|
Back to top |
|
|