[asterisk-users] Possible bug in Hangup() (Asterisk 1.4.x)

Steve Davies davies147 at gmail.com
Fri Apr 15 09:07:26 CDT 2011


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



More information about the asterisk-users mailing list