[asterisk-dev] app_alarmreceiver

Francisco Fernandes ff.vipvoz at gmail.com
Wed Jan 27 13:24:20 CST 2010


The idea....


based on app_mwanalyze and app_alarmreceiver, we could do something like
this:

 exten => 8000,1,AlarmTransmitter(ZAP/
00102312314,101);


then app_AlarmTransmitter.c

function detect_tones(frequency, duration)

function detect_ack()
{
        while (!detect_tones(1400,50)){
             <count time, for timeout-> in case of timeout -> break ,
hangup, try again, count tries>
             if detect -< t1=true, break;
        }
      sleep 50 ms
     while (!detect_tones(2300,50)){
             <count time, for timeout-> in case of timeout -> break ,
hangup, try again, count tries>
             if detect -< t2=true, break;
        }
       if (t1 and t2) return true else false;
}

static int alarmtransmitter_exe(struct ast_channel *chan, void *data)
{
      if (detect_ack())
      {
            transmit message, thru dtmf
      }
     if (detect_kissoff())
     {
         set variable to true
     }
    else
    {
         set variable to false
     }
  }


2010/1/27 Kaloyan Kovachev <kkovachev at varna.net>

> Hi,
>
> On Wed, 27 Jan 2010 01:17:34 +0000, Francisco Fernandes wrote
> > Hi,
> > Has anyone tried to do the reverse? meaning, send an ademco contact_id
> from
> asterisk to an ademco central (receiver) ? how could one do this? does one
> have to compile a new module or would it be possible to do it, using agi,
> or
> something...?
> >
> > Thanks
>
>  I have not tried, but it should be possible. The simpliest way is to just
> send the DTMFs of the message few seconds after answer and to hope it is
> corectly received.
>
>  In order to be sure it is correctly received you will need to make
> application which will detect the ACK and kissoff signals (no DSP routines
> in
> asterisk for this) returning a variable, which one have been received. Then
> in
> the dialplan wait for ACK tone (1400Hz 100ms folowed by 2300Hz 100ms)
> before
> you start sending DTMF, then wait for kissoff (1400Hz 900ms) to confirm
> correctness or another ACK to repeat it.
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> 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/20100127/541cf3e5/attachment.htm 


More information about the asterisk-dev mailing list