Wont Call out!

Moderator: areski

Re: Wont Call out!

Postby areski » Fri Jun 29, 2012 4:41 pm

See the error here

Code: Select all
2012-06-29 11:55:55,658 plivo-rest[8590]: INFO: Fetching POST http://192.168.1.72:8008/api/v1/hangupcall/ with {'variable_waitmsec': u'0', 'variable_progress_mediamsec': u'4940', 'variable_billmsec': u'23780', 'variable_user_context': '', 'To': u'19899920847', 'variable_progressmsec': u'0', 'From': u'8888888888', 'variable_plivo_app': u'true', 'CallStatus': 'completed', 'variable_mduration': u'37800', 'Channel-Read-Codec-Bit-Rate': u'64000', 'variable_call_uuid': u'd27c1fbc-c202-11e1-9a57-579c4d6799f5', 'variable_hangup_cause': u'NORMAL_CLEARING', 'variable_answersec': u'14', 'variable_plivo_answer_url': u'http://192.168.1.72:8008/api/v1/answercall/', 'variable_caller_id': u'"Outbound Call" <19899920847>', 'HangupCause': u'NORMAL_CLEARING', 'Direction': 'outbound', 'variable_origination_caller_id_number': u'8888888888', 'variable_direction': u'outbound', 'variable_answermsec': u'14020', 'CallUUID': u'd27c1fbc-c202-11e1-9a57-579c4d6799f5', 'ALegRequestUUID': u'd1e3d78e-c202-11e1-8ea4-001111c2463c', 'variable_hangup_cause_q850': u'16', 'variable_progresssec': u'0', 'variable_answer_uepoch': u'1340985331551575', 'ALegUUID': u'd27c1fbc-c202-11e1-9a57-579c4d6799f5', 'variable_answer_epoch': u'1340985331', 'variable_waitsec': u'0', 'variable_billsec': u'24', 'variable_duration': u'38', 'RequestUUID': u'd1e3d78e-c202-11e1-8ea4-001111c2463c', 'variable_endpoint_disposition': u'ANSWER'}
2012-06-29 11:56:17,452 plivo-rest[8590]: ERROR: Sending to POST


There is an issue to reach the API.

So first try to check if the API is reachable from your browser http://192.168.1.72:8008/api/v1/hangupcall/
Is 192.168.1.72 the right IP where the web application live ?

Second, check your /usr/share/newfies/settings_local.py

See the settings API_ALLOWED_IP = ['127.0.0.1', 'localhost']
make sure your IPs is listed there and restart apache.

Yours,
/Areski
areski
Site Admin
 
Posts: 302
Joined: Tue Oct 18, 2011 5:28 pm

Re: Wont Call out!

Postby american-amusements » Fri Jun 29, 2012 5:32 pm

