Andreas Sikkema wrote:
Using the MYSQL functions from asterisk-addons....[EMAIL PROTECTED] wrote: extensions.conf [macro-open-connection] exten => s,1,MYSQL(Connect connid ..... exten => s,2,SetVar(OPEN-CON=1) [macro-close-connection] exten => s,1,GotoIf(${OPEN-CON}?5) exten => s,5,MYSQL(Close ${connid}) Then call the open macro when you first receive a call, and make sure in your hangup (exten => h) function you call the close macro. If you have an include => hangup in all your contexts, the close macro will be called anytime a hangup is received and it will close any connection you opened for that call. |
_______________________________________________ --Bandwidth and Colocation sponsored by Easynews.com -- Asterisk-Users mailing list [email protected] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
