Hi, I’ve got an FXO analogue line card hooked up to Asterisk with DAHDI drivers and want to try and automate going off-hook and dialling a number so simulate a user using an analogue phone.
I’m using the Python language binding for ARI and have created the channel-dump Stasis application running in the background. So far I have:
What’s the status of the channel? Is it answered? If you use the new originate does it work? Is there a reason you don’t put the DTMF into the endpoint string?
This actually works!
Was not aware you could add DTMF to the end of the endpoint string, but that works too.
I’m not really clear on the difference between channels.create and channels.originate which led to my confusion.
I’d like to be able to extend this example to know when extension 1234 has been answered. My stasis app is printing out events StasisStartStasisEnd and ChannelStateChange however I’m not seeing any event created when 1234 is answered. Is there an event I’m missing or lack of understanding on my part here?
Originate does not send a channel into the Stasis application until it is answered. Create and dial sends the channel into the Stasis application before it is answered, but it expects to be put into a bridge with another channel. I don’t recall the specific events, but upon entering the Stasis application it is answered. If an analog line though they are generally immediately answered.