Routing script tutorial:Mini Development Guide

From TBwiki
(Difference between revisions)
Jump to: navigation, search
(Call parameters)
(Accept)
Line 16: Line 16:
 
* calling_noa
 
* calling_noa
 
* calling_npi
 
* calling_npi
 +
* calling_display_type
 +
* calling_display
 +
* calling_presentation
 
* called
 
* called
 
* called_noa
 
* called_noa

Revision as of 14:51, 24 March 2010

Contents

Call object

Get

The following call parameters are available in the call object:

  • calling
  • calling_noa
  • calling_npi
  • called
  • called_noa
  • called_npi
  • nap

Accept

The following call parameters are available in the call object:

  • calling
  • calling_noa
  • calling_npi
  • calling_display_type
  • calling_display
  • calling_presentation
  • called
  • called_noa
  • called_npi
  • nap

They can all be remapped if they are given to the accept method of the call object.

Refuse

The following call parameters may be set in the refuse method of the call object:

  • reason

Currently the only supported value is "no_route".

Route parameters

All route may have these 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.


Nap status

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.

Notice: These values may change between major release.

 #define NAP_STATS_FIELDS \
   /* 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 */


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.

For example the name to use for the global ASR percentage is:

 asr_statistics_struct_global_asr_percent


It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.

Test parameters

@call_params

That variable should contain a hash of call parameters that will passed to the routing script. This is equivalent to the incoming call parameters.


@nap_list

A list of hash containing the nap statuses. This is equivalent to the nap statuses at the time the call is to be routed.

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.


Back to Routing Script Tutorial.

Personal tools