All, newbie to Asterisk and just trying to get a load of bits together including PSTN interface using Digium Quad E1 interfaces using EuroISDN. Question can I/how do I get access to the ISDN reason codes for call disconnect? The purpose is to be able to make routing choices based on the reason code returned from a PRI connected interface/channel. For example if the reason code indicates say "network congestion" or "no route" then I want to be able to try an alternative route by manipulating the digit string and retrying on another interface, for example to a SIP ITSP. Here's the scenario - call originates on IP cloud from an IP Phone/IAD/ATA connected via a proxy server (SER), destination PSTN via Asterisk, First choice route is out of an ISDN PRI port on the Digium board, if this route is either congested - no channels left to dial out on or the far end network has a problem such as can't route to that destination, Then take a second, third etc choice of route to that destination say via a SIP connection to another ITSP, or another PRI Interface connected to another PSTN provider. Any suggestions, thoughts, configuration examples and general advice welcome! Neill............;o) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20041022/eea4409c/attachment.htm
Peter Svensson
2004-Oct-22 04:11 UTC
[Asterisk-Users] Re: [Asterisk-Dev] Question about ISDN reason codes
On Fri, 22 Oct 2004, Neill Wilkinson wrote:> All, > > newbie to Asterisk and just trying to get a load of bits together > including PSTN interface using Digium Quad E1 interfaces using EuroISDN. > > Question can I/how do I get access to the ISDN reason codes for call > disconnect? The purpose is to be able to make routing choices based on > the reason code returned from a PRI connected interface/channel. For > example if the reason code indicates say "network congestion" or "no > route" then I want to be able to try an alternative route by > manipulating the digit string and retrying on another interface, for > example to a SIP ITSP.The HANGUPCAUSE variable in cvs after 2004-08-12 has the pri reason code: http://www.voip-info.org/tiki-index.php?page=Asterisk%20variable%20hangupcause Peter
Neill Wilkinson wrote:> All, > > newbie to Asterisk and just trying to get a load of bits together > including PSTN interface using Digium Quad E1 interfaces using EuroISDN. > > Question can I/how do I get access to the ISDN reason codes for call > disconnect?/path/to/asterisk/docs/README.variables Pay special attention to DIALSTATUS and to HANGUPCAUSE. -------------- next part -------------- A non-text attachment was scrubbed... Name: eric.vcf Type: text/x-vcard Size: 154 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20041022/a874bd65/eric.vcf
Yes. http://www.fnords.org/~eric/asterisk/downloads/macros.inc Pay special attention to the [macro-dial-result] joachim wrote:> > Did someone actually got this to work ? > > The examples on voip-info are not correct i think. > It will never go to priority 2, since the call already got hungup at > that point, using dial|g doesnt seem to work either. > > Joachim > > > At 04:17 22/10/2004, you wrote: > >> Neill Wilkinson wrote: >> >>> All, >>> newbie to Asterisk and just trying to get a load of bits together >>> including PSTN interface using Digium Quad E1 interfaces using EuroISDN. >>> Question can I/how do I get access to the ISDN reason codes for call >>> disconnect? >> >> >> /path/to/asterisk/docs/README.variables >> >> Pay special attention to DIALSTATUS and to HANGUPCAUSE.-------------- next part -------------- A non-text attachment was scrubbed... Name: eric.vcf Type: text/x-vcard Size: 146 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20041022/8697cf88/eric.vcf
exten => _91NXXNXXXXXX,1,Dial(${PSTN}/${EXTEN:1}) exten => _91NXXNXXXXXX,2,Macro(dial-result) joachim wrote:> > Thnx Eric, > > Could you also post your extensions.conf ? (or just the extension > calling that macro ?) > > Joachim > > > At 04:48 22/10/2004, you wrote: > >> Yes. http://www.fnords.org/~eric/asterisk/downloads/macros.inc Pay >> special attention to the [macro-dial-result] >> >> joachim wrote: >> >>> Did someone actually got this to work ? >>> The examples on voip-info are not correct i think. >>> It will never go to priority 2, since the call already got hungup at >>> that point, using dial|g doesnt seem to work either. >>> Joachim >>> >>> At 04:17 22/10/2004, you wrote: >>> >>>> Neill Wilkinson wrote: >>>> >>>>> All, >>>>> newbie to Asterisk and just trying to get a load of bits together >>>>> including PSTN interface using Digium Quad E1 interfaces using >>>>> EuroISDN. >>>>> Question can I/how do I get access to the ISDN reason codes for >>>>> call disconnect? >>>> >>>> >>>> >>>> /path/to/asterisk/docs/README.variables >>>> >>>> Pay special attention to DIALSTATUS and to HANGUPCAUSE.-------------- next part -------------- A non-text attachment was scrubbed... Name: eric.vcf Type: text/x-vcard Size: 146 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20041022/fe9ac6fe/eric.vcf
> -----Original Message----- > From: joachim [mailto:zoachien@securax.org] > Sent: Friday, October 22, 2004 6:15 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] Question about ISDN reason codes > > > > > Are you sure this works ? (and does it work whatever end hung up ?) > > If it works, its not expected behaviour. (at least i dont > think it is, it > should never go to the next priority when the call got hungup). > > zoa. > > At 05:06 22/10/2004, you wrote: > >exten => _91NXXNXXXXXX,1,Dial(${PSTN}/${EXTEN:1}) > >exten => _91NXXNXXXXXX,2,Macro(dial-result) > >Check out the current config/extensions.conf.sample. This is exactly How the relatively new dialstatus variable is used. Robert Jackson (Excerpt from extensions.conf.sample): [macro-stdexten]; ; ; Standard extension macro: ; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well ; ${ARG2} - Device(s) to ring ; exten => s,1,Dial(${ARG2},20) ; Ring the interface, 20 seconds maximum exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER) exten => s-NOANSWER,1,Voicemail(u${ARG1}) ; If unavailable, send to voicemail w/ unavail announce exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start exten => s-BUSY,1,Voicemail(b${ARG1}) ; If busy, send to voicemail w/ busy announce exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain
Yes it works. It will go to priority 2 if the call was NOT ANSWERED for any reason (busy, number not in service, etc). You may need to add ,,g on the Dial line to get Asterisk to go to priority two if the CALLEE hangs up. I do not do post call processing if the CALLER hangs up. joachim wrote:> > > Are you sure this works ? (and does it work whatever end hung up ?) > > If it works, its not expected behaviour. (at least i dont think it is, > it should never go to the next priority when the call got hungup). > > zoa. > > At 05:06 22/10/2004, you wrote: > >> exten => _91NXXNXXXXXX,1,Dial(${PSTN}/${EXTEN:1}) >> exten => _91NXXNXXXXXX,2,Macro(dial-result) >> >> joachim wrote: >> >>> Thnx Eric, >>> Could you also post your extensions.conf ? (or just the extension >>> calling that macro ?) >>> Joachim >>> >>> At 04:48 22/10/2004, you wrote: >>> >>>> Yes. http://www.fnords.org/~eric/asterisk/downloads/macros.inc Pay >>>> special attention to the [macro-dial-result] >>>> >>>> joachim wrote: >>>> >>>>> Did someone actually got this to work ? >>>>> The examples on voip-info are not correct i think. >>>>> It will never go to priority 2, since the call already got hungup >>>>> at that point, using dial|g doesnt seem to work either. >>>>> Joachim >>>>> >>>>> At 04:17 22/10/2004, you wrote: >>>>> >>>>>> Neill Wilkinson wrote: >>>>>> >>>>>>> All, >>>>>>> newbie to Asterisk and just trying to get a load of bits together >>>>>>> including PSTN interface using Digium Quad E1 interfaces using >>>>>>> EuroISDN. >>>>>>> Question can I/how do I get access to the ISDN reason codes for >>>>>>> call disconnect? >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> /path/to/asterisk/docs/README.variables >>>>>> >>>>>> Pay special attention to DIALSTATUS and to HANGUPCAUSE.-------------- next part -------------- A non-text attachment was scrubbed... Name: eric.vcf Type: text/x-vcard Size: 146 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20041022/f596686b/eric.vcf
Did someone actually got this to work ? The examples on voip-info are not correct i think. It will never go to priority 2, since the call already got hungup at that point, using dial|g doesnt seem to work either. Joachim At 04:17 22/10/2004, you wrote:>Neill Wilkinson wrote: >>All, >>newbie to Asterisk and just trying to get a load of bits together >>including PSTN interface using Digium Quad E1 interfaces using EuroISDN. >>Question can I/how do I get access to the ISDN reason codes for call >>disconnect? > >/path/to/asterisk/docs/README.variables > >Pay special attention to DIALSTATUS and to HANGUPCAUSE. > > >_______________________________________________ >Asterisk-Users mailing list >Asterisk-Users@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Thnx Eric, Could you also post your extensions.conf ? (or just the extension calling that macro ?) Joachim At 04:48 22/10/2004, you wrote:>Yes. http://www.fnords.org/~eric/asterisk/downloads/macros.inc Pay >special attention to the [macro-dial-result] > >joachim wrote: >>Did someone actually got this to work ? >>The examples on voip-info are not correct i think. >>It will never go to priority 2, since the call already got hungup at that >>point, using dial|g doesnt seem to work either. >>Joachim >> >>At 04:17 22/10/2004, you wrote: >> >>>Neill Wilkinson wrote: >>> >>>>All, >>>>newbie to Asterisk and just trying to get a load of bits together >>>>including PSTN interface using Digium Quad E1 interfaces using EuroISDN. >>>>Question can I/how do I get access to the ISDN reason codes for call >>>>disconnect? >>> >>> >>>/path/to/asterisk/docs/README.variables >>> >>>Pay special attention to DIALSTATUS and to HANGUPCAUSE. > > > >_______________________________________________ >Asterisk-Users mailing list >Asterisk-Users@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Are you sure this works ? (and does it work whatever end hung up ?) If it works, its not expected behaviour. (at least i dont think it is, it should never go to the next priority when the call got hungup). zoa. At 05:06 22/10/2004, you wrote:>exten => _91NXXNXXXXXX,1,Dial(${PSTN}/${EXTEN:1}) >exten => _91NXXNXXXXXX,2,Macro(dial-result) > >joachim wrote: >>Thnx Eric, >>Could you also post your extensions.conf ? (or just the extension calling >>that macro ?) >>Joachim >> >>At 04:48 22/10/2004, you wrote: >> >>>Yes. http://www.fnords.org/~eric/asterisk/downloads/macros.inc Pay >>>special attention to the [macro-dial-result] >>> >>>joachim wrote: >>> >>>>Did someone actually got this to work ? >>>>The examples on voip-info are not correct i think. >>>>It will never go to priority 2, since the call already got hungup at >>>>that point, using dial|g doesnt seem to work either. >>>>Joachim >>>> >>>>At 04:17 22/10/2004, you wrote: >>>> >>>>>Neill Wilkinson wrote: >>>>> >>>>>>All, >>>>>>newbie to Asterisk and just trying to get a load of bits together >>>>>>including PSTN interface using Digium Quad E1 interfaces using EuroISDN. >>>>>>Question can I/how do I get access to the ISDN reason codes for call >>>>>>disconnect? >>>>> >>>>> >>>>> >>>>>/path/to/asterisk/docs/README.variables >>>>> >>>>>Pay special attention to DIALSTATUS and to HANGUPCAUSE. > > > >_______________________________________________ >Asterisk-Users mailing list >Asterisk-Users@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Aha, oke :) I was thinking of the answered statuses. That g was not working for me last time i checked. But so at least its working when a call did not get answered, thats already good news for me. Thanks a lot... Joachim At 05:23 22/10/2004, you wrote:>Yes it works. It will go to priority 2 if the call was NOT ANSWERED for >any reason (busy, number not in service, etc). You may need to add ,,g on >the Dial line to get Asterisk to go to priority two if the CALLEE hangs up. > >I do not do post call processing if the CALLER hangs up. > >joachim wrote: >> >>Are you sure this works ? (and does it work whatever end hung up ?) >>If it works, its not expected behaviour. (at least i dont think it is, it >>should never go to the next priority when the call got hungup). >>zoa. >>At 05:06 22/10/2004, you wrote: >> >>>exten => _91NXXNXXXXXX,1,Dial(${PSTN}/${EXTEN:1}) >>>exten => _91NXXNXXXXXX,2,Macro(dial-result) >>> >>>joachim wrote: >>> >>>>Thnx Eric, >>>>Could you also post your extensions.conf ? (or just the extension >>>>calling that macro ?) >>>>Joachim >>>> >>>>At 04:48 22/10/2004, you wrote: >>>> >>>>>Yes. http://www.fnords.org/~eric/asterisk/downloads/macros.inc Pay >>>>>special attention to the [macro-dial-result] >>>>> >>>>>joachim wrote: >>>>> >>>>>>Did someone actually got this to work ? >>>>>>The examples on voip-info are not correct i think. >>>>>>It will never go to priority 2, since the call already got hungup at >>>>>>that point, using dial|g doesnt seem to work either. >>>>>>Joachim >>>>>> >>>>>>At 04:17 22/10/2004, you wrote: >>>>>> >>>>>>>Neill Wilkinson wrote: >>>>>>> >>>>>>>>All, >>>>>>>>newbie to Asterisk and just trying to get a load of bits together >>>>>>>>including PSTN interface using Digium Quad E1 interfaces using EuroISDN. >>>>>>>>Question can I/how do I get access to the ISDN reason codes for >>>>>>>>call disconnect? >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>/path/to/asterisk/docs/README.variables >>>>>>> >>>>>>>Pay special attention to DIALSTATUS and to HANGUPCAUSE. > > > >_______________________________________________ >Asterisk-Users mailing list >Asterisk-Users@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users