Showing results for 
Search instead for 
Did you mean: 

Mapping PSTN cause codes with the corresponding SIP Cause codes



We are trying to integrate the Asterisk dialer through SIP trunk with Cisco 3845 gateway running c3845-adventerprisek9-mz.124-15.XZ2 IOS image on the same. I`m facing some issues in my attempt to track the Special Information Tones (SIT) on this deployment ,where in the normal disconnect cause code 16 for all the calls are being reported to the Asterisk dialer on the SIP trunk. Ideally it should be the different cause codes for each of the SIT type. Could somebody please advise ,if this is supported with the Cisco Voice gateway platforms? This is kind of urgent for us.


39 Replies 39

paolo bevilacqua
Hall of Fame Master Hall of Fame Master
Hall of Fame Master

How exactly are you connecting to PSTN ? What is the SIt that are you talking about ?


Thanks for th equick turnaround. We are connecting to the PSTN though ISDN - T1. We would like to capture all the SIT tones and identify them with appropriate type. For example the PSTN disconnect cause code 1 is mapped with the Unallocated number (SIT), etc.,


There are no SIT tones with ISDN, and router present to the remote site any in-band tone during the call setup.

The cause codes are provided via Q931, and the router does the best mapping possible to/from SIP.

Hi Raj,

This is a new feature added in 12.4(20)YA for 5x00 series gateways. Check out the command reference for more information:

As of now, there isn't support on the ISR routers.



Nice, but the documentation states support for FXO* and CAS only. The OP mentioned ISDN instead.

* It would be also interesting to understand how FXO is supported as there is no such thing on the AS5xxx series.

I'm sure it's referencing T1 FXO lines, which nobody uses anyways.

Thought I would throw it out there because it's kind of nifty.


Hi Guys,

It`s right that the SIT informations are sent via the ISDN Q931 cause codes ,but the mapping part from the voice gateway seems to be working incorrectly ,as it always does the graceful disconnect and sends "16" as the cause code on the SIP trunk. Ideally this should be different values for each of the disconnect causes. For example , it should return the value of "1" for the unallocated number. So that the Asterisk would mark this call with the appropriate SIP cause code mapping configured on the same.

According to the documents and the "show sip-ua map pstn-sip" shows the correct mapping. But it always sends the normal clearing cause code "16" and that leads to our issue. Please advise. Could appreciate ,if you guys can give me your contact number to discuss the same.


Post a trace taken with "debug isdn q931" and "debug ccsip message" to prove your point.

Do not enable any other debug.


Please find the requested debugs from the voice gateway as attached. I have attached the traces from the Asterisk box as well. The test call was made to an unallocated number for which the disconnect cause code should have been "1" but we have got "16" instead.


Note: you're referring to Progress Indicator to SIP mapping, not disconnect cause to sip mapping.

The disconnect cause is 16 because asterisk is actually disconnecting in a normal manner, not the router or PSTN.

Anyway, do you have configured ?

voice service voip

signaling forward


I already have the Signalling forward unconditional command under the Voice services voip configured. The disconenction piece , I`m confused here. The Asterisk makes a call through SIP trunk to the Cisco VG and the call is hooked on to the PSTN. The call gets disconnected by the PSTN switch after the SIT tone being played and sends a disconnect message to the Cisco VG. The Cisco VG in turn should send the corresponding SIP message to the Asterisk. Please advise ,if my understanding is correct here.

If my understanding is correct ,then the disconnect event is not initiated by the Asterisk.


No, asterisk is disconnecting, see below. This is normal, as the person making the call, hangs up after listening to the PSTN announcement. If you was to wait longer, you could see PSTN disconnecting perhaps.

I agree the router should send an INFO message to reflect the PI "number unavailable", however to an human user, that does not make much of a difference.

.May 19 18:13:58.077: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:


CANCEL sip:912561366440@ SIP/2.0

Via: SIP/2.0/UDP;branch=z9hG4bK5c48ed41;rport


From: "6099772546" <6099772546>;tag=as7574b329

To: <912561366440>

Call-ID: 42d5a10b32a6f1e832a20309314d0965@

CSeq: 102 CANCEL

User-Agent: Asterisk PBX

Max-Forwards: 70

Content-Length: 0

Thanks for the input. Looks like the Asterisk is sending the disconnect message to the Cisco VG and VG sends the SIP hangup cause code 487 with ISDN Q931 disconnect cause code "16" back to the Asterisk. Its not the PI that I`m referring here.

Please take a look at the extract below for the SIP disconenct cause mapping with Q931 disconnect codes.

/* Causes for disconnection (from Q.931) */












The same mapping is found on the Cisco VG as well ,but it returns the incorrect code.

Please advise.


Hi, the thing is that the cancel message from asterisk does not specify a cause, consequently the router translates that to a normal disconnect to q931, as defined in the table you referenced.

On the other hand, router fails to forward PI for unallocated number that I think is what your problem is about.

I think it would forward that via H.323, but this is clearly irrelevant this discussion.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers