[asterisk-dev] SIP disconnect code
Johansson Olle E
oej at edvina.net
Sun Jul 20 03:27:40 CDT 2008
20 jul 2008 kl. 00.46 skrev Carles Pina i Estany:
> Sometimes I would like to know the disconnect reason from a call. The
> most exact variable that I have in the dialplan is HANGUPCAUSE, that
> a SIP channel comes from channels/chan_sip.c function
> (if I'm wrong in this point I'm sorry and I'm wasting your time...
> that's what I've found)
> 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
> 604, etc.) so I'm thinking to implement and send the patch.
> I wonder if:
> a) it's in Asterisk and I haven't found (sorry for the noise in -dev
> b) it's not in Asterisk for some reason (which reason? :-) )
> c) is there any interest if I send the patch or only me is
> interested on
It has been discussed many times, but since Asterisk is a
multiprotocol PBX, we don't
recommend it and won't include it. What would you do if you forked a
call to three
phones and got different results? And if one of the forks is not SIP?
There's a lot of logic to write, that we already have for the core
More information about the asterisk-dev