[Asterisk-Dev] Problem with hanging up a SIP channel

imran ahmed codentest at gmail.com
Thu Nov 24 12:15:18 MST 2005


Just a note that you cannot hangup the original incoming channel using
ast_hangup (use ast_softhangup only on that channel) because asterisk
expects that channel to be returned back to the dialplan.

On 11/24/05, Marc Haisenko <haisenko at comdasys.com> wrote:
> On Wednesday 23 November 2005 14:38, Marc Haisenko wrote:
> > To call a destination, a spawn a new thread (through ast_pthread_create)
> > which uses ast_request_and_dial to call the destination. If it picks up,
> > ast_request_and_dial returns a channel which is in AST_STATE_UP (this is
> > checked and logged). But if I call ast_softhangup on that channel no BYE
> > SIP message is ever sent, though the application notices that the channel
> > went down.
>
> Just wanted to let you know:
>
> I tried both ast_queue_hangup (suggested by Tilghman Lesher) and ast_hangup
> (suggested by Imran Ahmed).
>
> Calling ast_queue_hangup seems to have the same effect as ast_softhangup. The
> BYE message isn't sent.
>
> If I call ast_hangup outside of a ast_waitfor everything works as expected (I
> also set chan->hangupcause = AST_SOFTHANGUP_EXPLICIT, I've no idea whether
> this is needed but it doesn't seem to hurt either ;-).
>
> I can now concentrate on my other problems, thanks for helping me !
> C'ya,
>        Marc
>
> --
> Marc Haisenko
> Comdasys AG
>
> Rüdesheimer Straße 7
> D-80686 München
> Tel: +49 (0)89 - 548 43 33 0
> Fax: +49 (0)89 - 548 43 33 29
> e-mail: haisenko at comdasys.com
> http://www.comdasys.com
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev
>



More information about the asterisk-dev mailing list