<div dir="ltr"><div><div>Hello,<br></div>I'm posting again since I forgot to include the link to the code I was trying out. It's at <a href="https://wiki.asterisk.org/wiki/display/AST/ARI+and+Channels%3A+Simple+Media+Manipulation#ARIandChannels:SimpleMediaManipulation-channel-playback-monkeys.py">https://wiki.asterisk.org/wiki/display/AST/ARI+and+Channels%3A+Simple+Media+Manipulation#ARIandChannels:SimpleMediaManipulation-channel-playback-monkeys.py</a><br><br>(I'm new to mailing lists so it's a bit confusing. I apologize if I'm using this wrong.)<br><br></div>My original message:<br><div>=========<br>I am trying out ARI, and while executing channel-playback-monkeys.py from<br>
the asterisk wiki, I get an exception when I hangup the call while the<br>
monkeys sound file is playing.<br>
<br>
<br>
<br>
Output from channel-playback-monkeys.py:<br>
<br>
(aripython) ? python 04-channel-playback-monkeys.py<br>
<br>
Monkeys! Attack SIP/bigyan_linphone-00000009!<br>
<br>
ERROR:ari.client:Event listener threw exception<br>
Traceback (most recent call last):<br>
 File "/home/bigyan/Envs/aripython/<wbr>local/lib/python2.7/site-<wbr>packages/ari/client.py",<br>
line 100, in __run<br>
 callback(msg_json, *args, **kwargs)<br>
 File "/home/bigyan/Envs/aripython/<wbr>local/lib/python2.7/site-<wbr>packages/ari/client.py",<br>
line 198, in extract_objects<br>
 event_cb(obj, event, *args, **kwargs)<br>
 File "/home/bigyan/Envs/aripython/<wbr>local/lib/python2.7/site-<wbr>packages/ari/model.py",<br>
line 181, in fn_filter<br>
 fn(objects, event, *args, **kwargs)<br>
 File "04-channel-playback-monkeys.<wbr>py", line 24, in playback_finished<br>
 channel = client.channels.get(channelId=<wbr>channel_id)<br>
 File "/home/bigyan/Envs/aripython/<wbr>local/lib/python2.7/site-<wbr>packages/ari/model.py",<br>
line 62, in <lambda><br>
 return lambda **kwargs: promote(self.client, oper(**kwargs), oper.json)<br>
 File "/home/bigyan/Envs/aripython/<wbr>local/lib/python2.7/site-<wbr>packages/ari/model.py",<br>
line 354, in promote<br>
 resp.raise_for_status()<br>
 File "/home/bigyan/Envs/aripython/<wbr>local/lib/python2.7/site-<wbr>packages/requests/models.py",<br>
line 884, in raise_for_status<br>
 raise HTTPError(http_error_msg, response=self)<br>
HTTPError: 404 Client Error: Not Found for url:<br>
<a href="http://localhost:8088/ari/channels/1480481858.18" rel="noreferrer" target="_blank">http://localhost:8088/ari/<wbr>channels/1480481858.18</a><br>
<br>
Channel SIP/bigyan_linphone-00000009 just left our application<br>
<br>
<br>
<br>
And here's the output from asterisk:<br>
<br>
== Using SIP RTP CoS mark 5<br>
 -- Executing [1000@aritesta:1] NoOp("SIP/bigyan_linphone-<wbr>0000000b",<br>
"") in new stack<br>
 -- Executing [1000@aritesta:2] Answer("SIP/bigyan_linphone-<wbr>0000000b",<br>
"") in new stack<br>
 > 0x7f040400fb80 -- Probation passed - setting RTP source address to<br>
<a href="http://192.168.1.66:7078" rel="noreferrer" target="_blank">192.168.1.66:7078</a><br>
 -- Executing [1000@aritesta:3] Stasis("SIP/bigyan_linphone-<wbr>0000000b",<br>
"hello") in new stack<br>
 -- <SIP/bigyan_linphone-0000000b> Playing 'tt-monkeys.gsm' (language 'en')<br>
<br>
[Nov 30 10:42:41] WARNING[12777][C-00000009]:<br>
res_stasis_playback.c:250 playback_final_update: 1480481858.18:<br>
Playback failed for sound:tt-monkeys<br>
<br>
<br>
<br>
How exactly can I handle this? A code example would be very helpful.<br>
<br>
Thanks.<br></div></div>