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

Marc Haisenko haisenko at comdasys.com
Thu Nov 24 05:04:47 MST 2005


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



More information about the asterisk-dev mailing list