Route retry

From TBwiki
(Difference between revisions)
Jump to: navigation, search
(Route retry algorithm)
(Uniformize CAS R2 naming)
Line 39: Line 39:
 
   Alerted:  ACM
 
   Alerted:  ACM
 
   Answered: CONN/ANM
 
   Answered: CONN/ANM
  CASR2:
+
  CAS R2:
 
   Accepted: SeizureAckCasBit
 
   Accepted: SeizureAckCasBit
 
   Progress: <none>
 
   Progress: <none>

Revision as of 10:48, 13 December 2011

Contents

Route retry algorithm

The route retry feature applies when more than one matching route is returned by the active routing script. The route retry algorithm works the following way:

  • An outgoing call will be made based on the first matching route
  • If that outgoing call fails while there are other matching routes left, another outgoing call attempt is made using next matching route

A call attempt is considered failed in the following conditions:

  • Call is terminated with an error cause before it's answered
  • Timeout occurs before call reaches specified call state (this timeout is ignored when last matching route is attempted)

Route retry timeout can be customized using two parameters:

  • Timeout delay in seconds before retry with next route (value of 0 makes timeout never occur)
  • Minimum call state to reach before the specified timeout occurs:
    • Call accepted
    • Call progress received
    • Call alerted
    • Call answered

If the timeout delay is passed before the call reaches the specified state, call is considered failed and retry occurs. If the call reaches that state, timeout no longer apply.

The 4 states above correspond to the following protocol-specific events:

SIP:
 Accepted: 100 Trying
 Progress: 183 with SDP (*)
 Alerted:  180 Ringing
 Answered: 200 OK
ISDN:
 Accepted: CALL PROCEEDING
 Progress: PROG
 Alerted:  ALERTING
 Answered: CONNECT
SS7:
 Accepted: <none>
 Progress: CPG
 Alerted:  ACM
 Answered: CONN/ANM
CAS R2:
 Accepted: SeizureAckCasBit
 Progress: <none>
 Alerted:  GroupB SuccessDigit
 Answered: AnswerCasBit

(*) 183 with SDP is usually interpreted as a "ALERT" (not a PROGRESS) unless a quirk is enabled. The quirk is located in the configuration tabs "NAP -> Advanced" and is called "183 triggers call progress"

Route retry global configuration

These route retry timeout parameters can be configured globally, per NAP, or per Route. Per-route value has precedence on per-NAP value, which has precedence on global value.

The global route retry timeout parameters are found in the Gateway application configuration page in the Toolpack Web Portal:

  • Go to the Gateway->Configuration menu.
  • Click on the Edit link of the configuration you wish modify.
  • Expand the Advanced section
  • Change values of 'Route retry mode' and 'Route retry timeout'


Route retry per-NAP configuration

The per-NAP route retry timeout parameters are configured by adding a custom 'NAP column':

  • Go to the Gateway->Configuration menu.
  • Click on the Edit link of the configuration you wish modify.
  • Click on Create New Nap Column in the Editing Naps section
    • In the Name text box, enter 'route_retry_mode'
    • In the Type attributes text box, enter '|accept|call_progress|alert|answer'
    • Leave the Default text box blank
  • Click Save
  • Click again on Create New Nap Column in the Editing Naps section
    • In the Name text box, enter 'route_retry_timeout'
    • In the Type attributes text box, enter 'integer'
    • Leave the Default text box blank
  • Click Save

Now that these columns have been created, each time you create or edit a NAP, route retry mode and timeout will be shown under Custom Params. Leaving empty value for a NAP will make global value to be used. Assigning a value in either of these parameters will override the global value for that parameter.


Route retry per-route configuration

The per-route route retry timeout parameters are configured by adding a custom 'Route column':

  • Go to the Gateway->Configuration menu.
  • Click on the Edit link of the configuration you wish modify.
  • Click on Create New Route Column in the Editing Routes section
    • In the Name text box, enter 'route_retry_mode'
    • In the Type attributes text box, enter '|accept|call_progress|alert|answer'
    • Leave the Default text box blank
  • Click Save
  • Click again on Create New Route Column in the Editing Routes section
    • In the Name text box, enter 'route_retry_timeout'
    • In the Type attributes text box, enter 'integer'
    • Leave the Default text box blank
  • Click Save

Now that these columns have been created, each time you create or edit a route, route retry mode and timeout will be shown under Custom Params. Leaving empty value for a route will make NAP value used (or global value if NAP value is also empty). Assigning a value in either of these parameters will override the NAP or global value for that parameter.


Customize route retry parameters from routing script

Any part of the routing script that has access to the route can modify these parameters by reading and writing from/to:

  • route[:route_retry_mode]
  • route[:route_retry_timeout]

These fields initially contain value read from the added 'Custom Route Columns' (as explained above), but can be overwritten by the routing script.

Personal tools