Actions

Routing script tutorial:Mini Development Guide: Difference between revisions

(New page: == Call parameters == === Accept === The following call parameters are available in the call object: * calling * calling_noa * calling_npi * called * called_noa * called_npi * nap They c...)
 
No edit summary
 
(509 intermediate revisions by 22 users not shown)
Line 1: Line 1:
== Call parameters ==
{{DISPLAYTITLE:Routing Script Tutorial: Development Guide}}


=== Accept ===
The following call parameters are available in the call object:
* calling
* calling_noa
* calling_npi
* called
* called_noa
* called_npi
* nap


They can all be remapped if they are given to the accept method of the call object.
==Introduction==
This Routing Script Tutorial provides you with essential information in managing the routing of your calls. Consult the sections below to learn more.


=== Refuse ===
{| class="wikitable"
The following call parameters may be set in the refuse method of the call object:
* reason
Currently the only supported value is "no_route".


|[[File:NoteIcon.png|100px]]|| An alternate version of this guide for routing scripts is available. [[Routing script tutorial|Consult it to enhance your learning.]]
|}


== Route parameters ==
==Accessing Routing Script Parameters ==
All route may have these parameters:
[[Routing Script Tutorial: Accessing Routing Script Parameters|Learn how to access routing script parameters.]]
* calling
* called
* nap
* remapped_calling
* remapped_called
* remapped_nap
* remapped_profile


Additionnaly it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.
==Routing Script Parameter Mapping Table==
[[Routing Script Parameter Mapping Table|Learn how each Routing Script Parameter maps to varying protocols.]]


==Script Parameters Definition==
[[Routing Script Tutorial: Script Parameters Definition|Learn about the definition of each script parameter.]]


==Script Parameters Definition for SIP==
[[Routing Script Tutorial: Script Parameters Definition for SIP|Learn about the definition of each script parameter for SIP.]]


== Nap statuses ==
==Registered Users Information==
All the status fields of the NAPs are provided for use by the routing scripts. See the nap status provider for more details on which fields are available in the CEngineStatTransNap.hpp file.
[[Routing Script Tutorial: Registered Users Information|Learn how routing scripts access information about registered users.]]


'''Notice:''' These values may change between major release.
==Route Parameters and Call Routing==
  #define NAP_STATS_FIELDS \
[[Routing Script Tutorial: Route Parameters and Call Routing|Learn about the standard parameters used in a call and how they route to registered users.]]
    /* Field,                                szName,                            szDescription,                                        szOptions */ \
    ( SIGNALING_TYPE,                        "signaling_type",                  "Signaling type.",                                    "" ) \
    ( INCOMING_CALL_CNT,                      "inst_incoming_call_cnt",          "Instantaneous Count of incoming calls.",            "" ) \
    ( OUTGOING_CALL_CNT,                      "inst_outgoing_call_cnt",          "Instantaneous Count of outgoing calls.",            "" ) \
    ( AVAILABLE_CNT,                          "available_cnt",                  "Number of available circuits or channels.",          "" ) \
    ( UNAVAILABLE_CNT,                        "unavailable_cnt",                "Number of unavailable circuits or channels.",        "" ) \
    ( AVAILABILITY_PCT,                      "availability_percent",            "Percentage of available circuits or channels.",      "" ) \
    ( USAGE_PCT,                              "usage_percent",                  "Percentage of used circuits or channels.",          "" ) \
    ( TOTAL_INCOMING_CALL_CNT,                "total_incoming_call_cnt",        "Total Count of incoming calls.",                    "" ) \
    ( ASR_STRUCT,                            "asr_statistics_struct",          "Detailed Answer-Seizure Rate Statistics.",          "" ) \
      ( GLOBAL_ASR_PCT,                      "global_asr_percent",              "Global calculated ASR percentage.",                  "" ) \
      ( TOTAL_OUTGOING_CALL_CNT,              "total_outgoing_call_cnt",        "Total Count of outgoing calls.",                    "" ) \
      ( LAST_24H_ASR_PCT,                    "last_24h_asr_percent",            "Last 24 hours calculated ASR percentage.",          "" ) \
      ( LAST_24H_OUTGOING_CALL_CNT,          "last_24h_outgoing_call_cnt",      "Last 24 hours outgoing calls.",                      "" ) \
      ( HOUR_ASR_PCT,                        "current_hour_asr_percent",        "Current hour calculated ASR percentage.",            "" ) \
      ( HOUR_OUTGOING_CALL_CNT,              "current_hour_outgoing_call_cnt",  "Current hour outgoing calls.",                      "" ) \
      ( LAST_HOUR_ASR_PCT,                    "last_hour_asr_percent",          "Last hour calculated ASR percentage.",              "" ) \
      ( LAST_HOUR_OUTGOING_CALL_CNT,        "last_hour_outgoing_call_cnt",    "Last hour outgoing calls.",                          "" ) \
    ( AVAILABILITY_DETECTION_STRUCT,          "availability_detection_struct",  "Detailed availibility detection Statistics",        "" ) \
      ( POLL_REMOTE_PROXY,                    "poll_remote_proxy",              "Remote proxy polling enabled",                      "" ) \
      ( TIME_SINCE_POLLING,                  "time_since_polling",              "Time since the last availibility polling",          "" ) \
      ( TIME_AVAILABLE,                      "time_available",                  "Formated Time since the NAP is available",          "" ) \
      ( TIME_AVAILABLE_SECONDS,              "time_available_seconds",          "Number of seconds since the NAP is available",      "x" ) \
      ( TIME_UNAVAILABLE,                    "time_unavailable",                "Time since the NAP is unavailable",                  "" ) \
      ( TIME_UNAVAILABLE_SECONDS,            "time_unavailable_seconds",        "Number of seconds since the NAP is unavailable",    "x" ) \
    ( REGISTRATION_STRUCT,                    "registration_struct",            "Detailed registration Statistics",                  "" ) \
      ( REGISTER_TO_PROXY,                    "register_to_proxy",              "Register to proxy enabled",                          "" ) \
      ( IS_REGISTERED,                        "registered",                      "Is registered",                                      "" ) \
      ( TIME_SINCE_REFRESH,                  "time_since_refresh",              "Time since the last refresh",                        "" ) \
      ( TIME_REGISTERED,                      "time_registered",                "Formated Time since the NAP is registered",          "" ) \
      ( TIME_REGISTERED_SECONDS,              "time_registered_seconds",        "Number of seconds since the NAP is registered",      "x" ) \
      ( TIME_NOT_REGISTERED,                  "time_not_registered",            "Formated Time since the NAP is not registered",      "" ) \
      ( TIME_NOT_REGISTERED_SECONDS,          "time_not_registered_seconds",    "Number of seconds since the NAP is not registered",  "x" ) \
    /*!< Nap Status Fields */


