UserEvent()

Sendet ein beliebiges Event an das Manager-Interface.

UserEvent(Eventname[,Inhalt])

Sendet ein beliebiges Event an das Manager-Interface. Das resultierende Event-Paket hat folgendes Format:

Event: UserEvent Eventname
Channel: Channelname
Uniqueid: Anruf-ID
[Inhalt]

Als Inhalt können weitere Zeilen in der Form Feldname: Wert angegeben werden. Mehrere Zeilen werden durch | (in älteren Asterisk-Versionen durch , oder ^) getrennt.

Liefert stets 0 zurück.

exten => 123,1,UserEvent(Test,Hinweis: Ich rufe jetzt ${XY} an.)
exten => 123,n,Dial(${XY})
[Anmerkung]Anmerkung

Interner Hilfetext zu dieser Applikation 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.

Differenz zum internen Hilfetext 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.

Siehe auch. manager.conf, Asterisk Manager interface


Version 1.2, November 2002

Neue Version verfügbar

Sie betrachten gerade die alte Version des Buches (Version 1.0). Wir empfehlen Ihnen für Asterisk 1.4 und 1.6 die neue Version des Buches.

Asterisk-Tag 2008

Lernen Sie Mark Spencer (den Erfinder von Asterisk) kennen! Viele Vorträge, Case-Studies und Workshops rund um das Thema VoIP. Asterisk-Tag.org

Das gedruckte Buch