The testDialplan() XML-RPC API method makes it possible to inspect how a call will be routed.  Available from Sippy 5.0.

Only customers with System Management permission are allowed to issue testDialplan() xmlapi call

The application supports trusted mode and the i_customer parameter should be provided.


testDialplan()

Mandatory parameters

  • cli - Caller number. String

  • cld - Called number. String

Optional parameters

  • fallback_i_account - The i_account value to use when automatic account recognition is impossible. When DID or authentication rule has been matched the fallback_i_account parameter is ignored. Mandatory in certain scenarios. Integer

  • remote_udp_port - source UDP port of the caller. Mandatory in certain scenarios. Integer

  • remote_ip - source IP of the caller. Mandatory in certain scenarios. String

  • to_domain - the domain from the To: SIP header from the INVITE request. Optional. String. Available starting from Sippy 2020

  • from_domain - the domain from the From: SIP header from the INVITE request. Optional. String. Available starting from Sippy 2020.

  • is_ivr_originated - When it is true then neither authentication rules nor DIDs are tested and the fallback_i_account parameter becomes mandatory. Boolean, default is False
  • i_protocol - Integer, default is 1

    • 1 - SIP

    • 2 - H.323 (deprecated starting from Sippy 2020 version)

    • 3 - IAX2

  • nated - This parameter specifies if the call should be considered as being originated from behind NAT. It affects the i_media_relay return value. Available starting from version 5.2. Boolean, default is False
  • call_start_time - The time of making the call. Either dateTime.iso8601 format in UTC or String in format '%H:%M:%S.000 GMT %a %b %d %Y' (e.g. 09:57:29.000 GMT Mon May 29 2017). Available starting from Sippy 2020. Not NULL, if not specified, defaults to now.

Returned data could be one of the following:

Failure

  • result = “Failure”

  • cause - text

  • other params depending on failure

DID IVR

  • i_did

  • i_did_authorization

  • i_ivr_application

Success

  • i_did (optional)

  • i_did_authorization (optional)

  • i_authentication (optional)

  • i_account

  • i_tariff

  • i_rate

  • prefix

  • cli

  • cld

  • username

  • average_duration

  • billing parameters (free_seconds, interval_1, interval_N, connect_fee, price_1, price_N, grace_period, post_call_surcharge)

  • i_routing_group

  • lrn_cld_in (optional)

  • lrn_cld (optional)

  • lrn_cli_in (optional)

  • lrn_cli (optional)

  • area_name (optional)

  • routes or onnet_account


The routes is an array of dictionaries with the keys:

  • cli

  • cld

  • prefix

  • i_destination_set

  • destination_set_name

  • i_route

  • i_media_relay

  • i_vendor

  • vendor_name

  • i_connection

  • connection_name

  • capacity

  • num_sessions

  • preference

  • quality_monitor_enabled

  • connection_quality

  • qmon_action

  • estimated_cost

  • system_connection

  • billing parameters (free_seconds, interval_1, interval_N, connect_fee, price_1, price_N, grace_period, post_call_surcharge)

  • area_name (optional)
  • forbidden
  • onnet_route_type

    • 1 - Listen to Voicemail

    • 2 - Record Voicemail

    • 3 - On-Net route

    • 7 - Service code

    • NULL - vendor route

  • error - optional field. Possible values:

    • loss_protection

  • error_cause - optional field. Explanation of the error


The onnet_account is a dictionary with the following keys:


  • i_account

  • username

  • i_did

  • routes - the same as above


Minutes from minute plan have to be tracked using the separate xmlapi method:

http://support.sippysoft.com/solution/articles/107406-xml-rpc-api-matching-cld-with-account-minute-plans