==Playing prompts announcements or tones==
[[Routing Script Tutorial: Playing prompts announcements and tones|Learn how to play all sorts of media files for call prompts, announcements, and tones.]]


If the nap status is part of a substructure, it's name in the routing scripts must be composed of the structure name appended by an underscore and the field name.  
==Recording==
[[Routing Script Tutorial: Recording|Learn how  to use routing scripts to record incoming and/or outgoing call legs.]]


For example the name to use for the global ASR percentage is:
==User-to-User Information==
[[Routing Script Tutorial: User-to-User Information|Learn how  to use User-to-User Information (UUI) in routing scripts.]]


  asr_statistics_struct_global_asr_percent
==Radius Autorization==
[[Routing Script Tutorial: Radius Authorization|Learn how to send RADIUS authorization requests in routing scripts.]]


==ENUM Query==
[[Routing Script Tutorial: ENUM Query|Learn how to send ENUM Query requests to DNS servers in routing scripts.]]


It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.
== DNS Query ==
[[Routing Script Tutorial: DNS Query|Learn how to send DNS Query requests to DNS servers in routing scripts.]]


== Test parameters ==
== Call Diversion Options ==
[[Routing Script Tutorial: Call Diversion Options|Learn how control a call flow with diversion options.]]


=== @call_params ===
== Call Transfer Requests ==
That variable should contain a hash of call parameters that will passed to the routing script. This is equivalent to the incoming call parameters.
[[Routing Script Tutorial: Call Transfer Requests|Learn how to route call transfer requests.]]


== Redirection ==
[[Routing Script Tutorial: Redirection|Learn how to get redirection contacts.]]


=== @nap_list ===
== Connected Number ==
A list of hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed.
[[Routing Script Tutorial: Connected Number|Connected Number]]


'''The nap list is hashed by the nap names in UPPERCASE.''' It is important to consider this when creating new dynamic route or nap attributes that may nap names that will be used to fetch a status.
== Terminating Calls ==
[[Routing Script Tutorial: Terminating Calls|Learn how to terminate calls with routing scripts.]]


----
== NAP status and other NAP information ==
Back to [[Routing_script_tutorial|Routing Script Tutorial]].
[[Routing Script Tutorial: NAP Status and other NAP Information|Learn how to use NAP status field in routing scripts.]]
 
== Telephony Services (CNAM Request over SS7)==
[[Routing Script Tutorial: CNAM Request|Learn how to manage CNAM requests over SS7.]]
 
== Custom User Context ==
[[Routing Script Tutorial: Custom User Context|Custom User Context]]
 
== Routing Script Tests ==
[[Routing Script Tutorial: Routing Script Tests|Learn how to use the Web Portal to test your routing scripts.]]

Latest revision as of 09:58, 9 May 2024


Hide TOC

Introduction

This Routing Script Tutorial provides you with essential information in managing the routing of your calls. Consult the sections below to learn more.

An alternate version of this guide for routing scripts is available. Consult it to enhance your learning.

Accessing Routing Script Parameters

Learn how to access routing script parameters.

Routing Script Parameter Mapping Table

Learn how each Routing Script Parameter maps to varying protocols.

Script Parameters Definition

Learn about the definition of each script parameter.

Script Parameters Definition for SIP

Learn about the definition of each script parameter for SIP.

Registered Users Information

Learn how routing scripts access information about registered users.

Route Parameters and Call Routing

Learn about the standard parameters used in a call and how they route to registered users.

Playing prompts announcements or tones

Learn how to play all sorts of media files for call prompts, announcements, and tones.

Recording

Learn how to use routing scripts to record incoming and/or outgoing call legs.

User-to-User Information

Learn how to use User-to-User Information (UUI) in routing scripts.

Radius Autorization

Learn how to send RADIUS authorization requests in routing scripts.

ENUM Query

Learn how to send ENUM Query requests to DNS servers in routing scripts.

DNS Query

Learn how to send DNS Query requests to DNS servers in routing scripts.

Call Diversion Options

Learn how control a call flow with diversion options.

Call Transfer Requests

Learn how to route call transfer requests.

Redirection

Learn how to get redirection contacts.

Connected Number

Connected Number

Terminating Calls

Learn how to terminate calls with routing scripts.

NAP status and other NAP information

Learn how to use NAP status field in routing scripts.

Telephony Services (CNAM Request over SS7)

Learn how to manage CNAM requests over SS7.

Custom User Context

Custom User Context

Routing Script Tests

Learn how to use the Web Portal to test your routing scripts.