Hi all, Another question for today, hope an answer for this one. I have a program talking with asterisk via the AMI. I receive events, and I would like to insert some events in the dialplan, which could be catch by my program. Any idea how to do this ? Greg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061122/22056ab6/attachment.htm
Sorry, asking too quickly, that?s what i?m looking for : http://www.voip-info.org/wiki/index.php?page=Asterisk+Manager+API+Action+Eve nts Greg _____ De : asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] De la part de Gregory Duchatelet Envoy? : mercredi 22 novembre 2006 15:33 ? : asterisk-users@lists.digium.com Objet : [asterisk-users] Send event from dialplan Hi all, Another question for today, hope an answer for this one I have a program talking with asterisk via the AMI. I receive events, and I would like to insert some events in the dialplan, which could be catch by my program. Any idea how to do this ? Greg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061122/b14fbac5/attachment.htm
Gregory Duchatelet wrote:> > Hi all, > > Another question for today, hope an answer for this one? > > I have a program talking with asterisk via the AMI. I receive events, > and I would like to insert some events in the dialplan, which could be > catch by my program. > > Any idea how to do this ? > > Greg >this easiest way is to use UserEvent below is an example exten => 8,n,UserEvent(${IF(${ISNULL(${AGENTNUM})}?Queue:Schedule)}${ISTRANSFER}|CallerIDName: ${CALLERIDNAME}) the above from a dialplan would show up on the AMI as events that look like (in this example AGENTNUM and ISTRANSFER are empty) Event: Newexten Privilege: call,all Channel: Zap/17-1 Context: gdincoming Extension: talk Priority: 4 Application: UserEvent AppData: Queue|CallerIDName: ~315CLD02-6945-true~ Uniqueid: 1156985743.5540 Event: UserEventQueue Privilege: user,all Channel: Zap/17-1 Uniqueid: 1156985743.5540 CallerIDName: ~315CLD02-6945-true~ side note: if you use ael then you will need to add a space after the | otherwise it will fail example Playback(pls-hold-while-try); UserEvent(Queue${ISTRANSFER}| CallerIDName: ${CALLERID(name)}); ^^^ note the space in here goodluck