HELP GETTING STARTED WITH PLIVO AND FREESWITCH

125 views
Skip to first unread message

Kolapo Obanewa

unread,
Dec 5, 2016, 5:50:54 AM12/5/16
to Plivo Opensource Users
Please i need help with my configuration. i have installed freeswitch and plivo on a godaddy server. i am trying to achieve incoming calls to my freeswitch server and those calls transferred to plivo which in turns transfers the call to my application URL. 

I am using twilio to help push PSTN Calls to my Freeswitch Server. I have configured a twilio number to always push all calls made to it to my Freeswitch Server. I have added all twilio IP to my auto_configs under domains so all connection between twilio and my Freeswitch Server works.

But the issue is anytime i put a call to my Twilio Number which in turns calls my freeswitch Server, i get the following from my freeswitch FS_CLI log:

2016-11-17 07:53:39.217417 [INFO] mod_dialplan_xml.c:558 Processing +2348135693957 <+2348135693957>->+12677992092 in context public

Dialplan: sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com parsing [public->unloop] continue=false

Dialplan: sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com Regex (PASS) [unloop] ${unroll_loops}(true) =~ /^true$/ break=on-false

Dialplan: sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com Regex (FAIL) [unloop] ${sip_looped_call}() =~ /^true$/ break=on-false

Dialplan: sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com parsing [public->outside_call] continue=true

Dialplan: sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com Absolute Condition [outside_call]

Dialplan: sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com Action set(outside_call=true) 

Dialplan: sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com Action set(RFC2822_DATE=${strftime(%a, %d %b %Y %T %z)}) 

Dialplan: sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com parsing [public->call_debug] continue=true

Dialplan: sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com Regex (FAIL) [call_debug] ${call_debug}(false) =~ /^true$/ break=never

Dialplan: sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com parsing [public->plivo_public_did] continue=false

Dialplan: sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com Regex (PASS) [plivo_public_did] destination_number(+12677992092) =~ /^\+?[0-9]{3}-?[0-9]{6,12}$/ break=on-false

Dialplan: sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com Action enable_heartbeat(60) 

Dialplan: sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com Action socket(127.0.0.1:8084 async full) 

2016-11-17 07:53:39.217417 [DEBUG] switch_core_state_machine.c:167 (sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com) State Change CS_ROUTING -> CS_EXECUTE

2016-11-17 07:53:39.217417 [DEBUG] switch_core_session.c:1351 Send signal sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com [BREAK]

2016-11-17 07:53:39.217417 [DEBUG] switch_core_state_machine.c:474 (sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com) State ROUTING going to sleep

2016-11-17 07:53:39.217417 [DEBUG] switch_core_state_machine.c:418 (sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com) Running State Change CS_EXECUTE

2016-11-17 07:53:39.217417 [DEBUG] switch_core_state_machine.c:481 (sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com) State EXECUTE

2016-11-17 07:53:39.217417 [DEBUG] mod_sofia.c:243 sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com SOFIA EXECUTE

2016-11-17 07:53:39.217417 [DEBUG] switch_core_state_machine.c:209 sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com Standard EXECUTE

EXECUTE sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com set(outside_call=true)

2016-11-17 07:53:39.217417 [DEBUG] mod_dptools.c:1402 sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com SET [outside_call]=[true]

EXECUTE sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com set(RFC2822_DATE=Thu, 17 Nov 2016 07:53:39 +0000)

2016-11-17 07:53:39.217417 [DEBUG] mod_dptools.c:1402 sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com SET [RFC2822_DATE]=[Thu, 17 Nov 2016 07:53:39 +0000]

EXECUTE sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com enable_heartbeat(60)

2016-11-17 07:53:39.217417 [INFO] switch_core_session.c:1511 sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com setting session heartbeat to 60 second(s).

EXECUTE sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com socket(127.0.0.1:8084 async full)

2016-11-17 07:53:39.237415 [NOTICE] switch_core_state_machine.c:262 sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com has executed the last dialplan instruction, hanging up.

2016-11-17 07:53:39.237415 [NOTICE] switch_core_state_machine.c:264 Hangup sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com [CS_EXECUTE] [NORMAL_CLEARING]

2016-11-17 07:53:39.237415 [DEBUG] switch_channel.c:3189 Send signal sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com [KILL]

2016-11-17 07:53:39.237415 [DEBUG] switch_core_session.c:1351 Send signal sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com [BREAK]

2016-11-17 07:53:39.237415 [DEBUG] switch_core_state_machine.c:481 (sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com) State EXECUTE going to sleep

2016-11-17 07:53:39.237415 [DEBUG] switch_core_state_machine.c:418 (sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com) Running State Change CS_HANGUP

