The idea....<br><br><br>based on app_mwanalyze and app_alarmreceiver, we could do something like this:<br><br> exten => 8000,1,AlarmTransmitter(ZAP/<div id=":yx" class="ii gt">00102312314,101);<br><br><br>then app_AlarmTransmitter.c<br>
<br>function detect_tones(frequency, duration)<br>
<br>function detect_ack()<br>{<br> while (!detect_tones(1400,50)){<br>
<count time, for timeout-> in case of timeout -> break , hangup, try again, count tries><br>
if detect -< t1=true, break;<br>
}<br>
sleep 50 ms<br>
while (!detect_tones(2300,50)){<br>
<count time, for timeout-> in case of timeout -> break , hangup, try again, count tries><br>
if detect -< t2=true, break;<br>
}<br> if (t1 and t2) return true else false;<br>}<br><br>static int alarmtransmitter_exe(struct ast_channel *chan, void *data)<br>{<br> if (detect_ack())<br> {<br> transmit message, thru dtmf<br>
}<br> if (detect_kissoff())<br> {<br> set variable to true<br> }<br> else<br> {<br> set variable to false<br> }<br> }</div>