B.129. UserEvent()

Sends an arbitrary event to the manager interface.
UserEvent(eventname[,body])
Sends an event of your choosing to the manager interface. The resulting event packet has the following format:
Event: UserEvent eventname
Channel: channelname
Uniqueid: call-identifier
[body]
Additional lines in the form fieldname: value may be specified in the body. Multiple lines are separated with the "|" ('pipe') character (in older versions of Asterisk, with "," or "^") getrennt.
Returns 0.
exten => 123,1,UserEvent(Test,Note: I am calling ${XY} now.)
exten => 123,n,Dial(${XY})

Note

Internal help for this application in Asterisk 1.4:
  -= Info about application 'UserEvent' =- 

[Synopsis]
Send an arbitrary event to the manager interface

[Description]
  UserEvent(eventname[|body]): Sends an arbitrary event to the manager
interface, with an optional body representing additional arguments.  The
body may be specified as a | delimeted list of headers. Each additional
argument will be placed on a new line in the event. The format of the
event will be:
    Event: UserEvent
    UserEvent: <specified event name>
    [body]
If no body is specified, only Event and UserEvent headers will be present.
diff output to internal help in Asterisk 1.2:
8,14c8,13
<   UserEvent(eventname[|body]): Sends an arbitrary event to the manager
< interface, with an optional body representing additional arguments.  The
< body may be specified as a | delimeted list of headers. Each additional
< argument will be placed on a new line in the event. The format of the
< event will be:
<     Event: UserEvent
<     UserEvent: <specified event name>
---
>   UserEvent(eventname[|body]): Sends an arbitrary event to the
> manager interface, with an optional body representing additional
> arguments.  The format of the event will be:
>     Event: UserEvent<specified event name>
>     Channel: <channel name>
>     Uniqueid: <call uniqueid>
16,17c15,16
< If no body is specified, only Event and UserEvent headers will be present.
< 
---
> If the body is not specified, only Event, Channel, and Uniqueid fields
> will be present.  Returns 0.
See also
manager.conf, Asterisk Manager interface