Routing, Error exit – Teletronics Enterprise SIP Server User Manual
Page 22

TELETRONICS INTERNATIONAL, INC.
21
Enterprise SIP Server Tutorial – Dial Plan
s-tut-dp1.51-041228
4. Routing
4.1. Setting the Destination SIP-URI
The callee’s SIP-URI can be changed in the To: header field. During a session, routing is based
on the SIP-URI shown in the To: header field.
4.1.1.
Setting the callee’s SIP-URI as “sip:user@domain” (when callee is a “user”)
Matching Patterns
Deploy Patterns
$request=^INVITE
to=sip:user@
to=sip:user@domain
4.1.2.
Setting the callee’s Domain as “gw2” (when the callee’s domain is “gw1”)
Matching Patterns
Deploy Patterns
$request=^INVITE
to=sip:(.+)@gw1[ >;]*
to=sip:%1@gw2
4.2. Setting the Destination Address
The callee’s address is set in the handling variable $target. Routing will occur to the address
set in the $target. When both $target and To: header field are set in the Deploy Patterns,
the value in $target will be used for routing.
4.2.1.
Setting the destination address as “pbx”. (all calls)
Matching Patterns
Deploy Patterns
$request=^INVITE
$target=pbx
4.2.2.
Setting the destination address as 192.168.0.2 . (When the callee isn’t
registered with the database)
Matching Patterns
Deploy Patterns
$request=^INVITE
$registered=false
$target=192.168.0.2
5. Error Exit
Responses for error exit are set in the handling variable $action. Depending on the value
$action is given, the relevant response code will be sent to the caller.
Examples of Response Codes_
400 = Bad Request
401 = Unauthorized
403 = Forbidden
404 = Not Found (destination cannot be found)
406 = Not Acceptable
486 = Busy Here (busy signal)
603 = Decline (refused, rejected)
5.2.1.
If a MESSAGE request is received, return the code 400 (bad request)
Matching Patterns
Deploy Patterns