Call command
In this command, an API extension calls a number and once the phone is picked up, a CallConnected request will be sent to the specified URL. In response to this request, a set of commands in OzML format can be provided regarding this call. While using an IVR the client can order a call command. For example, you could give your clients a method to give pre-recorded gift calls to their friends or your client could play a
Request parameters
Parameter name | Example value | Description | Mandatory |
Dialed | 100 | Phone number of the callee. | yes |
ApiExtension | 1000 | API Extension from where the call will be initiated, it must be a configured API extension. It can be omitted if sent in a response to a call notification. | no |
CallerId | 1000 | Phone number of the caller, which will be displayed on the called side. | no |
CallerDisplayName | John Smith | Displayed name of the caller, which will be displayed on the called side. | no |
Url | http://yourapp.com/callconnected.php | The PBX will send a request to this URL once the call is connected. The PBX awaits a response containing an OZML from the script located at this URL. This URL is not being used during this test. | no |
ResponseOzML | hello | When call connected, this OzML script will be executed on the call. | no |
ErrorUrl | http://yourapp.com/error.php | This URL will be requested if any errors occur during the call. | no |
FinishedUrl | http://yourapp.com/callfinished.php | This URL will be requested when the call is completed successfully. | no |
RingTime | 120 | The ring time of the call. If expires, the call will be closed. | no |
Username | admin | The username of the account. The username and password parameters are used to authenticate the user. | yes |
Password | abc123 | Specifies the password. The username and password parameters are used to authenticate the user. | yes |
Response parameters
Parameter name | Example value | Description | Mandatory |
Code | 200 | Returns the status code of the response. | yes |
Message | Command successfully executed | Returns the description of the response code. | yes |
NotificationName | Callconnected | Name of the notification request type. | no |
OzML example
This OzML script will dial 102, and show the caller ID 3000 to the callee. After the callee picks up the phone, the OzML script on link that you provided in the Url attribute will be executed.
<?xml version="1.0"?> <Response> <Call Url="http://yourdomain.com/ozml_example/call_connected.php" CallerId="3000">102</Call> </Response>
Example request and response
URL request
http://127.0.0.1:9509/api?command=Call&Dialed=102&ApiExtension=101&Url=http://yourapp.com/callconnected.php&ErrorUrl=http://yourapp.com/error.php&Username=HTTP_User_1&Password=qwe123
Response
<?xml version="1.0"?> <Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Code>200</Code> <Message>Command successfully executed</Message> </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