Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
Dial Plan modifications
Author Message
PiotrOS
Brekeke Junior Member


Joined: 09 Apr 2015
Posts: 8

PostPosted: Tue May 12, 2015 9:40 am    Post subject: Dial Plan modifications Reply with quote

1. Brekeke Product Name and version: Brekeke SIP Server

2. Java version: 1.6.0_45

3. OS type and the version: Linux centos 6.6

4. UA (phone), gateway or other hardware/software involved: doesn't matter

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/networkpatterns.html : Pattern 9

6. Your problem:

For incoming Invite which contains RPID with privacy parameter copy value of privacy and add screen=yes, (and do else modifications)
For example

Incoming:
Remote-Party-ID: "33333" <sip:33333@xx.xx.xx.xx>;party=calling;privacy=name;screen=no

After Modifications should looks like:
Remote-Party-ID: "33333" <sip:33333@xx.xx.xx.xx>;privacy=name;screen=yes


For incoming Invite which contains RPID without privacy then copy nothing and add screen=yes, (and do else modifications)

For example
Incoming:
Remote-Party-ID: "33333" <sip:33333@xx.xx.xx.xx>;screen=no;party=calling

After Modifications should looks like:
Remote-Party-ID: "33333" <sip:33333@xx.xx.xx.xx>;screen=yes


I have such matching and deploy patterns - but it does not work if there is no privacy parameter...

Matching Patterns
$request = ^INVITE
$addr = ^10.10.10.10$
To = sip:111(.+)@
$exist( "Remote-Party-ID" ) = true
Remote-Party-ID = (.+)@(.+)>(.+)
$headerparam( Remote-Party-ID, "privacy" ) = (.*)
$if($str.equals($str.equals((.+),%5)),"privacy = %5","") = (.*)
$geturi(From) = (.+)@


Deploy Patterns
Remote-Party-ID = %2@10.10.10.11>;%6;screen=yes
_Remote-Party-ID = "%2" <sip:%2@10.10.10.11>%4;screen=yes
To = %1@10.10.10.12
From = %7@10.10.10.11
User-Agent = HV
$replaceuri = true


Thanks in advance for any hint.
Back to top
View user's profile
snuyzm
Brekeke Talented


Joined: 11 Feb 2015
Posts: 97

PostPosted: Tue May 12, 2015 11:05 pm    Post subject: Reply with quote

You may need 2 rules.

Rule-1: with privacy
Matching Patterns
$request = ^INVITE
$headerParam(Remote-Party-ID,"privacy") = (.+)
$headerParam(Remote-Party-ID,"screen") = no
$headerParam(Remote-Party-ID,"party") = calling
Remote-Party-ID = ^(.+);
Deploy Patterns
Remote-Party-ID = %2;privacy=%1;screen=yes


Rule-2: without privacy
Matching Patterns
$request = ^INVITE
$str.contain(Remote-Party-ID,"privacy") = false
$headerParam(Remote-Party-ID,"screen") = no
$headerParam(Remote-Party-ID,"party") = calling
Remote-Party-ID = ^(.+);
Deploy Patterns
Remote-Party-ID = %2;screen=yes
Back to top
View user's profile
PiotrOS
Brekeke Junior Member


Joined: 09 Apr 2015
Posts: 8

PostPosted: Wed May 13, 2015 12:59 am    Post subject: Reply with quote

Hi snuzym, thanks.
I could not find Function 'str.contain' in Brekeke SIP Server Administrator’s Guide, I will check yours rules and let know
Back to top
View user's profile
snuyzm
Brekeke Talented


Joined: 11 Feb 2015
Posts: 97

PostPosted: Wed May 13, 2015 11:10 am    Post subject: Reply with quote

http://wiki.brekeke.com/wiki/DialPlan-Matching-str-contain
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1