2016-11-17 07:53:39.237415 [DEBUG] switch_core_state_machine.c:681 (sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com) Callstate Change RINGING -> HANGUP

2016-11-17 07:53:39.237415 [DEBUG] switch_core_state_machine.c:683 (sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com) State HANGUP

2016-11-17 07:53:39.237415 [DEBUG] mod_sofia.c:506 Channel sofia/internal/+2348135693957@myfreeswitch.pstn.twilio.com hanging up, cause: NORMAL_CLEARING

2016-11-17 07:53:39.237415 [DEBUG] mod_sofia.c:640 Responding to INVITE with: 480




 While Checking my Plivo Outbound log, i get the following:


2016-11-17 07:53:39,123 plivo-outbound[2161]: INFO: (3) New request from ('127.0.0.1', 37738)

2016-11-17 07:53:39,129 plivo-outbound[2161]: DEBUG: (3) Execute: connect args=''

2016-11-17 07:53:39,129 plivo-outbound[2161]: ERROR: (3) Traceback (most recent call last):

2016-11-17 07:53:39,129 plivo-outbound[2161]: ERROR: (3)   File "/usr/local/plivo/src/plivo/src/plivo/rest/freeswitch/outboundsocket.py", line 319, in run

2016-11-17 07:53:39,129 plivo-outbound[2161]: ERROR: (3)     self._run()

2016-11-17 07:53:39,129 plivo-outbound[2161]: ERROR: (3)   File "/usr/local/plivo/src/plivo/src/plivo/rest/freeswitch/outboundsocket.py", line 329, in _run

2016-11-17 07:53:39,130 plivo-outbound[2161]: ERROR: (3)     self.connect()

2016-11-17 07:53:39,130 plivo-outbound[2161]: ERROR: (3)   File "/usr/local/plivo/src/plivo/src/plivo/core/freeswitch/outboundsocket.py", line 54, in connect

2016-11-17 07:53:39,130 plivo-outbound[2161]: ERROR: (3)     connect_response = self._protocol_send("connect")

2016-11-17 07:53:39,130 plivo-outbound[2161]: ERROR: (3)   File "/usr/local/plivo/src/plivo/src/plivo/rest/freeswitch/outboundsocket.py", line 140, in _protocol_send

2016-11-17 07:53:39,130 plivo-outbound[2161]: ERROR: (3)     command, args)

2016-11-17 07:53:39,130 plivo-outbound[2161]: ERROR: (3)   File "/usr/local/plivo/src/plivo/src/plivo/core/freeswitch/eventsocket.py", line 375, in _protocol_send

2016-11-17 07:53:39,130 plivo-outbound[2161]: ERROR: (3)     _uuid, event = _async_res.get()

2016-11-17 07:53:39,130 plivo-outbound[2161]: ERROR: (3)   File "/usr/local/plivo/lib/python2.7/site-packages/gevent/event.py", line 370, in get

2016-11-17 07:53:39,130 plivo-outbound[2161]: ERROR: (3)     self._wait_core(timeout, ())

2016-11-17 07:53:39,130 plivo-outbound[2161]: ERROR: (3)   File "/usr/local/plivo/lib/python2.7/site-packages/gevent/event.py", line 95, in _wait_core

2016-11-17 07:53:39,130 plivo-outbound[2161]: ERROR: (3)     result = self.hub.switch()

2016-11-17 07:53:39,130 plivo-outbound[2161]: ERROR: (3)   File "/usr/local/plivo/lib/python2.7/site-packages/gevent/hub.py", line 608, in switch

2016-11-17 07:53:39,130 plivo-outbound[2161]: ERROR: (3)     switch_out()

2016-11-17 07:53:39,130 plivo-outbound[2161]: ERROR: (3)   File "/usr/local/plivo/lib/python2.7/site-packages/gevent/hub.py", line 612, in switch_out

2016-11-17 07:53:39,131 plivo-outbound[2161]: ERROR: (3)     raise BlockingSwitchOutError('Impossible to call blocking function in the event loop callback')

2016-11-17 07:53:39,131 plivo-outbound[2161]: ERROR: (3) BlockingSwitchOutError: Impossible to call blocking function in the event loop callback

2016-11-17 07:53:39,131 plivo-outbound[2161]: DEBUG: (3) Releasing Connection ...

2016-11-17 07:53:39,131 plivo-outbound[2161]: DEBUG: (3) Releasing Connection Done




The only changes i made to my plivo default.conf file is in the answer URL where i put the godaddy IP address/applicationfile.xml


PLEASE I NEED HELP ON HOW TO MAKE CALLS CONNECT TO PLIVO. 

N:B - DO I NEED TO DO ANY MORE CHANGES TO EITHER MY FREESWITCH SERVER OR PLIVO SERVER

REGARDS
Reply all
Reply to author
Forward
0 new messages