Routing script tutorial:Mini Development Guide

From TBwiki
(Difference between revisions)
Jump to: navigation, search
(Get)
(Update documention according to new parameter : screening, display, etc. Also add new reason code arguments.)
Line 1: Line 1:
== Call object ==
+
== Call object ==
  
=== Get ===
+
=== Get ===
 +
 +
Those function are used to get the call parameters. The possible parameters are described in the section "Call parameters"
 +
  called_number = caf_call.get :called
  
Function to get the call parameters from the call object. For the possible parameter see the
+
=== List_params  ===
 +
 
 +
This function is used to retrieve the list of supported call parameters. For example to extract all the possible call params from the the call object and put it in hash.
 +
  caf_call.list_params.each {|param| call[param] = caf_call.get param }
 +
 
 +
=== Accept  ===
 +
 
 +
This function is used to accept a call. It takes 2 arguments, the call parameters (hash) and the route parameters (hash).
 +
 
 +
Apply route remapping rules
 +
  out_call naps )
 +
  caf_call.accept out_call, route
 +
 
 +
=== Refuse  ===
 +
 
 +
This function is used to refuse a call with a reason code argument parameters :
 +
  caf_call.refuse :reason => :temporary_failure
 +
 
 +
The supported values are described in the section "Reason values".
 +
 
 +
== Call parameters ==
  
=== Accept ===
 
 
The following call parameters are available in the call object:
 
The following call parameters are available in the call object:
 +
 
* calling
 
* calling
 
* calling_noa
 
* calling_noa
Line 13: Line 36:
 
* calling_display
 
* calling_display
 
* calling_presentation
 
* calling_presentation
 +
* calling_screening
 
* called
 
* called
 
* called_noa
 
* called_noa
Line 18: Line 42:
 
* nap
 
* nap
  
They can all be remapped if they are given to the accept method of the call object.
+
'''Notice:''' All values are documented in the noa_npi_remap.rb script and may change between major release.
  
=== Refuse ===
+
= Noa values =
The following call parameters may be set in the refuse method of the call object:
+
* <tt>unknown_number</tt>
* reason
+
* <tt>international_number</tt>
Currently the only supported value is "no_route".
+
* <tt>national_number</tt>
 +
* <tt>subscriber_number</tt>
 +
* <tt>network_specific</tt>
 +
* <tt>network_routing_national_format</tt>
 +
* <tt>network_routing_international_format</tt>
 +
* <tt>abbreviated_number</tt>
 +
* <tt>subscriber_number_operator_requested</tt>
 +
* <tt>national_number_operator_requested</tt>
 +
* <tt>international_number_operator_requested</tt>
 +
* <tt>no_number_present_operator_requested</tt>
 +
* <tt>no_number_present_cut_through_call_to_carrier</tt>
 +
* <tt>test_line_test_code</tt>
 +
* <tt>non_unique_subscriber_number</tt>
 +
* <tt>non_unique_national_number</tt>
 +
* <tt>non_unique_international_number</tt>
 +
* <tt>call_950_number</tt>
  
== Call parameters values ==
+
Those values will be remapped to the protocol specific NOA value. To provide protocol specific value:
 +
* <tt>remapped_fields[:called_noa] = 0x70</tt>
 +
or
 +
* <tt>remapped_fields[:called_noa] = 112</tt>
  
== Route parameters ==
+
= Npi values =
All route may have these parameters:
+
* <tt>unknown_number</tt>
* calling
+
* <tt>isdn</tt>
* called
+
* <tt>telephony</tt>
* nap
+
* <tt>private</tt>
* remapped_calling
+
* <tt>data</tt>
* remapped_called
+
* <tt>telex</tt>
* remapped_nap
+
* <tt>national</tt>
* remapped_profile
+
  
Additionnaly it is possible to add dynamic route attributes in the web portal. These can be referenced by their name.
+
= Calling Display Type values =
 +
* <tt>unspecified</tt> => Type is unspecified.
 +
* <tt>calling_party_name</tt> => Type is 0xB1.
  
 +
Those values will be remapped to the protocol specific  Display Information Type value. To provide protocol specific value:
 +
* <tt>remapped_fields[:calling_display_type] = 0xB1</tt>
 +
or
 +
* <tt>remapped_fields[:calling_display_type] = 177</tt>
  
 +
= Calling Display Type values =
 +
* <tt>remapped_fields[:calling_display] = "Roger Fluffy"</tt>
  
== Nap status ==
+
= Calling Presentation values =
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.
+
* <tt>unspecified</tt>
 +
* <tt>not_available</tt>
 +
* <tt>allowed</tt>
 +
* <tt>restricted</tt>
 +
* <tt>addr_restricted</tt>
 +
