[asterisk-dev] AMI Originate, OutgoingSpoolFailed and PRI reason code

Andre Courchesne courchea at net-forces.com
Sun Jun 12 22:51:58 CDT 2011

Hi all, I am trying to determine ring-no-answer from disconnected calls on PRI when issuing calls via AMI Originate. The following is the Originate syntax:

Action: originate
Channel: DAHDI/g0/17057286882
CallerId: NAME<5551111212>
Exten: s
Context: cadenceur
Priority: 1
Variable: projet=cadenceur,telkey=7057296882,number=7057296882,interviewer=444,lot=XoJauX8AAAEAAGRMGC8AAAAE119181306942954,ndanslot=2,enregistrer=1
Async: 1

When the call is either not answered or is disconnected (PRI reason code 1), a new channel OutgoingSpoolFailed is created and is executed. This is fine, however this new channel does not have the PRI reason code... The following pastebin is the full PRI debug of such an originate on number 17057286882 which is a real disconnected number.


You can see at line 55 where we get the "PROGRESS with cause code 1 received" which is outputted by chan_dahdi code.

I tried patching chan_dahdi to have it post a new variable to the dialplan with the last reason code, but it did not work. I guess that the variable got posted to the DAHDI channel but not to the OutgoingSpoolFailed channel.

Any way I can get the real PRI reason code when doing AMI Originate ?

Andre Courchesne - Consultant
MSN: courchea at net-forces.com
Skype: VoipForces

L'information contenue dans le présent document est la propriété de Andre Courchesne. Et est divulguée en toute confidentialité. Cette information ne doit pas être utilisée, divulguée à d'autres personnes ou reproduite sans le consentement écrit explicite de Andre Courchesne.

The information contained in this document is confidential and property of Andre Courchesne. It shall not be used, disclosed to others or reproduced without the express written consent of Andre Courchesne.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110612/81dcaf1d/attachment.htm>

More information about the asterisk-dev mailing list