Stasis apps might need an Answer to get media flowing

Just missed this post getting closed and felt it important to emphasize as the move to Stasis occurs for more new cool things in Asterisk, some truisms from the glorious dial plan days of yore may still apply…

TL;DR: Media doesn’t flow (well) unless you Answer the call.

Given previous OP’s @arrascue dialplan:

[from-internal]
exten => 4444,1,NoOp()
 same => n,Stasis(myApp)
 same => n,Hangup()

They report the problem that: “No data is reaching the proxy server when using /channels/externalMedia”:

This is likely due to their channel being stuck in the Ring state. You can check on your Asterisk CLI with commands like “core show channels” to see the State column (and quickly sulk over the boring Application(Data) column that just says Stasis(myApp) now like a bump on a log.)

Then, consider adding an Answer() before the Stasis() to just get it working already:

[from-internal]
exten => 4444,1,NoOp()
 same => n,Answer()
 same => n,Stasis(myApp)
 same => n,Hangup()

Alternatively, you could use the proper Asterisk REST Interface way of doing it, with POST /channels/{channelId}/answer, somewhere in your ARI app.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.