Plivo using RingUrl AnswerUrl and HangupUrl with basic authentication

55 views
Skip to first unread message

Gerard Domanguera

unread,
Jul 21, 2016, 6:39:45 AM7/21/16
to Plivo Opensource Users
Hello everyone!

Im trying to setup plivo ring, answer and hangup url to point to a server that requires basic authentication but im gettng the following error:

2016-07-21 09:56:15,570 plivo-rest[15928]: ERROR: Sending to POST http://USER:PA...@myRingUrl.com/ with {'Direction': u'outbound', 'From': u'xxx', 'To': u'xxx', 'variable_duration': '', 'RequestUUID': u'xxx', 'CallUUID': u'xxx', 'CallStatus': 'ringing'} -- Error: <urlopen error [Errno 1] ARES_ENODATA: DNS server returned answer with no data>

Is there a configuration to allow plivo to access my servers with basic auth ?

thanks,
gerard

Charlie Chrisman

unread,
Jul 21, 2016, 11:22:05 PM7/21/16
to plivo...@googlegroups.com

On Thu, Jul 21, 2016 at 3:39 AM, Gerard Domanguera <gdoma...@gmail.com> wrote:
ARES_ENODATA: DNS server returned answer with no data

Looks like the DNS server for your server isn't returning any info... can you make dns queries from your server? e.g. does dig myringurl.com return the correct information?

Gerard Domanguera

unread,
Jul 22, 2016, 12:19:31 AM7/22/16
to Plivo Opensource Users
Thanks for the reply. Yes 'dig myringurl.com' does return the correct information.
The error log from plivo about DNS is kind of misleading here.

This is what I actually did:
1. created dummy server, myringurl.com, that accepts POST request with no authentication
2016-07-21 09:42:22,333 plivo-rest[15928]: INFO: Fetching POST http://myringurl.com/ with {'To': u'xxx', 'Direction': u'outbound', 'From': u'xxx', 'variable_duration': '', 'CallUUID': u'xxx', 'RequestUUID': u'xxx', 'CallStatus': 'ringing'}
2016-07-21 09:43:02,394 plivo-rest[15928]: ERROR: Sending to POST http://myringurl.com/ with {'Direction': u'outbound', 'From': u'xxx', 'To': u'xxx', 'variable_duration': '', 'RequestUUID': u'xxx', 'CallUUID': u'xxx', 'CallStatus': 'ringing'} -- Error: HTTP Error 500: Internal Server Error

- got response 500 from myringurl.com but atleast in went thru with the request

2. then have myringurl.com accept a POST request but this time with basic authentication
- and these is what I got
2016-07-21 09:56:15,545 plivo-rest[15928]: INFO: Fetching POST http://USER:PASS@myringurl.com/ with {'To': u'xxx', 'Direction': u'outbound', 'From': u'xxx', 'variable_duration': '', 'CallUUID': u'xxx', 'RequestUUID': u'xxx', 'CallStatus': 'ringing'}
2016-07-21 09:56:15,570 plivo-rest[15928]: ERROR: Sending to POST http://USER:PASS@myringurl.com/ with {'Direction': u'outbound', 'From': u'xxx', 'To': u'xxx', 'variable_duration': '', 'RequestUUID': u'xxx', 'CallUUID': u'xxx', 'CallStatus': 'ringing'} -- Error: <urlopen error [Errno 1] ARES_ENODATA: DNS server returned answer with no data>


- myringurl.com server didn't get any POST request on this scenario.

This our current platform setup:
plivo ring url -> frontend application (no authentication) -> backend application thru rest API (with authentication)
and we want to update this for plivo to directly call our backend application:
plivo ring url -> backend application thru rest API (with authentication)

thanks,
gerard
Reply all
Reply to author
Forward
0 new messages