[Asterisk-Dev] Signal timing can bring down Asterisk

Kristian Nielsen kn at sifira.dk
Tue Aug 16 06:20:40 MST 2005


Armin Schindler <armin at melware.de> writes:

> What is the problem by calling ast_hangup()? Many channel drivers do call 
> ast_hangup() in their own (additional) threads when an event like 
> hangup occurs.

Well I could be wrong :-). I just had the impression that it was the
responsibility of the one who called ast_request() to also call
ast_hangup() at the end.

> If ast_hangup() is wrong, how should the event of a hangup shall be signaled 
> to the pbx ?

I would think that the proper way would be to return a
AST_CONTROL_HANGUP control packet from the tech->read() callback, or
alternatively to queue one using ast_queue_frame(). The latter is
actually what ast_softhangup() does.

 - Kristian.

-- 
Kristian Nielsen   kn at sifira.dk
Development Manager, Sifira A/S




More information about the asterisk-dev mailing list