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

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Wed Nov 23 11:02:36 MST 2005


On Wednesday 23 November 2005 11:19, Marc Haisenko wrote:
> On Wednesday 23 November 2005 18:10, Tilghman Lesher wrote:
> > On Wednesday 23 November 2005 10:45, imran ahmed wrote:
> > > You need to use ast_hangup on channels that are not in the
> > > dialplan. May be you are holding the channel lock before calling
> > > ast_hangup in this case.
> >
> > ast_hangup() should only ever be called by a channel driver on its
> > own channel (and even then, only in the channel's hangup routine). 
> > For all other cases, you need to request the hangup via
> > ast_softhangup() and let the channel process the hangup when it is
> > ready.
>
> But exactly this is my problem: ast_softhangup doesn't seem to work
> (see my original mail).

Try ast_queue_hangup, instead.  The channel may be waiting for a frame
that never comes.

-- 
Tilghman



More information about the asterisk-dev mailing list