Vlasis Hatzistavrou
2011-Apr-15 12:02 UTC
[asterisk-users] Possible bug in Hangup() (Asterisk 1.4.x)
Hello,
On an Asterisk 1.4.33.1 in a simple scenario:
[test]
exten => _X.,1,Dial(SIP/12345 at peer01,,,)
exten => i,1,Hangup(${HANGUPCAUSE})
exten => t,1,Hangup(${HANGUPCAUSE})
exten => h,1,Hangup(${HANGUPCAUSE})
I have noticed that no matter what value we set in the Hangup(<cause
code>) commands, if the call is not answered by peer01 for any reason,
the actual cause code returned to the calling party is a 503, no matter
what the ${HANGUPCAUSE} is.
Even if we set a fixed value like Hangup(1) (which should give a 404) or
Hangup(17) (which should give a 486), the cause code returned is always
a 503.
Has anyone else noticed this? I went through the issue tracker but I
couldn't find any relevant bug posted in the past. I am certain that in
previous versions I could set the reply message to the desired value, so
I wonder if this is a bug in this particular version (1.4.33.1).
--
Best regards,
Vlasis Hatzistavrou.
Jim Dickenson
2011-Apr-15 13:22 UTC
[asterisk-users] Possible bug in Hangup() (Asterisk 1.4.x)
My guess is since the call was never answered you should be looking at
${DIALSTATUS}
--
Jim Dickenson
mailto:dickenson at cfmc.com
CfMC
http://www.cfmc.com/
On Apr 15, 2011, at 5:02 AM, Vlasis Hatzistavrou wrote:
> Hello,
>
> On an Asterisk 1.4.33.1 in a simple scenario:
>
> [test]
> exten => _X.,1,Dial(SIP/12345 at peer01,,,)
>
> exten => i,1,Hangup(${HANGUPCAUSE})
> exten => t,1,Hangup(${HANGUPCAUSE})
> exten => h,1,Hangup(${HANGUPCAUSE})
>
>
> I have noticed that no matter what value we set in the Hangup(<cause
code>) commands, if the call is not answered by peer01 for any reason, the
actual cause code returned to the calling party is a 503, no matter what the
${HANGUPCAUSE} is.
>
> Even if we set a fixed value like Hangup(1) (which should give a 404) or
Hangup(17) (which should give a 486), the cause code returned is always a 503.
>
> Has anyone else noticed this? I went through the issue tracker but I
couldn't find any relevant bug posted in the past. I am certain that in
previous versions I could set the reply message to the desired value, so I
wonder if this is a bug in this particular version (1.4.33.1).
>
> --
> Best regards,
> Vlasis Hatzistavrou.
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
Vlasis Hatzistavrou
2011-Apr-15 13:46 UTC
[asterisk-users] Possible bug in Hangup() (Asterisk 1.4.x)
Hello Jim,
Thank you for the reply.
The problem is not reading the ${HANGUPCAUSE} or the ${DIALSTATUS}. It
is that the Hangup(<cause>) command seems to ignore its argument and
just sends a 503 cause to the caller for all unanswered calls no matter
what...
Hangup(<cause>) was working as expected in previous versions and I
wonder if something was broken along the way that went by unnoticed. I
am just asking in the list in case I am missing something too obvious
before posting a bug.
--
Best regards,
Vlasis Hatzistavrou.
On 15/4/2011 4:22 ??, Jim Dickenson wrote:> My guess is since the call was never answered you should be looking at
${DIALSTATUS}
Jim Dickenson
2011-Apr-15 14:01 UTC
[asterisk-users] Possible bug in Hangup() (Asterisk 1.4.x)
If what you showed is your whole dialplan then none of the i or t or h extensions are going to be executed for a non answered call. -- Jim Dickenson mailto:dickenson at cfmc.com CfMC http://www.cfmc.com/ On Apr 15, 2011, at 6:46 AM, Vlasis Hatzistavrou wrote:> Hello Jim, > > Thank you for the reply. > > The problem is not reading the ${HANGUPCAUSE} or the ${DIALSTATUS}. It is that the Hangup(<cause>) command seems to ignore its argument and just sends a 503 cause to the caller for all unanswered calls no matter what... > > Hangup(<cause>) was working as expected in previous versions and I wonder if something was broken along the way that went by unnoticed. I am just asking in the list in case I am missing something too obvious before posting a bug. > > -- > Best regards, > Vlasis Hatzistavrou. > > > > On 15/4/2011 4:22 ??, Jim Dickenson wrote: >> My guess is since the call was never answered you should be looking at ${DIALSTATUS} > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Steve Davies
2011-Apr-15 14:07 UTC
[asterisk-users] Possible bug in Hangup() (Asterisk 1.4.x)
On 15 April 2011 13:02, Vlasis Hatzistavrou <vhatz at kinetix.gr> wrote:> Hello, > > On an Asterisk 1.4.33.1 in a simple scenario: > > [test] > exten => _X.,1,Dial(SIP/12345 at peer01,,,) > > exten => i,1,Hangup(${HANGUPCAUSE}) > exten => t,1,Hangup(${HANGUPCAUSE}) > exten => h,1,Hangup(${HANGUPCAUSE}) > > > I have noticed that no matter what value we set in the Hangup(<cause code>) > ?commands, if the call is not answered by peer01 for any reason, the actual > cause code returned to the calling party is a 503, no matter what the > ${HANGUPCAUSE} is. > > Even if we set a fixed value like Hangup(1) (which should give a 404) or > Hangup(17) (which should give a 486), the cause code returned is always a > 503. > > Has anyone else noticed this? I went through the issue tracker but I > couldn't find any relevant bug posted in the past. I am certain that in > previous versions I could set the reply message to the desired value, so I > wonder if this is a bug in this particular version (1.4.33.1). >Strictly speaking you can only Hangup (BYE) an answered and fully established call. In SIP terms, a hangup that occurs before an answer is a CANCEL, and I believe a CANCEL is always represented by a 503 code in chan_sip. Regards, Steve
Vlasis Hatzistavrou
2011-Apr-15 14:11 UTC
[asterisk-users] Possible bug in Hangup() (Asterisk 1.4.x)
The h extension is executed after the remote end peer01 rejects the call
with a 408. I verified it by altering the dialplan as:
[test]
exten => _X.,1,Dial(SIP/12345 at peer01,,,)
exten => i,1,Hangup(${HANGUPCAUSE})
exten => t,1,Hangup(${HANGUPCAUSE})
exten => h,1,NoOp("Hangup cause is: ${HANGUPCAUSE})
exten => h,n,Hangup(${HANGUPCAUSE})
and I saw in the Asterisk CLI that the correct hangupcause is shown.
--
Best regards,
Vlasis Hatzistavrou.
On 15/4/2011 5:01 ??, Jim Dickenson wrote:> If what you showed is your whole dialplan then none of the i or t or h
extensions are going to be executed for a non answered call.