* <tt>name_restricted</tt>
 +
 
 +
= Calling Screening values =
 +
* <tt>unspecified</tt>
 +
* <tt>no</tt>
 +
* <tt>pass</tt>
 +
* <tt>fail</tt>
 +
* <tt>network_provided</tt>
 +
 
 +
== 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.
 +
 
 +
== Reason values  ==
 +
 
 +
All the CMC reason code are provide for use by the routing scripts . See the TBCMC_CALL_REASON_CODE enum in the tbcmc_call.h file.
 +
 
 +
'''Notice:''' These values may change between major release.
 +
 
 +
  /* isdn/ss7 reason code style */
 +
  /* Toolpack engine will convert reason code from sip to isdn/ss7 or isdn/ss7 to sip according to RFC3398 */
 +
  UNALLOCATED_NUMBER
 +
  NO_ROUTE_TO_NETWORK
 +
  NO_ROUTE_TO_DESTINATION
 +
  SEND_SPECIAL_TONE
 +
  MISDIALLED_TRUNK_PREFIX
 +
  CHANNEL_UNACCEPTABLE
 +
  CALL_AWARDED_IN_ESTABLISHED_CHANNEL
 +
  PREEMPTION
 +
  REATTEMPT
 +
  NORMAL_CALL_CLEARING
 +
  USER_BUSY
 +
  NO_USER_RESPONDING
 +
  NO_ANSWER_FROM_USER
 +
  SUBSCRIBER_ABSENT
 +
  CALL_REJECTED
 +
  NUMBER_CHANGED
 +
  REDIRECTION
 +
  EXCHANGE_ROUTING_ERROR
 +
  NON_SELECTED_USER_CLEARING
 +
  DESTINATION_OUT_OF_ORDER
 +
  ADDRESS_INCOMPLETE
 +
  FACILITY_REJECTED
 +
  RESPONSE_TO_STATUS_ENQUIRY
 +
  NORMAL_UNSPECIFIED
 +
  NO_CIRCUIT_AVAILABLE
 +
  NETWORK_OUT_OF_ORDER
 +
  FRAME_MODE_OUT_OF_SERVICE
 +
  FRAME_MODE_CONN_OPERATIONAL
 +
  TEMPORARY_FAILURE
 +
  SWITCHING_EQUIP_CONGESTION
 +
  ACCESS_INFO_DISCARDED
 +
  REQUESTED_CIRCUIT_NOT_AVAILABLE
 +
  PRECEDENCE_CALL_BLOCKED
 +
  RESOURCE_UNAVAILABLE
 +
  QOS_NOT_AVAILABLE
 +
  REQUESTED_FACILITY_NOT_SUBSCRIBED
 +
  OUTGOING_CALLS_BARRED
 +
  OUTGOING_CALLS_BARRED_WITHIN_CUG
 +
  INCOMING_CALLS_BARRED
 +
  INCOMING_CALLS_BARRED_WITHIN_CUG
 +
  BEARER_CAP_NOT_AUTHORIZED
 +
  BEARER_CAP_NOT_AVAILABLE
 +
  INCONSISTENCY_ACCESS_INFO
 +
  SERVICE_NOT_AVAILABLE
 +
  BEARER_CAP_NOT_IMPLEMENTED
 +
  CHANNEL_TYPE_NOT_IMPLEMENTED
 +
  REQUESTED_FACILITY_NOT_IMPLEMENTED
 +
  ONLY_RESTRICTED_DIGITAL_INFO
 +
  SERVICE_NOT_IMPLEMENTED
 +
  INVALID_CALL_REFERENCE
 +
  CHANNEL_DOES_NOT_EXIST
 +
  CALL_IDENTITY_DOES_NOT_EXIST
 +
  CALL_IDENTITY_IN_USE
 +
  NO_CALL_SUSPENDED
 +
  CALL_HAS_BEEN_CLEARED
 +
  USER_NOT_MEMBER_OF_CUG
 +
  INCOMPATIBLE_DESTINATION
 +
  NON_EXISTANT_CUG
 +
  INVALID_TRANSIT_NETWORK
 +
  INVALID_MESSAGE_UNSPECIFIED
 +
  MANDATORY_IE_MISSING
 +
  MESSAGE_TYPE_NON_EXISTENT
 +
  MESSAGE_NOT_COMPATIBLE_WITH_CALL_STATE
 +
  IE_NON_EXISTENT
 +
  INVALID_IE_CONTENT
 +
  MSG_NOT_COMPATIBLE_WITH_CALL_STATE
 +
  RECOVERY_ON_TIMER_EXPIRY
 +
  PARAMETER_NON_EXISTENT_PASSED_ON
 +
  MESSAGE_WITH_NON_RECOGNIZED_PARAMETERS_DISCARDED
 +
  PROTOCOL_ERROR
 +
  INTERWORKING_UNSPECIFIED
 +
 
 +
  /* Toolpack specific errors */
 +
  NORMAL
 +
  RESOURCE_ERROR
 +
  TIMEOUT
 +
  NO_ROUTE
 +
  CALL_COLLISION
 +
  SYNC_DROP
 +
  SIGNALING_ERROR
 +
  LOCALLY_REJECTED
 +
  INTERFACE_NOT_AVAILABLE
 +
  RESET_IN_PROGRESS
 +
  ADAPTER_REJECT
 +
  MISSING_INVALID_IE
 +
  INCOMING_ONLY
 +
  SYSTEM_CONFIGURATION_CHANGED
 +
  RESOURCE_NO_MORE_AVAILABLE
 +
  INCOMPATIBLE_MEDIA
 +
  RES_ALLOC_FAILED
 +
  DATA_PATH_NOT_AVAILABLE
 +
 
 +
