SendURL()

Sendet dem Channel eine URL.

SendURL(URL[,Option])

Sendet dem Channel eine URL, die das Gerät aufrufen soll (IAX2). Setzt die Ausführung beim nächsten Schritt fort.

Mit der Option j wird, wenn der Channel keine Übertragung von URLs unterstützt, zur Priorität n+101 gesprungen. Mit der Option wait wird vor dem Fortfahren auf eine Bestätigung gewartet, dass die URL geladen wurde.

Liefert 0 zurück, wenn die URL fehlerfrei übertragen wurde oder der Channel die Übertragung nicht unterstützt, sonst -1. Setzt die Channelvariable SENDURLSTATUS auf SUCCESS (Erfolg), FAILURE (Sendefehler), UNSUPPORTED (nicht unterstützt) oder NOLOAD (bei wait: Client konnte die URL nicht laden).

exten => 123,1,SendURL(http://www.asterisk.org/,wait)
[Anmerkung]Anmerkung

Interner Hilfetext zu dieser Applikation in Asterisk 1.4: 

  -= Info about application 'SendURL' =- 

[Synopsis]
Send a URL

[Description]
  SendURL(URL[|option]): Requests client go to URL (IAX2) or sends the 
URL to the client (other channels).
Result is returned in the SENDURLSTATUS channel variable:
    SUCCESS       URL successfully sent to client
    FAILURE       Failed to send URL
    NOLOAD        Client failed to load URL (wait enabled)
    UNSUPPORTED   Channel does not support URL transport

If the option 'wait' is specified, execution will wait for an
acknowledgement that the URL has been loaded before continuing

If jumping is specified as an option (the 'j' flag), the client does not
support Asterisk "html" transport, and there exists a step with priority
n + 101, then execution will continue at that step.

SendURL continues normally if the URL was sent correctly or if the channel
does not support HTML transport.  Otherwise, the channel is hung up.

Differenz zum internen Hilfetext in Asterisk 1.2: 

13c13
<     NOLOAD        Client failed to load URL (wait enabled)
---
>     NOLOAD        Clien failed to load URL (wait enabled)
17a18
> and will return -1 if the peer is unable to load the URL
19,24c20,26
< If jumping is specified as an option (the 'j' flag), the client does not
< support Asterisk "html" transport, and there exists a step with priority
< n + 101, then execution will continue at that step.
< 
< SendURL continues normally if the URL was sent correctly or if the channel
< does not support HTML transport.  Otherwise, the channel is hung up.
---
> Old behaviour (deprecated): 
>  If the client does not support Asterisk "html" transport, 
>  and there exists a step with priority n + 101, then execution will
>  continue at that step.
>  Otherwise, execution will continue at the next priority level.
>  SendURL only returns 0 if the URL was sent correctly  or if
>  the channel does not support HTML transport, and -1 otherwise.

Siehe auch. SendImage(), SendText()


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