indeed it didnt work with that ip. I switched out all instances of it with my proper ip, restarted apache, but still got the log error, rebooted and now its gone but still nothing..:
Code: Select all
2012-06-29 13:25:57,577 plivo-rest[2098]: INFO: Starting ...
2012-06-29 13:25:57,577 plivo-rest[2098]: WARNING: Logger <plivo.utils.logger.FileLogger object at 0xa90ae2c>
2012-06-29 13:25:57,578 plivo-rest[2098]: INFO: Config : {'rest_server': {'LOG_LEVEL': 'DEBUG', 'HTTP_ADDRESS': '127.0.0.1:8088', 'CALL_HEARTBEAT_URL': 'http://127.0.0.1:5000/heartbeat/', 'ALLOWED_IPS': '127.0.0.1', 'FS_INBOUND_PASSWORD': 'ClueCon', 'FS_INBOUND_ADDRESS': '127.0.0.1:8021', 'SECRET_KEY': '\\xae$\\xce:k\\x06\\x9d\\n5o\\xb3\\\\xdb\\xa7p1\\xd1(\\xb5\\xad\\xb0\\xe9\\xfe', 'LOG_FILE': '/usr/share/plivo/tmp/plivo-rest.log', 'LOG_TYPE': 'file'}, 'common': {'DEFAULT_ANSWER_URL': 'http://127.0.0.1:5000/answered/', 'CACHE_URL': 'http://127.0.0.1:8089', 'DEFAULT_HTTP_METHOD': 'POST', 'AUTH_TOKEN': 'YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY', 'EXTRA_FS_VARS': 'variable_user_context,Channel-Read-Codec-Bit-Rate,variable_plivo_answer_url,variable_plivo_app,variable_direction,variable_endpoint_disposition,variable_hangup_cause,variable_hangup_cause_q850,variable_duration,variable_billsec,variable_progresssec,variable_answersec,variable_waitsec,variable_mduration,variable_billmsec,variable_progressmsec,variable_answermsec,variable_waitmsec,variable_progress_mediamsec,variable_call_uuid,variable_origination_caller_id_number,variable_caller_id,variable_answer_epoch,variable_answer_uepoch', 'CACHE_SCRIPT': '/usr/share/plivo/bin/wavstream.sh', 'AUTH_ID': 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'}, 'outbound_server': {'FS_OUTBOUND_ADDRESS': '127.0.0.1:8084', 'LOG_FILE': '/usr/share/plivo/tmp/plivo-outbound.log', 'LOG_LEVEL': 'DEBUG', 'LOG_TYPE': 'file'}}
2012-06-29 13:25:57,605 plivo-rest[2098]: INFO: Listening HTTP
2012-06-29 13:25:57,606 plivo-rest[2098]: INFO: <class 'gevent.pywsgi.WSGIServer'> mode set
2012-06-29 13:25:57,606 plivo-rest[2098]: INFO: RESTServer starting ...
2012-06-29 13:25:57,613 plivo-rest[2105]: INFO: RESTServer started at: 'http://127.0.0.1:8088'
2012-06-29 13:25:57,614 plivo-rest[2105]: INFO: Trying to connect to FreeSWITCH at: 127.0.0.1:8021
2012-06-29 13:25:57,699 plivo-rest[2105]: INFO: Connected to FreeSWITCH
2012-06-29 13:28:55,880 plivo-rest[2105]: DEBUG: RESTAPI Call with [('HangupUrl', u'http://75.51.107.4:8008/api/v1/hangupcall/'), ('From', u'8888888888'), ('GatewayTimeouts', u'1800'), ('GatewayCodecs', u"'PCMA,PCMU'"), ('To', u'19899920847'), ('GatewayRetries', u'1'), ('AnswerUrl', u'http://75.51.107.4:8008/api/v1/answercall/'), ('ExtraDialString', u'bridge_early_media=true,hangup_after_bridge=true'), ('Gateways', u'sofia/gateway/callwithus/')]
2012-06-29 13:28:56,658 plivo-rest[2105]: WARNING: Call Request Spawned for RequestUUID e7c10290-c20f-11e1-8ea4-001111c2463c
2012-06-29 13:28:56,658 plivo-rest[2105]: INFO: Call Request Executed
2012-06-29 13:28:56,747 plivo-rest[2105]: INFO: 127.0.0.1 - - [2012-06-29 13:28:56] "POST /v0.1/Call/ HTTP/1.1" 200 227 1.830261

2012-06-29 13:28:56,748 plivo-rest[2105]: DEBUG: Call try for RequestUUID e7c10290-c20f-11e1-8ea4-001111c2463c with Gateway sofia/gateway/callwithus/
2012-06-29 13:28:56,748 plivo-rest[2105]: DEBUG: spawn_originate: originate {plivo_request_uuid=e7c10290-c20f-11e1-8ea4-001111c2463c,plivo_answer_url=http://75.51.107.4:8008/api/v1/answercall/,plivo_ring_url=,plivo_hangup_url=http://75.51.107.4:8008/api/v1/hangupcall/,origination_caller_id_number=8888888888,bridge_early_media=true,hangup_after_bridge=true,plivo_from=8888888888,plivo_to=19899920847,plivo_app=true,absolute_codec_string='PCMA,PCMU',originate_timeout=1800,ignore_early_media=true}sofia/gateway/callwithus/19899920847 &socket('127.0.0.1:8084 async full')
2012-06-29 13:28:57,041 plivo-rest[2105]: DEBUG: Waiting Call attempt for RequestUUID e7c10290-c20f-11e1-8ea4-001111c2463c ...
2012-06-29 13:28:59,817 plivo-rest[2105]: DEBUG: Notify Call success (EarlyMedia) for RequestUUID e7c10290-c20f-11e1-8ea4-001111c2463c
2012-06-29 13:28:59,842 plivo-rest[2105]: INFO: Call Attempt OK for RequestUUID e7c10290-c20f-11e1-8ea4-001111c2463c
2012-06-29 13:29:14,613 plivo-rest[2105]: DEBUG: Notify Call success for RequestUUID e7c10290-c20f-11e1-8ea4-001111c2463c
2012-06-29 13:29:14,613 plivo-rest[2105]: INFO: Hangup for Outgoing CallUUID e80b8aea-c20f-11e1-ad2b-818c7302017e Completed, HangupCause NORMAL_CLEARING, RequestUUID e7c10290-c20f-11e1-8ea4-001111c2463c
2012-06-29 13:29:14,614 plivo-rest[2105]: DEBUG: Call Cleaned up for RequestUUID e7c10290-c20f-11e1-8ea4-001111c2463c
2012-06-29 13:29:14,629 plivo-rest[2105]: INFO: Fetching POST http://75.51.107.4:8008/api/v1/hangupcall/ with {'variable_waitmsec': u'0', 'variable_progress_mediamsec': u'2380', 'variable_billmsec': u'2320', 'variable_user_context': '', 'To': u'19899920847', 'variable_progressmsec': u'0', 'From': u'8888888888', 'variable_plivo_app': u'true', 'CallStatus': 'completed', 'variable_mduration': u'17080', 'Channel-Read-Codec-Bit-Rate': u'64000', 'variable_call_uuid': u'e80b8aea-c20f-11e1-ad2b-818c7302017e', 'variable_hangup_cause': u'NORMAL_CLEARING', 'variable_answersec': u'15', 'variable_plivo_answer_url': u'http://75.51.107.4:8008/api/v1/answercall/', 'variable_caller_id': u'"Outbound Call" <19899920847>', 'HangupCause': u'NORMAL_CLEARING', 'Direction': 'outbound', 'variable_origination_caller_id_number': u'8888888888', 'variable_direction': u'outbound', 'variable_answermsec': u'14760', 'CallUUID': u'e80b8aea-c20f-11e1-ad2b-818c7302017e', 'ALegRequestUUID': u'e7c10290-c20f-11e1-8ea4-001111c2463c', 'variable_hangup_cause_q850': u'16', 'variable_progresssec': u'0', 'variable_answer_uepoch': u'1340990952165698', 'ALegUUID': u'e80b8aea-c20f-11e1-ad2b-818c7302017e', 'variable_answer_epoch': u'1340990952', 'variable_waitsec': u'0', 'variable_billsec': u'2', 'variable_duration': u'17', 'RequestUUID': u'e7c10290-c20f-11e1-8ea4-001111c2463c', 'variable_endpoint_disposition': u'ANSWER'}
2012-06-29 13:29:15,203 plivo-rest[2105]: INFO: Sent to POST http://75.51.107.4:8008/api/v1/hangupcall/ with {'variable_waitmsec': u'0', 'variable_progress_mediamsec': u'2380', 'variable_billmsec': u'2320', 'variable_user_context': '', 'To': u'19899920847', 'variable_progressmsec': u'0', 'From': u'8888888888', 'variable_plivo_app': u'true', 'CallStatus': 'completed', 'variable_mduration': u'17080', 'Channel-Read-Codec-Bit-Rate': u'64000', 'variable_call_uuid': u'e80b8aea-c20f-11e1-ad2b-818c7302017e', 'variable_hangup_cause': u'NORMAL_CLEARING', 'variable_answersec': u'15', 'variable_plivo_answer_url': u'http://75.51.107.4:8008/api/v1/answercall/', 'variable_caller_id': u'"Outbound Call" <19899920847>', 'HangupCause': u'NORMAL_CLEARING', 'Direction': 'outbound', 'variable_origination_caller_id_number': u'8888888888', 'variable_direction': u'outbound', 'variable_answermsec': u'14760', 'CallUUID': u'e80b8aea-c20f-11e1-ad2b-818c7302017e', 'ALegRequestUUID': u'e7c10290-c20f-11e1-8ea4-001111c2463c', 'variable_hangup_cause_q850': u'16', 'variable_progresssec': u'0', 'variable_answer_uepoch': u'1340990952165698', 'ALegUUID': u'e80b8aea-c20f-11e1-ad2b-818c7302017e', 'variable_answer_epoch': u'1340990952', 'variable_waitsec': u'0', 'variable_billsec': u'2', 'variable_duration': u'17', 'RequestUUID': u'e7c10290-c20f-11e1-8ea4-001111c2463c', 'variable_endpoint_disposition': u'ANSWER'} -- Result: <?xml version="1.0" encoding="utf-8"?>
<Response><result>OK</result></Response>
american-amusements
 
Posts: 30
Joined: Thu Jun 21, 2012 7:20 pm

Re: Wont Call out!

Postby areski » Fri Jun 29, 2012 8:26 pm

Please share plivo-outbound logs
areski
Site Admin
 
Posts: 302
Joined: Tue Oct 18, 2011 5:28 pm

Re: Wont Call out!

Postby american-amusements » Tue Jul 03, 2012 5:07 pm

sorry about the delayed response, I was hoping to come on here to tell you nevermind because i got it working (well mostly, .wavs come out all garbled, .oggs didn't player at all, mp3s only worked, and the caller id wouldnt change from 888-888-8888)

BUT.......


Somehow I broke it without doing anything to it. I put the part of the log you asked for that seemed relevant in a pastebin. couldnt put it all up there, but I at least got the relevant information for a call request. basically now it will call but not play. obviously its plivo (im guessing since it sounds like thats the part plivo handles) and I did search the error code, but all the information i found assumed I was using a proxy server, that my firewall was blocking it, and one even said try flushing the dns....

soo......... http://pastebin.com/B5QhqEyv :evil:

Thank you for the help so much.
american-amusements
 
Posts: 30
Joined: Thu Jun 21, 2012 7:20 pm

Re: Wont Call out!

Postby areski » Tue Jul 03, 2012 8:58 pm

Well it seems you are having serious issue to authorize our API for Plivo.
Code: Select all
'variable_answer_epoch': '', 'variable_waitsec': '', 'variable_billsec': '', 'variable_endpoint_disposition': 'ANSWER'} -- Error: <urlopen error [Errno 110] Connection timed out>
areski
Site Admin
 
Posts: 302
Joined: Tue Oct 18, 2011 5:28 pm

Re: Wont Call out!

Postby american-amusements » Thu Jul 05, 2012 7:44 pm

hmmm... any suggestions on how to authorize it or what might be blocking it?
american-amusements
 
Posts: 30
Joined: Thu Jun 21, 2012 7:20 pm

Re: Wont Call out!

Postby areski » Fri Jul 06, 2012 6:14 am

I will recommend to troubleshoot the API directly and the django part associated.
areski
Site Admin
 
Posts: 302
Joined: Tue Oct 18, 2011 5:28 pm

Re: Wont Call out!

Postby american-amusements » Mon Jul 23, 2012 6:35 pm

got it working, then it broke again. reinstalled. new problem entirely, made a new post referring to it.
american-amusements
 
Posts: 30
Joined: Thu Jun 21, 2012 7:20 pm

Re: Wont Call out!

Postby Denzelm » Wed Oct 31, 2012 9:11 am

Hi

Did you get this working?
I have the same issue. I managed to get a succesfull install.
Created the Hello world campaign
Registed the sip trunk on FS
but when the campaign starts it doesnt do anything. Not even an event in fs_cli

Regards
Denzel
Denzelm
 
Posts: 16
Joined: Mon Oct 15, 2012 1:09 pm

Previous

Return to Installation

Who is online

Users browsing this forum: No registered users and 27 guests

cron