Hangup command
The Hangup command can be used to disconnect a call by ID. It is best used if you want to hang the call up after a given menu point. For example: 'Congratulation! You subscribed to the golden package. Goodbye!' and then it hangs up. It also can be used by phone companies to hang up calls if the client has no more money in his phone account.
Request parameters
Parameter name | Example value | Description | Mandatory |
CallId | 345fad34 | ID of the call to hangup. If this command is in a response to a call notification, this parameter will be the ID of that call and can be omitted. | yes |
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
The OzML script you can see below is a complete implementation of a very simple IVR system that contains the Hangup command. First, between the InitialCommands tags, the system reads out the opportunities where the user can choose from by pressing one of the keys. After the user pressed a key, the Speak command says Goodbye and the Hangup command will be activated to terminate the call.
<?xml version="1.0"?> <Response> <UserInput timeout="2" repeat="true"> <InitialCommands> <Speak>To subscribe to the silver package, press 1.</Speak> <Speak>To subscribe to the golden package, press 2.</Speak> </InitialCommands> <Inputs> <Input key="1"> <Speak>Congratulation! You subscribed to the silver package. Goodbye!</Speak> <Hangup></Hangup> </Input> <Input key="2"> <Speak>Congratulation! You subscribed to the golden package. Goodbye!</Speak> <Hangup></Hangup> </Input> </Inputs> </UserInput> </Response>
Example request and response
URL request
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
- AttendedTransfer command
- BlindTransfer command
- Call command
- ForwardCall command
- ListCallHistory command
- Hangup command
- Hold command
- ListActiveCalls command
- ListExtensions command
- ListExtensionTypes command
- Play command
- Record command
- Request command
- SendDTMF command
- Speak
- Unhold command
- ReceiveMessage command
- SendEmail command
- SendMessage command
- SendSMS command
- Array command
- Beep command
- Delay command
- DeleteFile command
- ForEach command
- GoTo command
- MoveFile command
- Reject command
- Route command
- SendAlarmNotification command
- SendMsg command
- UserInput command
- Var command
- WaitForMsg command
- CallSetup command
- Exit command
- ListAddressbokkContacts
- ListAddressbookNames command
- ReceiveAlarmNotification