[asterisk-dev] SIP disconnect code

Tim Ringenbach tim.ringenbach at gmail.com
Mon Jul 21 10:26:11 CDT 2008


On Sat, Jul 19, 2008 at 5:46 PM, Carles Pina i Estany <carles at pina.cat> wrote:
> hangup_sip2cause function could give the same HANGUPCAUSE for more
> than one SIP disconnect reason, like in the trunk version 481 and 482
> SIP codes will return AST_CAUSE_INTERWORKING (defined in
> include/asterisk/causes.h, Q.931 disconnect codes).
>
> Because sometimes I need to know the SIP disconnect code, I don't see
> any reason that we don't have a SIPHANGUPCAUSE with the SIP reason (404,
> 604, etc.) so I'm thinking to implement and send the patch.
>

I would be interested in this, and I wouldln't mind having the message
set in another variable too.

Someone mentioned it wouldn't make sense if multiple outbound channels
were called at once. What does asterisk do with HANGUPCAUSE now if
there are multiple outbound calls?

I disagree with the idea that it violates the protocol neutral design.
IMO, one needs to provider both a HANGUPCAUSE and a
TECHxxxHANGUPCAUSE. Then you can recommend that things rely on
HANGUPCAUSE, but the power to access exactly what happened isn't lost
and can be used for those special cases that need it.

--Tim



More information about the asterisk-dev mailing list