<br>
 +
 
 +
== 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.  
  
'''Notice:''' These values may change between major release.
 
 
   #define NAP_STATS_FIELDS \
 
   #define NAP_STATS_FIELDS \
 
     /* Field,                                szName,                            szDescription,                                        szOptions */ \
 
     /* Field,                                szName,                            szDescription,                                        szOptions */ \
Line 79: Line 261:
 
       ( TIME_NOT_REGISTERED,                  "time_not_registered",            "Formated Time since the NAP is not registered",      "" ) \
 
       ( 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" ) \
 
       ( TIME_NOT_REGISTERED_SECONDS,          "time_not_registered_seconds",    "Number of seconds since the NAP is not registered",  "x" ) \
     /*!< Nap Status Fields */
+
     /*!&lt; Nap Status Fields */
  
 
+
<br> 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.  
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:  
 
For example the name to use for the global ASR percentage is:  
Line 88: Line 269:
 
   asr_statistics_struct_global_asr_percent
 
   asr_statistics_struct_global_asr_percent
  
 +
<br> It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.
  
It is also possible to add dynamic nap attributes in the web portal. These can be referenced by their name.
+
== Test parameters  ==
  
== Test parameters ==
+
=== @call_params  ===
  
=== @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.  
That variable should contain a hash of call parameters that will passed to the routing script. This is equivalent to the incoming call parameters.
+
  
 +
<br>
  
=== @nap_list ===
+
=== @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.
+
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|Routing Script Tutorial]].
+
 
 +
Back to [[Routing script tutorial|Routing Script Tutorial]].

Revision as of 15:22, 24 March 2010

Contents

Call object

Get

Those function are used to get the call parameters. The possible parameters are described in the section "Call parameters"

 called_number = caf_call.get :called

List_params

This function is used to retrieve the list of supported call parameters. For example to extract all the possible call params from the the call object and put it in hash.

 caf_call.list_params.each {|param| call[param] = caf_call.get param }

Accept

This function is used to accept a call. It takes 2 arguments, the call parameters (hash) and the route parameters (hash).

Apply route remapping rules

 out_call naps )
 caf_call.accept out_call, route

Refuse

This function is used to refuse a call with a reason code argument parameters :

 caf_call.refuse :reason => :temporary_failure

The supported values are described in the section "Reason values".

Call parameters

The following call parameters are available in the call object:

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

Notice: All values are documented in the noa_npi_remap.rb script and may change between major release.

Noa values

  • unknown_number
  • international_number
  • national_number
  • subscriber_number
  • network_specific
  • network_routing_national_format
  • network_routing_international_format
  • abbreviated_number
  • subscriber_number_operator_requested
  • national_number_operator_requested
  • international_number_operator_requested
  • no_number_present_operator_requested
  • no_number_present_cut_through_call_to_carrier
  • test_line_test_code
  • non_unique_subscriber_number
  • non_unique_national_number
  • non_unique_international_number
  • call_950_number

Those values will be remapped to the protocol specific NOA value. To provide protocol specific value:

  • remapped_fields[:called_noa] = 0x70

or

  • remapped_fields[:called_noa] = 112

Npi values

  • unknown_number
  • isdn
  • telephony
  • private
  • data
  • telex
  • national

Calling Display Type values

  • unspecified => Type is unspecified.
  • calling_party_name => Type is 0xB1.

Those values will be remapped to the protocol specific Display Information Type value. To provide protocol specific value:

  • remapped_fields[:calling_display_type] = 0xB1

or

  • remapped_fields[:calling_display_type] = 177

Calling Display Type values

  • remapped_fields[:calling_display] = "Roger Fluffy"

Calling Presentation values

  • unspecified
  • not_available
  • allowed
  • restricted
  • addr_restricted
  • name_restricted

