Asterisk Manager API Action AbsoluteTimeout
Asterisk Manager API Action: AbsoluteTimeout
This command will request Asterisk to hangup a given channel after the specified number of seconds, thereby effectively ending the active call.If the channel is linked with another channel (an active connected call is in progress), the other channel will continue it's path through the dialplan (if any further steps remains).
Parameters
- Channel: Which channel to hangup, e.g. SIP/123-1c20
- Timeout : The number of seconds until the channel should hangup
Example
RequestAction: AbsoluteTimeout
Channel: SIP/123-1c20
Timeout: 20
Channel: SIP/123-1c20
Timeout: 20
Response on success
Response: Success
Message: Timeout Set
Message: Timeout Set
Response on error
Response: Error
Message: No such channel
Message: No such channel
Comments
333I keep getting the error : No such channel
I am getting more frustrated with this command. I am using the AbsoluteTimeout action to disconnect a call established with the Originate action.
The problem is that I keep getting the "No such channel" error. I am using something similar to:
Originate
Channel: SIP/my_sip_provider/A_side_phone_number
Exten: SIP/my_sip_provider/B_side_phone_number
Priority: 1
Timeout: 30000
Context: default
Then, I have used the event received from the manager to catch the first one. Fortunately, it was always like:
Channel: SIP/my_sip_provider-ed81002fa
State: Down
CallerID:
Uniqueid: 56312411231.123
As you can see, the channel name that has been created by asterisk for this call was: SIP/my_sip_provider-ed81002fa
So I have extracted that name and displayed it to make sure that I had the correct value. Then, I have initiated an AbsoluteTimeout using the following code :
Channel: SIP/my_sip_provider-ed81002fa
Timeout: 30
But the response to that action is always "Error : No such channel"
Can anyone help me please.
Regards
asiby a.k.a Maestro
333Re: It should say...
333It should say...
Parameters: Channel, Timeout