WaitForMsg command
This command waits for a message from a specified address and saves its content into a variable. The command has got 3 states: Execute, OnMessge and OnTimeout. The Execute section will be executed, when the WaitForMsg command started. If a message arrives from the specified address, the commands in the OnMessage part will be executed. The commands between the OnTimeout node will be performed only if there is no message arrives within the give time limit.
Parameters
Parameter name | Example value | Description | Mandatory |
FromAddress | test.ozeki@gmail.com | The address where we expect the message from. | no |
FromConnection | gmail_client_1@localhost | The name of the connection where we expect the message from. | yes |
Timeout | 90 | Specifies how many seconds the system waits for the message. If there is no incoming message from the specified connection within the specified time, the call ends. The default value is 90 seconds. | no |
OzML example
This example shows the full capability of the WaitForMsg command. When the WaitForMsg command is executed, the Speak commands runs first. If the message is received, the system will read it to the caller. If there is no incoming message from 'admin@localhost' within 60 seconds, the system executes the Speak command between the 'OnTimeout' nodes and then the call ends.
<Response> <WaitForMsg FromConnection='admin@localhost' Timeout='60'> <Execute> <Speak>Waiting for a message from 'admin@localhost'.</Speak> </Execute> <OnMessage> <Speak>Message received from $FromConnection</Speak> <Speak>The message is as follows: $Text</Speak> </OnMessage> <OnTimeout> <Speak>Time out.</Speak> </OnTimeout> </WaitForMsg> </Response>
More information
- Comando de transferencia asistida
- Comando de transferencia ciega
- Comando de llamada
- Comando de reenvío de llamada
- Comando para listar historial de llamadas
- Comando para colgar
- Comando para poner en espera
- Comando para listar llamadas activas
- Comando para listar extensiones
- Comando para listar tipos de extensión
- Comando para reproducir
- Comando para grabar
- Comando de solicitud
- Comando para enviar DTMF
- Hablar
- Comando para quitar de espera
- Comando para recibir mensaje
- Comando para enviar correo
- Comando para enviar mensaje
- Comando para enviar SMS
- Comando de arreglo
- Comando para emitir tono
- Comando para retraso
- Comando para eliminar archivo
- Comando para cada
- Comando para ir a
- Comando para mover archivo
- Comando para rechazar
- Comando para enrutar
- Comando para enviar notificación de alarma
- Comando para enviar mensaje
- Comando para entrada de usuario
- Comando para variable
- Comando para esperar mensaje
- Comando para configuración de llamada
- Comando para salir
- Listar contactos de agenda
- Comando para listar nombres de agenda
- Recibir notificación de alarma