brekeke_sip_server_tutorial_dialplan_en

  • 格式:pdf
  • 大小:297.91 KB
  • 文档页数:22

Brekeke SIP ServerVersion 2.0Dial Plan TutorialBrekeke Software, Inc.1.INTRODUCTION (6)2.ROUTING (6)2.1.Routing Setting by the Destination SIP URI (7)Ex 1Routing all calls to sip:user@host (7)Ex 2Routing a call to sip:user@host if the callee’s name is "admin" (7)Ex 3Routing a call to sip:user@host if the callee’s SIP URI is sip:admin@server (7)Ex 4Routing a call to “host” with the same username if the callee's name prefix is "9" (7)Ex 5Routing a call to "host" without the prefix if the callee's name prefix is "9" (8)Ex 6Routing a call to "host" with the prefix "8" if the callee's name prefix is "9" (8)Ex 7Routing a call to sip:user@host if the callee isn't registered (8)Ex 8Routing a call to sip:user@host if the caller's name is "admin" (8)Ex 9Routing a call to sip:user@host if the caller isn't registered (8)Ex 10Routing a call to sip:user@host if the call is from 192.168.0.1 (8)2.2.Routing Setting by the Destination User Name (9)Ex 11Routing a call to the user "user" if the user is registered (9)Ex 12Routing a call to the user "user" if the callee isn't registered (9)Ex 13Routing a call to the user who was registered as the callee's name with the prefix “9” (9)Ex 14Routing a call to the user "user" from 10:00AM to 5:59PM (9)Ex 15Routing a call to the user "user" from December 12 to December 19 (9)2.3.Routing Setting by the Destination IP Address or FQDN (10)Ex 16Routing a call to "server" if the callee's host name is "host" (10)Ex 17Routing a call to "host.domain" if the call is from 192.168.0.1 (10)Ex 18Routing a call to "host.domain" if the call is from the localhost (10)Ex 19Routing a call to 192.168.0.100 if the call is from the port number 15060 (10)Ex 20Routing a call to 192.168.0.100 if the request method is SUBSCRIBE (10)3.REJECTING (11)Ex 21Returning a "603 Decline" response if the callee isn't registered (11)Ex 22Returning a "486 Busy" response if the callee's SIP URI is sip:user@host (11)Ex 23Returning a "402 Payment Required" response if the callee's name prefix is "9" (11)Ex 24Returning a "404 Not Found" response if the caller's name is "user" (11)Ex 25Returning a "403 Forbidden" response if the call is from an IP address with the prefix "192.168" 12Ex 26Returning a "406 Not Acceptable" response if the Content-Type header is "application/text".12Ex 27Returning a "503 Service Unavailable" response if the User-Agent header contains "TEST" (12)Ex 28Returning a "483 Too Many Hops" response if the Max-Forwards' value is 5 or less (12)Ex 29Returning a "480 Temporarily Unavailable" response from 0:00AM to 7:59AM (12)Ex 30Returning a "400 Bad Request" response if the request method is SUBSCRIBE (12)4.EDITING SIP HEADERS (13)4.1.Replacing an Existing SIP Header (13)Ex 31Changing the caller's display name to "Ted" if his/her user name is "admin" (13)Ex 32Changing the Expires's value to 200 if it is less than 200 (13)Ex 33Replacing the User-Agent's value to contain "Beta" if it contains "Alpha" (13)4.2.Appending SIP Header (14)Ex 34Appending new header "X-Example" (14)4.3.Deleting SIP Header (14)Ex 35Deleting the User-Agent header (14)5.AUTHENTICATION (14)Ex 36Requiring Authentication if the callee's domain name is "host.domain" (14)Ex 37Not Requiring Authentication if the callee's name prefix is "800" (15)Ex 38Requiring Authentication if the caller isn't registered (15)Ex 39Requiring Authentication if the call is from an IP address with the prefix "192.168.10" (15)Ex 40Not Requiring Authentication from 10:00AM to 5:59PM (15)6.LOAD BALANCING (16)Ex 41Load Balancing by switching 3 destinations every second (16)Ex 42Load Balancing by switching 2 destinations every 30 minutes (16)Ex 43Load Balancing based on whether the Session ID is odd or even (16)7.NAT TRAVERSAL (17)7.1.Setting NAT Traversal ON/OFF (17)Ex 44Enabling NAT Traversal if the callee's domain name is "host.domain" (17)Ex 45Disabling NAT Traversal if the call is from 192.168.0.1 (17)7.2.Specifying the Interface Address (18)Ex 46Using "192.168.1.1" as the interface address if the prefix of callee's contact address is "192.168.1" (18)Ex 47Using "192.168.2.1" as the interface address if the call is from an IP address with the prefix "192.168.2" (18)8.RTP RELAY (19)Ex 48Enabling RTP Relay if the callee's name prefix is "9" (19)Ex 49Enabling RTP Relay and using PCMA as the codec if the callee's SIP URI is sip:user@host..19 Ex 50Enabling RTP Relay and assigning the range of ports from 10000 to 10100 if the is call from 192.168.0.1 (20)9.SPECIFYING ENVIRONMENT VARIABLES (20)Ex 51Using G723 as the codec for all calls (20)Ex 52Not Appending Record-Route header if the callee's name prefix is "9" (20)Ex 53Not Adding lr parameter to Record-Route header if the callee's host name is "host" (20)Ex 54Not Appending rport parameter to Via header if the callee's host name is "host" (21)Ex 55Setting the ringing timeout period to 30 seconds if the caller's name is "admin" (21)Ex 56Using Upper Registration to "host.domain" if the caller's name prefix is "9" (21)Ex 57Adjusting the following registration period as 100 seconds if the current period is less than 100 seconds 21Ex 58Not Using Thru Registration if the callee's host name is "host" (21)ING SESSION PLUG-IN (22)Ex 59Using "RadiusAcct" plug-in for all calls (22)Ex 60Using "CDRlog" plug-in if the callee's host name is "host" (22)1. IntroductionThis document introduces various samples of Brekeke SIP Server Dial Plan rules. For the basics of Dial Plan, syntaxes, and how to set dial plan rules using the Brekeke SIP Server Admintool, refer to the “Brekeke SIP Server Administrator’s Guide, Section 6. Dial Plan”.The Dial Plan features explained in this document are as follows:• Routing• Rejecting•Editing SIP Headers• AuthenticationBalancing• LoadTraversal• NATRelay• RTP•Specifying Environment Variables•Using Session Plug-in2. RoutingRouting is the major feature of Dial Plan. There are three ways to define routing using Deploy Patterns. The routing setting will be enabled only when the corresponding conditions in Matching Patterns are fulfilled.To = destination SIP URIExample: To = sip:user@hostThe session will be routed to the “host”.To = destination user nameExample: To = sip:user@The session will be routed to the destination user’s contact address which wasregistered in the server’s register database when REGISTER request was sentfrom the user.。