[asterisk-dev] SIP disconnect code

Philipp Kempgen philipp.kempgen at amooma.de
Mon Jul 21 11:47:10 CDT 2008


Tilghman Lesher schrieb:
> 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> 
> 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.
> 
> 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).

"200 OK"
"302 Moved Temporarily"
"404 Not Found"
...


Grüße,
Philipp Kempgen
-- 
http://www.das-asterisk-buch.de  -  http://www.the-asterisk-book.com
Amooma GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998



More information about the asterisk-dev mailing list