Routing Script Tutorial: Terminating Calls: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:Terminating Calls}} | {{DISPLAYTITLE:Terminating Calls}} | ||
==Introduction== | ==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 | 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 | ||
Latest revision as of 10:43, 24 May 2024
Introduction
In release 2.8, it is now possible to terminate a call through the routing scripts. The 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 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).
'300_multiple_choices' '301_moved_permanently' '302_moved_temporarily' '305_use_proxy' '380_alternative_service' '400_bad_request' '401_unauthorized' '402_payment_required' '403_forbidden' '404_not_found' '405_method_not_allowed' '406_not_acceptable' '407_proxy_authentication_required' '408_request_timeout' '409_conflict' '410_gone' '413_request_entity_too_large' '414_request_URI_too_long' '415_unsupported_media' '416_unsupported_URI_scheme' '420_bad_extension' '421_extension_required' '422_session_timer_too_small' '423_interval_too_brief' '429_referrer_identity_error' '480_temporary_unavailable' '481_call_or_transaction_does_not_exist' '482_loop_detected' '483_too_many_hops' '484_address_incomplete' '485_ambiguous' '486_busy_here' '487_request_terminated' '488_not_acceptable_here' '489_bad_event' '491_retry_after' '500_server_internal_error' '501_not_implemented' '502_bad_gateway' '503_service_unavailable' '504_server_timeout' '505_version_unsupported' '513_message_too_large' '600_busy_everywhere' '603_decline' '604_not_exist_anywhere' '606_not_acceptable'
