Hi people! 

Sorry for bringing up some annoying issue.. yes, it's AMD again...

But I was searching the last days for a solution for my problem and
didn't really find anything. Now I'm hoping that someone of you has
maybe an idea for me. :)


My setup:
---------
I use the Asterik Manager API to generate outgoing calls (by using
"Originate" messages).

These outgoing calls are placed to a SIP IVR-Server (dialog system
with speech recognition) and are then connected out to real-world
users via the dialplan using "Dial()" (see context below).

(The reason why the first call-leg goes to the voice-server and not to
the user is for reliability reasons. I don't want to annoy users with
calls which cannot be established, when the voice-server is down for
example.)


My problem:
-----------
Somehow I should be able to detect, if an answering machine answers on
the second outgoing call leg (caused by the Dial(), going out to the
real-life person) and I should somehow be able to inform the
voice-server about this fact.


My naive first idea:
--------------------
I thought I could use the dialplan application AMD() and if it detects
an answering machine, I could play a pre-defined text, or
DTMF-sequence, which in fact will be recognized by the voice-server
which should interrupt its "human" dialog and restart with the
"machine" dialog.

BUT: I found out that my AMD() command in the dialplan after the
Dial() never gets executed. :( As far as I understood, it's not
possible to execute further commands after the Dial(). (Maybe I'm
wrong. Please correct me, if so..).



Hmm.. And here I'm stuck. Has anybody some idea for me where I can
start looking for further solutions? Any help would be appreciated!!
:)


Thanks in advance!!!

Best regards and greetings from Austria!
johnny



P.S.:

Some detail infos:

I'm using Asterisk 1.2.9.1.

I installed app_amd from http://www.freedomphones.net/files/app_amd2.c

My dialplan context for generating the outgoing calls looks like this
(I use AEL):


context 1000_amd_tests {

  _0043[1-9]. => {
        // be verbose.. :)
        Verbose(0,InfoInfo ${CONTEXT} - ${EXTEN} called on
${CHANNEL}.);

        // set our callerId to the correct id
        Set(CALLERID(number)=xxxxxxxxxx);

        // absolute call timeout
        Set(TIMEOUT(absolute)=3600;

        // debug
        Verbose(0,DebugDebug Will execute Dial on ${CHANNEL}.);

        // now dial to reallife user, timeout 300 because, we will
abort
        // via manager API if we decide it takes too long
        Dial(Zap/r1/${EXTEN:4,0},300);

        // debug
        Verbose(0,DebugDebug we are now after Dial on ${CHANNEL}.);

        // try AMD (configured through amd.conf)
        AMD(); 

        // debug
        Verbose(0,DebugDebug AMD ${AMDSTATUS} - ${AMDCAUSE}.);

        Hangup();
  };

  T => {
        Verbose(0,WARN timeout - ${CONTEXT} ${EXTEN} on ${CHANNEL}.);
        Hangup();
  };

};



An exmplaric Originate message for generating a call looks like this:

action: Originate
actionid: 25326212_156#20070531_193654_987_0043650xxxxxxx
timeout: 15000
exten: 0043650xxxxxxx
account: 8594
async: true
callerid: 6437
context: 1000_amd_tests
priority: 1
channel: SIP/[EMAIL PROTECTED]

Note: "callerid" is what the voice-server sees, not the real-life
person.


_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to