I am using originateAction using AMI to dial from Asterisk. If the phone is connected to server the phone rings while starting the call. But if the phone is not connected i am getting no response from server.
For listening to the events i have registered listener and reading all the events.Can you tell me how to check first whether the channel is present to dial.
As you refer to channel, rather than device, I assume this is an analogue line. An unplugged phone is essentially indistinguishable from an on hook one. (There are subtle ways, but they are used by engineering tests, not PABXes.)
Yes but my channel is only present if i connect my sip phone with Asterisk server with the given configuration in SIP.conf file
So my case is to dial using sip phone and asterisk server with AMI in given extension.
You didn’t say SIP. You definitely mean device, not channel. I think there may be an AMI action to read device state. Otherwise get AMI to run the device state function against it.
Channels only exists when there is a call in progress or being set up. For DAHDI, there is a confusion because there can only be one call per device, so channel gets used for device as well, but that is not true for any VoIP technology.
(Actually you did use the SIP category, but I don’t think anyone normally looks at the category on this forum.)
Thanks David for your help. I got the solution . When i am calling using originateaction in AMI, it provides me reponse. In the response It will show the info.