sinatra - ruby, Plivo and Heroku getting status "404" or no xml response error -
i attempting make outbound call softphone using plivo.
the answer url (on plivo account) http://frozen-lake-7349.herokuapp.com/outbound
if go url, on heroku, see:
<response><hangup/></response>
which correct.
the ruby code is:
get '/outbound' to_number = params[:to] from_number = params[:clid] ? params[:clid] : params[:from] ? params[:from] : '' caller_name = params[:callername] ? params[:callername] : '' resp = plivo::response.new() if not to_number resp.addhangup() else if to_number[0, 4] == "sip:" d = resp.adddial({'callername' => caller_name}) d.adduser(to_number) else d = resp.adddial({'callerid' => from_number}) d.addnumber(to_number) end end content_type 'text/xml' resp.to_xml() end
yet when try make call softphone never works. plivo debug logs tells me http response failure ,
xml : no response tag present
and heroku logs say
[03/sep/2013 16:38:46] "post /outbound http/1.1" 404 18 0.0007 2013-09-03t16:38:46.063235+00:00 heroku[router]: at=info method=post path=/outbound host=frozen-lake-7349.herokuapp.com fwd="54.219.28.199" dyno=web.1 connect=1ms service=4ms status=404 bytes=18
i totally lost here guys. appreciated.
Comments
Post a Comment