For the complete documentation index, see llms.txt. This page is also available as Markdown.

Terminating Calls

Hide TOC

Introduction

In release 2.8, it is now possible to terminate a call through the routing scripts. The [[#Reason values|reason code]] must be specified in

params[:bridge][:reason]. The :terminate hash must be created and copied into params: terminate = {} params[:terminate] = terminate

The following fields can then be set in :terminate:

  • :sip_header

  • :contacts # list of contacts as described in the [[#Redirection|redirection]] section

  • :isup_raw

  • :isup_raw_variant

  • :redirecting_number

  • :redirecting_number_noa

  • :redirecting_number_npi

  • :redirecting_number_presentation

  • :redirecting_number_reason

  • :redirecting_number_counter

  • :redirecting_number_indicator

  • :original_called_number

  • :original_called_number_noa

  • :original_called_number_npi

  • :original_called_number_presentation

  • :original_called_number_reason

  • :original_called_number_counter

Reason values

Check here for Termination Reason Cause codes:

Termination Reason Cause codes

Example to refuse an incoming call leg. raise RoutingException, :no_route

Reason cause strings available inside routing scripts:

List of Q.850 reason causes

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 qor_ported_number 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_connection_operational temporary_failure switching_equipment_congestion access_information_discarded requested_circuit_not_available precedence_call_blocked resource_unavailable quality_of_service_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

List of toolpack reason causes

toolpack_normal or :normal toolpack_resource_error or :resource_error toolpack_timeout or :timeout toolpack_no_route or :no_route toolpack_call_collision or :call_collision toolpack_sync_drop or :sync_drop toolpack_signaling_error or :signaling_error toolpack_locally_rejected or :locally_rejected toolpack_interface_not_available or :interface_not_available toolpack_reset_in_progress or :reset_in_progress toolpack_adapter_reject or :adapter_reject toolpack_missing_or_invalid_ie or :missing_or_invalid_ie toolpack_incoming_only or :incoming_only toolpack_system_configuration_changed or :system_configuration_changed toolpack_resource_no_more_available or :resource_no_more_available toolpack_incompatible_media or :incompatible_media toolpack_resource_allocation_failed or :resource_allocation_failed toolpack_data_path_not_available or :data_path_not_available toolpack_local_congestion or :local_congestion toolpack_authorization_required or :authorization_required toolpack_call_divert_is_not_allowed or :call_divert_is_not_allowed

List of SIP reason causes

Reason causes starting with a digit must use the following syntax (can't use : as prefix).

BackToMain

Last updated

Was this helpful?