No audio with Asterisk ARI "Hello-World" test

I am new to using ARI and going through the ARI Hello World example in the wiki

https://wiki.asterisk.org/wiki/display/AST/Getting+Started+with+ARI

I have configured ari.conf as such

[general]
enabled = yes  
pretty = yes 

[mtest]
type = user
read_only = no
password = test123

and the test numbers in extensions.conf as such

[default]
exten => 1000,1,NoOp()
 same => n,Answer()
 same => n,Stasis(hello-world)
 same => n,Hangup()

exten => 2000,1,NoOp()
 same => n,Answer()
 same => n,Playback(hello-world)
 same => n,Hangup()

When I dial the 1000 extension I can see the output in the CLI and in the wscat but have no audio. Dialing the other test extension has audio without issue. I can see the RTP packets in a trace as well.

 -- Executing [1000@default:1] NoOp("SIP/MTest-00000010", "") in new stack
    -- Executing [1000@default:2] Answer("SIP/MTest-00000010", "") in new stack
       > 0x7f99b40529c0 -- Strict RTP switching to RTP target address x.x.x.x:5066 as source
    -- Executing [1000@default:3] Stasis("SIP/MTest-00000010", "hello-world") in new stack

the app and user appear to be registered, and I do see the output in wscat as per the wiki article.

phast*CLI> ari show apps
Application Name
=========================
hello-world
phast*CLI> ari show users
r/o?  Username
----  --------
No    asterisk
No    mtest

what is causing the audio problem when stasis is used?

Have you tested it with simple dialplan?

The normal reasons for no audio are blocking by firewalls, or a lack of NAT, for the port range used for RTP. It can also happen if you are behind NAT, but haven’t set up your public address.

Did you actually follow the entire page, including executing the curl request to play back the file?

that seems to have been the issue. i didn’t realize the curl command was passing the audio file. I thought executing the stasis call was the trigger. thank you

Nope. Stasis just puts the channel into the application. It still has to be told what to do.

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