[Asterisk-Dev] Calling PBX functions from a custom app

gary.barnett at comcast.net gary.barnett at comcast.net
Mon Sep 27 12:26:07 MST 2004


Thanks - I'll try the ast_softhangup() to see if that works.  

-------------- Original message -------------- 

> >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 
> 
> 
> 
> 
> 
> _______________________________________________ 
> Asterisk-Dev mailing list 
> Asterisk-Dev at lists.digium.com 
> http://lists.digium.com/mailman/listinfo/asterisk-dev 
> To UNSUBSCRIBE or update options visit: 
> http://lists.digium.com/mailman/listinfo/asterisk-dev 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20040927/ec1f7651/attachment.htm


More information about the asterisk-dev mailing list