Call disconnect for asterisk -



Call disconnect for asterisk -

how capture phone call disconnect asterisk using phpagi ? e.g. if user disconnects phone call event invoked ? how capture ?

you can check homecoming results of php-agi api calls, illustration stream_file returns -1 on hangup.

you invoke agi script on h extension in dialplan.

if have clean something, register shutdown function.

another approach register signal handler edmund long described in blog. pcntl php extension, enable pcntl recompile php --enable-pcntl.

<?php declare(ticks=1); function sig_handler($signo) { //do stuff in here exit(0); } //register hangup handler if (function_exists('pcntl_signal')) { pcntl_signal(sighup, "sig_handler"); }

asterisk disconnect ivr

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -