RE: [asterisk-users] Send event from dialplan

2006-11-22 Thread Gregory Duchatelet
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 : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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

___
--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


Re: [asterisk-users] Send event from dialplan

2006-11-22 Thread Richard Lyman

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

___
--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