Skip to content

Calls fail with a SIP error code

Every failed call ends with a code: a SIP response from the switch or a vendor, or a negative internal code when the switch itself refused the call. The code tells you which stage of the call flow stopped it, and that tells you which screen to open.

  • The caller hears a fast busy tone or an announcement, or the device shows an error.
  • Call Records (CDRs) show the call with a red badge such as 403, 503 or -20 in the status column; the tooltip gives the description.
  • Reports → Calls shows the call with a Diagnosis such as Rejected before routing: … or All 3 vendor attempt(s) failed.
  1. Open the call in Reports → Calls and read the Diagnosis; it names the stage and the last code.
  2. A negative code means the switch refused the call: find it in the internal codes table below.
  3. A positive code with Vendor attempts in the call card came from a vendor; one without attempts came from the switch before routing.
  4. Run the same call in Tools & Debugs → Test Dialplan with the call’s CLI, CLD and remote address: an error there means configuration, success means the problem is on the network or the vendor side.

Cause 1: the call is not authenticated (401, 403, 407)

Section titled “Cause 1: the call is not authenticated (401, 403, 407)”

How to confirm: the call has no Vendor attempts and no account in the CDR, or appears only in SIP Logs Viewer. 401 and 407 are challenges for digest credentials; a device that keeps getting them has the wrong password. 403 means no Authentication Rule matched the source IP and numbers, or two rules matched equally well.

Fix:

  1. For a registered device, check VoIP Login and VoIP Password of the account and that Registration Allowed is checked.
  2. For a trunk, open the account’s Authentication Rules and compare Remote IP Address, Incoming CLI/ANI and Incoming CLD/DNIS with the INVITE.
  3. If the device sends a CLI different from its login, check Trust Caller Info on the account.

See Authentication.

Cause 2: the switch refused the call (negative code)

Section titled “Cause 2: the switch refused the call (negative code)”

How to confirm: the CDR shows a negative code. The most common ones are -20 Insufficient Balance, -14 / -22 No Rate Found, -21 Destination Is Forbidden, -23 Loss Protection and -25 No Routes Found.

Fix: use the table below to find the screen. Money codes are fixed with Add Balance or the Credit Limit, rate codes on the tariff of the account or of the reseller above it, route codes in the routing group and its termination routes.

Cause 3: no vendor could take the call (480, 486, 503, 408)

Section titled “Cause 3: no vendor could take the call (480, 486, 503, 408)”

How to confirm: the call card lists Vendor attempts, all failed. 503 Service Unavailable from every vendor usually means they are down or rejecting your IP; 480 Temporarily Unavailable and 486 Busy Here are normal answers about the called party; 408 Request Timeout means a vendor did not answer within the timeouts.

Fix:

  1. Open Vendors Call Records for the vendors involved and check whether all their calls fail or only these numbers.
  2. Lower Reply Timeout on connections that do not respond so the next vendor is tried sooner; add a second vendor to the routing group for failover.
  3. Put busy-type codes such as 486 into Huntstop SIP Codes of the connection so that a busy subscriber is not retried on every other vendor.

See Routing and Call timeouts.

Cause 4: media cannot be negotiated (488, -5, -7, -43)

Section titled “Cause 4: media cannot be negotiated (488, -5, -7, -43)”

How to confirm: the code is 488 Not Acceptable Here, -7 Unacceptable Codec, -5 Malformed SDP or -43 Media Relay Error. The SDP Records of Call Details show the offered codecs.

Fix: align the Preferred Codec of the account with what the vendor accepts, or clear Use Preferred Codec Only; check Use Media Relay on the connection. See Codecs management.

Cause 5: a limit was reached (-4, -16, -18, -19, -26, -31 to -34)

Section titled “Cause 5: a limit was reached (-4, -16, -18, -19, -26, -31 to -34)”

How to confirm: the description names a Capacity, Max Sessions or CPS limit of the account, customer, authentication rule, connection or the whole system.

