Dial Plan modifications

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
PiotrOS
Posts: 8
Joined: Thu Apr 09, 2015 2:02 am

Dial Plan modifications

Post by PiotrOS »

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/ ... terns.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.
snuyzm
Posts: 97
Joined: Wed Feb 11, 2015 10:12 pm

Post by snuyzm »

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
---------------------
PiotrOS
Posts: 8
Joined: Thu Apr 09, 2015 2:02 am

Post by PiotrOS »

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
snuyzm
Posts: 97
Joined: Wed Feb 11, 2015 10:12 pm

Post by snuyzm »

Post Reply