[asterisk-dev] SIP disconnect code
tilghman at mail.jeffandtilghman.com
Mon Jul 21 10:40:54 CDT 2008
On Monday 21 July 2008 10:26:11 Tim Ringenbach wrote:
> On Sat, Jul 19, 2008 at 5:46 PM, Carles Pina i Estany <carles at pina.cat>
> > 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.
Or HANGUPCAUSETEXT, a freeform text field that may contain just about
anything, but which certain channel drivers may set to a particular format.
IAX, in particular, sends both a hangup cause code, as well as a freeform text
field. If somebody wanted to implement this, I don't see why it would be
disallowed. The only caveat I'd have about SIP is that the text field should
contain readable text, in addition to the numeric code (although in a format
that allows the numeric code to be extracted easily).
More information about the asterisk-dev