<html><body>
Thanks - I'll try the ast_softhangup() to see if that works. <BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">-------------- Original message -------------- <BR><BR>> >Does anyone have experience calling the "built-in" PBX functions from a <BR>> custom >app? I called a custom app from extensions.conf when a call <BR>> arrived, and was able to >answer the call from within the app <BR>> (ast_answer()), play messages <BR>> >(ast_play_and_wait()), but when I called ast_hangup(), it SF'ed. <BR>> I think i have seen this b4 ast_hangup does a some mem mangement in here as <BR>> well <BR>> (free ...) so since your app does did not create the thread but you want <BR>> call <BR>> ast_hangup direct you are going to be freeing some structs that the owner <BR>> thread <BR>> wants to manage, <BR>> unfortunately ast does not use mem pools & the rules of mem mgmt in * are <BR>> not <BR>> spelled out in any proggy docs you kind have to look & see what pattern has <BR>> been <BR>> used, in this case you can use ast_softhangup, then the channel thread will <BR>> do the right thing <BR>> <BR>> <BR>> <BR>> <BR>> <BR>> _______________________________________________ <BR>> Asterisk-Dev mailing list <BR>> Asterisk-Dev@lists.digium.com <BR>> http://lists.digium.com/mailman/listinfo/asterisk-dev <BR>> To UNSUBSCRIBE or update options visit: <BR>> http://lists.digium.com/mailman/listinfo/asterisk-dev </BLOCKQUOTE></body></html>