[asterisk-dev] ari-py websocket connection issue

Matthew Jordan mjordan at digium.com
Mon Jun 9 08:19:12 CDT 2014


On Fri, Jun 6, 2014 at 9:33 PM, Thomas McMahon <thmcmahon at gmail.com> wrote:
> Hi all
>
> I'm excited to build a new web app using the ARI, however I'm having some
> issues using the ari-py library with python.
>
> I'm trying to get up and running with the ari-py library. The REST side of
> things is working great, I can create channels, do stuff to those channels,
> no problems.
>
> However, I can't get any of the example code in the ari-py repository to run
> because the websocket aspect doesn't work for me.
>
> When I run a 'client.run(apps='hello')' (hello being the name of the app in
> the dialplan, all I get back is 'No JSON object could be decoded'. Have you
> seen this error before, is there something I'm doing wrong? To me it seems
> like it's hanging because it's not receiving any messages, but my
> understanding is that this is a function that waits until it has received a
> message before it does anything.

Using requests 2.0.1 and websocket-client 0.12.0 with swaggerpy 0.2.0,
I don't have that problem.

However, when upgrading to requests 2.3.0 and websocket-client 0.15.0,
I run into that same issue.

Until someone can figure out what the heck changed, you may want to
downgrade those two libraries to the versions mentioned above.

> When I just use the python websocket-client library, I can connect to the
> websocket of ari just fine. It just doesn't work with the library.
>


-- 
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org



More information about the asterisk-dev mailing list