Calling Screening values

  • unspecified
  • no
  • pass
  • fail
  • network_provided

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.

Reason values

All the CMC reason code are provide for use by the routing scripts . See the TBCMC_CALL_REASON_CODE enum in the tbcmc_call.h file.

Notice: These values may change between major release.

 /* isdn/ss7 reason code style */
 /* Toolpack engine will convert reason code from sip to isdn/ss7 or isdn/ss7 to sip according to RFC3398 */
 UNALLOCATED_NUMBER
 NO_ROUTE_TO_NETWORK
 NO_ROUTE_TO_DESTINATION
 SEND_SPECIAL_TONE
 MISDIALLED_TRUNK_PREFIX
 CHANNEL_UNACCEPTABLE
 CALL_AWARDED_IN_ESTABLISHED_CHANNEL
 PREEMPTION
 REATTEMPT
 NORMAL_CALL_CLEARING
 USER_BUSY
 NO_USER_RESPONDING
 NO_ANSWER_FROM_USER
 SUBSCRIBER_ABSENT
 CALL_REJECTED
 NUMBER_CHANGED
 REDIRECTION
 EXCHANGE_ROUTING_ERROR
 NON_SELECTED_USER_CLEARING
 DESTINATION_OUT_OF_ORDER
 ADDRESS_INCOMPLETE
 FACILITY_REJECTED
 RESPONSE_TO_STATUS_ENQUIRY
 NORMAL_UNSPECIFIED
 NO_CIRCUIT_AVAILABLE
 NETWORK_OUT_OF_ORDER
 FRAME_MODE_OUT_OF_SERVICE
 FRAME_MODE_CONN_OPERATIONAL
 TEMPORARY_FAILURE
 SWITCHING_EQUIP_CONGESTION
 ACCESS_INFO_DISCARDED
 REQUESTED_CIRCUIT_NOT_AVAILABLE
 PRECEDENCE_CALL_BLOCKED
 RESOURCE_UNAVAILABLE
 QOS_NOT_AVAILABLE
 REQUESTED_FACILITY_NOT_SUBSCRIBED
 OUTGOING_CALLS_BARRED
 OUTGOING_CALLS_BARRED_WITHIN_CUG
 INCOMING_CALLS_BARRED
 INCOMING_CALLS_BARRED_WITHIN_CUG
 BEARER_CAP_NOT_AUTHORIZED
 BEARER_CAP_NOT_AVAILABLE
 INCONSISTENCY_ACCESS_INFO
 SERVICE_NOT_AVAILABLE
 BEARER_CAP_NOT_IMPLEMENTED
 CHANNEL_TYPE_NOT_IMPLEMENTED
 REQUESTED_FACILITY_NOT_IMPLEMENTED
 ONLY_RESTRICTED_DIGITAL_INFO
 SERVICE_NOT_IMPLEMENTED
 INVALID_CALL_REFERENCE
 CHANNEL_DOES_NOT_EXIST
 CALL_IDENTITY_DOES_NOT_EXIST
 CALL_IDENTITY_IN_USE
 NO_CALL_SUSPENDED
 CALL_HAS_BEEN_CLEARED
 USER_NOT_MEMBER_OF_CUG
 INCOMPATIBLE_DESTINATION
 NON_EXISTANT_CUG
 INVALID_TRANSIT_NETWORK
 INVALID_MESSAGE_UNSPECIFIED
 MANDATORY_IE_MISSING
 MESSAGE_TYPE_NON_EXISTENT
 MESSAGE_NOT_COMPATIBLE_WITH_CALL_STATE
 IE_NON_EXISTENT
 INVALID_IE_CONTENT
 MSG_NOT_COMPATIBLE_WITH_CALL_STATE
 RECOVERY_ON_TIMER_EXPIRY
 PARAMETER_NON_EXISTENT_PASSED_ON
 MESSAGE_WITH_NON_RECOGNIZED_PARAMETERS_DISCARDED
 PROTOCOL_ERROR
 INTERWORKING_UNSPECIFIED
 
 /* Toolpack specific errors */
 NORMAL
 RESOURCE_ERROR
 TIMEOUT
 NO_ROUTE
 CALL_COLLISION
 SYNC_DROP
 SIGNALING_ERROR
 LOCALLY_REJECTED
 INTERFACE_NOT_AVAILABLE
 RESET_IN_PROGRESS
 ADAPTER_REJECT
 MISSING_INVALID_IE
 INCOMING_ONLY
 SYSTEM_CONFIGURATION_CHANGED
 RESOURCE_NO_MORE_AVAILABLE
 INCOMPATIBLE_MEDIA
 RES_ALLOC_FAILED
 DATA_PATH_NOT_AVAILABLE


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