Brekeke SIP Server Wiki

Sample Dial Plan: Notify Incoming Call for Brekeke PBX

The first rule sends a push notification to the destination user which To-URI of an incoming INVITE indicates. The second rule waits for a REGISTER if the destination user is not yet listed in the Register database.

These rules have to be located prior to “From PBX” which is one of the default Dial Plan rule.

 

Rule: PBX Send Notification (sample 1)

Send SIP User as PN message

---------------------------------------------
[Matching Patterns]
$pbx.src = ^true
$request = ^INVITE
$not($outbound) = (.+)
$pbx.page = (.*?),(.*)
$getSIPuser(To) = (.+)
$pn.user("%4") = true

[Deploy Patterns]
&pn.notify.user = %4
&pn.notify.message = Call from %{$getSIPuser(From)}
&pn.notify.pushtype = voip
$continue = true
---------------------------------------------

Note: On Brekeke PBX version 3.12 or later, PBX can send notification without this dialpan.

 

 

Rule: PBX Send Notification (sample 2)

Send display name as PN message. If no display name, send SIP User.

---------------------------------------------
[Matching Patterns]
$pbx.src = ^true
$request = ^INVITE
$not($outbound) = (.+)
$pbx.page = (.*?),(.*)
$getSIPuser(To) = (.+)
$pn.user("%4") = true
$getDisplayName(From) = (.*)
$if($str.equals("%5",""),$getSIPuser(From),"%5" ) = (.*)

[Deploy Patterns]
&pn.notify.user = %4
&pn.notify.message = Call from %6
&pn.notify.pushtype = voip
$continue = true
----------------------------------------------

 
 

Rule: PBX Wait REGISTER
---------------------------------------------
[Matching Patterns]
$pbx.src = ^true
$request = ^INVITE
$not($outbound) = (.+)
$registered = false
&pn.notify.user = (.+)
$pbx.page = (.*?),(.*)
$getSIPuser(To) = (.+)

[Deploy Patterns]
$wait4reg = %2
$auth = false
$continue = true
---------------------------------------------

Note: On Brekeke PBX version 3.12 or later, PBX can wait REGISTER without this dialpan.

 

See also:

Dial Plan Variables for Push Notification

Yes No
Suggest Edit