Fix: raise the limit on the object named in the description, or spread the traffic over more connections. A system CPS limit is set for the installation; contact support.

Codes 1xx are provisional, 2xx success, 3xx redirection, 4xx errors of the request, 5xx errors of the server, 6xx global failures that must not be retried elsewhere.

Code Meaning Usual cause in FlySIP
100 Trying Request received Hop-by-hop; never forwarded
180 Ringing, 183 Session Progress Called party is alerted; early media Normal call progress; their arrival stops the 1xx Timeout
200 OK Call answered Normal
301, 302, 305, 380 Redirect to another address Followed only with Accept 3xx Redirects on the connection
400 Bad Request Malformed request A device or vendor sends broken headers
401 Unauthorized, 407 Proxy Authentication Required Credentials needed Digest challenge; repeated means wrong password
403 Forbidden Refused No matching authentication rule, blocked account, or a vendor rejecting your IP
404 Not Found Unknown destination DID not configured, an unallocated number in a DID range, or a vendor without the route
408 Request Timeout No final answer in time Vendor did not answer within the timeouts
480 Temporarily Unavailable Called party unavailable Unregistered device, no answer on the far end
484 Address Incomplete Number too short Dialled number incomplete; matches -24
486 Busy Here, 600 Busy Everywhere Busy Normal; candidates for Huntstop SIP Codes
487 Request Terminated Cancelled The caller hung up before the answer
488 Not Acceptable Here Media not acceptable Codec or SDP mismatch
500 Server Internal Error Server error Fault on the vendor’s or the far end’s side
502 Bad Gateway, 503 Service Unavailable Gateway down or overloaded Vendor outage or capacity; try another vendor
603 Decline Rejected by the called party Normal

The switch writes negative codes when it rejects a call itself. The description appears in the CDR tooltip, Call Details and the Result filter.

Code Description Where to look
-1 External Translator Rejected The Call Rules & Lists
-2, -5, -6 Body-less INVITE, Malformed SDP, Unsupported Content-Type The calling device
-3 Account Expired Lifetime (days) of the account
-4 Connection Capacity Exceeded Capacity of the connection
-7 Unacceptable Codec Codecs of the account and the vendor
-8 to -11, -13, -27, -29, -35, -36 Invalid translation rule in an authentication rule, account, DID or post-auth rule The rule named in the description; check its syntax
-12 Cannot Find The Session To Bind To Call transfer or pickup to a session that ended
-14 No Rate Found In Tariff Rates of the account’s tariff
-15 Call Loop Detected Routing that sends the call back to the switch
-16, -32, -34 Too Many Sessions, for the account, customer or authentication rule Max Sessions of that object
-17 Account Is In Use The account allows one call at a time
-18, -19, -26, -31, -33 CPS limit on the account, system, connection, customer or authentication rule Max Calls Per Second of that object
-20 Insufficient Balance Balance and Credit Limit of the account and every customer above it
-21 Destination Is Forbidden A Forbidden rate
-22 No Rate Found In Customer’s Tariff Rates of a reseller’s tariff above the account
-23 Loss Protection Max Loss of the tariff; vendor price above your price
-24 Address Is Incomplete Number too short
-25 No Routes Found Termination routes in the account’s routing group
-28, -37 CLD or CLI is in the Do Not Call List DNC List, DNC CLI List
-30 Call has been canceled by calling party The caller hung up
-40 Anonymity Disallowed Block Incoming Anonymous on the account
-41, -44, -45 STIR/SHAKEN verification failed, Identity Required, Authentication failed SIP Features → STIR/SHAKEN
-42, -43 Internal Server Error, Media Relay Error Contact support with the Call-ID

Tools & Debugs → Result Code Internal maps an internal code to the SIP code and reason sent to the caller; Result Code External maps codes received from vendors, optionally per Account Class. Each entry has In Code, Out Code and Reason. Use them when a customer’s equipment reacts badly to a specific code, for example to return 503 instead of -20 so that the customer’s switch tries another carrier.

Collect the following and open a ticket at support.flysip.com: