Brekeke SIP Server Wiki

8. Specifying Environment Variables

The environment variable is for setting the server’s behavior, administrative information, various internal parameters.

To set an environment variable using the Dial Plan, please add the prefix ‘&’ before the variable name. The environment variable’s value set using the Dial Plan is valid only for the session the rule is applied.

 

Ex 1. Using G723 as the codec for all calls
Matching Patterns Deploy Patterns
$request = ^INVITE

&net.rtp.audio.payloadtype = 4

 

Ex 2. Not Appending Record-Route header if the callee’s name prefix is “9”
Matching Patterns Deploy Patterns
$request = ^INVITE
To = sip:9.+@
&net.sip.addreordroute = false

 

Ex 3. Not Adding lr parameter to Record-Route header if the callee’s host name is “host”
Matching Patterns Deploy Patterns
$request = ^INVITE
$geturi( To ) = @host
&net.sip.addreordroute.lr = false

Ex 4. Not Appending rport parameter to Via header if the callee’s host name is “host”
Matching Patterns Deploy Patterns
$request = ^INVITE
$geturi( To ) = @host
&net.sip.addrport = false

Ex 5. Setting the ringing timeout period to 30 seconds if the caller’s name is “admin”
Matching Patterns Deploy Patterns
$request = ^INVITE
From = sip:admin@
&net.sip.timeout.ringing = 30000

 

Ex 6. Using Upper Registration to “host.domain” if the caller’s name prefix is “9”
Matching Patterns Deploy Patterns
$request = ^REGISTER
From = sip:9.+@

&net.registrar.upper.allow = true
&net.registrar.upper.url = host.domain
$continue = true

 

Ex 7. Adjusting the following registration period as 100 seconds if the current period is less than 100 seconds
Matching Patterns Deploy Patterns
$request = ^REGISTER
Expires = ^[0-9].$
&net.registrar.adjust.expires=100
$continue = true

 

Ex 8. Not Using Thru Registration if the callee’s host name is “host”
Matching Patterns Deploy Patterns
$request = ^REGISTER
$geturi( To ) = @host
&net.registrar.thru.allow = false
$continue = true

 

 

Yes No
Suggest Edit