Errors while dialing out

For getting detailed information on dialing errors, look at the failure_status and failure_phrase fields that are sent as the response in hangup event for calls that are failing. It will have more detailed information in it. If these fields are missing they can be enabled in the trunk configuration of Chime/Twilio or SBC. To enable additional error information to be sent from gateway. The following headers to be sent from gateway as custom sip headers.
                1. sip_invite_failure_status
                2. sip_invite_failure_phrase

Refer to KB https://support.epicode.in/help/en-gb/23/58 for details on hangup event sample.

 While triggering an outbound call using make_call api, if you receive the following errors :

1. RECOVERY_ON_TIMER_EXPIRE  -  Is gateway through which the call is dialled accessible on 5060 (TCP) / 5061 (TLS) port depending on the configuration?
2. CALL_REJECTED  -
         a. Is the "To" number mentioned in make_call api request a valid number?
         b. Is it allowed in the gateway dialed plan?
3. UNALLOCATED_NUMBER
          a. Is the "To" number mentioned in make_call api request a valid number?
         b. Is it allowed in the gateway dialed plan?        
         c. Is the "From" number valid and the same is used as parameter under "gateways" in serverdetails.json?
         d. Check the corresponding make_call api to confirm "from" number is valid.

3. NORMAL_TEMPORARY_FAILURE
         a. Is the gateway configuration valid with userid/password?
         b. Is gateway through which the call is dialled accessible on 5060 (TCP) / 5061 (TLS) port depending on the configuration?
4. NORMAL_UNSPECIFIED
      1.  The preceding gateway is not sure what is the exact error, look at the failure_phrase for details.
      2. Gateway passwords should not contain "\" in them.

5. NO_ANSWER:
           a. Is the issue seen for specific numbers or all the numbers?
           b. When the number is dialled manually does the number go through?
           c. Make a test call using Postman, with enable_cpa "yes" for make_call api and in setcpaparams api use "total_timeout" : 40000 or higher value and log_voice : "yes" in setcpaparams for a test configuration. Use the same test config_name used in setcpaparams in make_call api.
              Initiate the call and listen to the associated recording to check if the call was answered or it went to voicemail or whether it was routed to wrong number.

6. INCOMPATIBLE_DESTINATION
The service provider is refusing to make the call as dialed. The failure_phrase will usually have the reason, if enabled.
If all calls through the chosen iradialer gateway are failing with this error, typical reasons for that could be:
           a. Service provider expects encrypted calls (TLS+SRTP) and iradialer gateway configuration is set to not use encryption.
           b. Service provider expects unencrypted calls ((UDP/TCP)+RTP) and iradialer gateway configuration is set to use encryption.
           c. Carrier and iradialer do not have a common audio codec which the calls can use.
Points 'a' and 'b' can be fixed by ensuring that the serverdetails.json is configured correctly on all iradialer instances and restarting all iradialer instances. Point 'c' would mean that the service provider does not support G.711 codec and you can get a list of the supported codecs and contact epicode support.
           d. Is 'ANI' (from_number) that is used to initiate the calls the right number to be used for that campaign?

7.  CHAN_NOT_IMPLEMENTED
In "request_make_call" api, gateway name should be sofia/gateway/<gateway_name>. For example, if chime is the gateway name, "gateway" attribute should be set to "sofia/gateway/chime".

8. TOO MANY CALLS INITIATED
If the gateway is returning the failure_phrase as "too many calls initiated", you may want to check the CPS (calls per sec) configured on the trunk.
For ex, If the trunk is configured with cps=5 and if you are calling more than 5 calls in a second, this error can occur.
A configuration link is shared below for reference,
Gateway connectivity verification:


Debian 10:

1. cd /opt/epi/script/tools
2. python3 socket_client.py <put_gateway_hostname> 5060 (use 5061 port for TLS)

Debian 12:

1. cd /usr/local/epi/script/tools
2. python3 socket_client.py <put_gateway_hostname> 5060 (use 5061 port for TLS)

Windows:
1. cd C:\<tenant_id>\Iradialer\script\tools
2. python3 socket_client.py <put_gateway_hostname> 5060 (use 5061 port for TLS)