Thanks Dovid! Indeed looks a bug but regardless of this, this problem made me think that the HANGUPCAUSE could be used for this purpose with benefits. I couldn't find an explanation about when DIALSTATUS would actually be better. The HANGUPCAUSE was reworked in version 11 ( https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause) but I didn't find someone actually stating it is a better alternative or replacement to the DIALSTATUS or something similar. Cheers, Patrick Wakano On 14 March 2018 at 13:30, Dovid Bender <dovid at telecurve.com> wrote:> I would think that is a bug since the only time DIALSTATUS = BUSY is where > you got a 486 or 600 (as per https://wiki.asterisk.org/ > wiki/display/AST/Hangup+Cause+Mappings). > > On Tue, Mar 13, 2018 at 10:11 PM, Patrick Wakano <pwakano at gmail.com> > wrote: > >> Hello list, >> Hope all doing well! >> >> I've been checking some cases when a Dial fails and dialplan execution >> continues to handle this. I am finding it a little confusing how we should >> handle the DIALSTATUS and the HANGUPCAUSE in this situation.... >> More specifically, I am facing a case in version 13.6.0 where I am >> getting a DIALSTATUS=BUSY and HANGUPCAUSE=19 after receiving a 480 SIP >> error. Seems wrong to me, since 480 should be converted to HANGUPCAUSE=19 >> and DIALSTATUS = NOANSWER (https://wiki.asterisk.org/wik >> i/display/AST/Hangup+Cause+Mappings). Anyway I am thinking about >> actually not checking the DIALSTATUS anymore and just rely on the >> HANGUPCAUSE, which seems more powerful. >> Looks like for a pure SIP environment the HANGUPCAUSE would have a more >> accurate information about the error. So question is can I always use this >> info and completely ignore what the DIALSTATUS is? >> Or does someone knows exactly where is more suitable to use one over the >> other? >> >> Thanks, >> Kind regards, >> Patrick Wakano >> >> -- >> _____________________________________________________________________ >> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >> >> Check out the new Asterisk community forum at: >> https://community.asterisk.org/ >> >> New to Asterisk? Start here: >> https://wiki.asterisk.org/wiki/display/AST/Getting+Started >> >> asterisk-users mailing list >> To UNSUBSCRIBE or update options visit: >> http://lists.digium.com/mailman/listinfo/asterisk-users >> > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: https://community.asterisk. > org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20180314/8eb63c2e/attachment.html>
In article <CAPu3kNV8w+bYQT0W+QbnTSby0V5gfjLqZXq15c4i5enr_-tJtg at mail.gmail.com>, Patrick Wakano <pwakano at gmail.com> wrote:> > Thanks Dovid! > Indeed looks a bug but regardless of this, this problem made me think that > the HANGUPCAUSE could be used for this purpose with benefits. > I couldn't find an explanation about when DIALSTATUS would actually be > better. > The HANGUPCAUSE was reworked in version 11 ( > https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause) but I didn't find > someone actually stating it is a better alternative or replacement to the > DIALSTATUS or something similar.I think you should always check DIALSTATUS, as that will be set regardless of the way in which a dial fails. I believe HANGUPCAUSE is set to the Q.931 code received from PRI or SIP when a call is rejected or terminated. However, there could be other mechanisms for failure (such as failure to create a channel within Asterisk, or an attempt to send to an unreachable peer), that may set DIALSTATUS without setting HANGUPCAUSE. So HANGUPCAUSE should be considered as extra detail, rather than a replacement or alternative to DIALSTATUS. Cheers Tony -- Tony Mountifield Work: tony at softins.co.uk - http://www.softins.co.uk Play: tony at mountifield.org - http://tony.mountifield.org
That's really good info Tony! Thanks very much for the response! I will consider this to implement a better approach for the failed cases! Cheers, Patrick Wakano On 14 March 2018 at 20:44, Tony Mountifield <tony at softins.co.uk> wrote:> In article <CAPu3kNV8w+bYQT0W+QbnTSby0V5gfjLqZXq15c4i5enr_- > tJtg at mail.gmail.com>, > Patrick Wakano <pwakano at gmail.com> wrote: > > > > Thanks Dovid! > > Indeed looks a bug but regardless of this, this problem made me think > that > > the HANGUPCAUSE could be used for this purpose with benefits. > > I couldn't find an explanation about when DIALSTATUS would actually be > > better. > > The HANGUPCAUSE was reworked in version 11 ( > > https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause) but I didn't > find > > someone actually stating it is a better alternative or replacement to the > > DIALSTATUS or something similar. > > I think you should always check DIALSTATUS, as that will be set regardless > of > the way in which a dial fails. I believe HANGUPCAUSE is set to the Q.931 > code > received from PRI or SIP when a call is rejected or terminated. However, > there > could be other mechanisms for failure (such as failure to create a channel > within Asterisk, or an attempt to send to an unreachable peer), that may > set > DIALSTATUS without setting HANGUPCAUSE. > > So HANGUPCAUSE should be considered as extra detail, rather than a > replacement > or alternative to DIALSTATUS. > > Cheers > Tony > -- > Tony Mountifield > Work: tony at softins.co.uk - http://www.softins.co.uk > Play: tony at mountifield.org - http://tony.mountifield.org > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: https://community.asterisk. > org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20180316/cd4fd95d/attachment.html>