[Asterisk-Dev] Calling PBX functions from a custom app
TC
trclark at shaw.ca
Mon Sep 27 12:22:06 MST 2004
>Does anyone have experience calling the "built-in" PBX functions from a
custom >app? I called a custom app from extensions.conf when a call
arrived, and was able to >answer the call from within the app
(ast_answer()), play messages
>(ast_play_and_wait()), but when I called ast_hangup(), it SF'ed.
I think i have seen this b4 ast_hangup does a some mem mangement in here as
well
(free ...) so since your app does did not create the thread but you want
call
ast_hangup direct you are going to be freeing some structs that the owner
thread
wants to manage,
unfortunately ast does not use mem pools & the rules of mem mgmt in * are
not
spelled out in any proggy docs you kind have to look & see what pattern has
been
used, in this case you can use ast_softhangup, then the channel thread will
do the right thing
More information about the asterisk-dev
mailing list