Closed mbenziane closed 12 years ago
Your webserver seems listening on port 3000 according to "http://127.0.0.1:3000/phonemenu.php"
But action in GetDigits is :
[GetDigits] {'finishOnKey': '#', 'retries': 1, 'timeout': 5, 'validDigits': '0123456789#', 'invalidDigitsSound': '', 'playBeep': 'false', 'action': 'http://127.0.0.1/phonemenu.php?node=default', 'method': 'POST', 'numDigits': '1'}
Plivo is trying to fetch "http://127.0.0.1/phonemenu.php?node=default" which is port 80 .
So I suggest to modify your webserver to listen on port 80 or modify GetDigits in phonemenu.php to fetch urls on port 3000 .
Anyway if you see in logs : GetDigits, Digits '2' Received, it means digits have been detected .
I did try both changing it in the script and also the web server port, it didn't work! something is not letting the action to be called. BTW this instance is on EC2 running ubuntu 10.04.
also if the action should be executed I should see it in the apache access logs, but it doesn't make it there at all.
2012-02-21 08:45:31,635 plivo-outbound[781]: INFO: (48) Requested RESTXML to http://127.0.0.1/phonemenu.php 2012-02-21 08:45:31,636 plivo-outbound[781]: DEBUG: (48) Answering because Element GetDigits need it 2012-02-21 08:45:31,636 plivo-outbound[781]: DEBUG: (48) Execute: answer args=, uuid='', lock=True, loops=1 2012-02-21 08:45:31,636 plivo-outbound[781]: DEBUG: (48) Response: <CommandResponse headers={'Content-Type': 'command/reply', 'Reply-Text': '+OK'}, body=> 2012-02-21 08:45:31,636 plivo-outbound[781]: INFO: (48) [GetDigits] {'finishOnKey': '#', 'retries': 1, 'timeout': 5, 'validDigits': '0123456789_#', 'invalidDigitsSound': '', 'playBeep': 'false', 'action': 'http://127.0.0.1/phonemenu.php?node=default', 'method': 'POST', 'numDigits': '1'} 2012-02-21 08:45:31,636 plivo-outbound[781]: INFO: (48) GetDigits Started ["say:flite:slt:'Hello and welcome to the Initech Phone Menu'", "say:flite:slt:'For business hours, press 1'", "say:flite:slt:'For directions, press 2'", "say:flite:slt:'To hear a duck quack, press 3'", "say:flite:slt:'To speak to a receptionist, press 0'"] 2012-02-21 08:45:31,636 plivo-outbound[781]: DEBUG: (48) Execute: set args=playback_delimiter=!, uuid='', lock=True, loops=1 2012-02-21 08:45:31,660 plivo-outbound[781]: DEBUG: (48) Response: <CommandResponse headers={'Content-Type': 'command/reply', 'Reply-Text': '+OK'}, body=> 2012-02-21 08:45:31,660 plivo-outbound[781]: DEBUG: (48) Execute: play_and_get_digits args=1 1 1 5000 '#' file_string://silence_stream://1!say:flite:slt:'Hello and welcome to the Initech Phone Menu'!say:flite:slt:'For business hours, press 1'!say:flite:slt:'For directions, press 2'!say:flite:slt:'To hear a duck quack, press 3'!say:flite:slt:'To speak to a receptionist, press 0' silence_stream://150 pagdinput ^(0|1|2|3|4|5|6|7|8|9|\|#)+ 5000, uuid='', lock=True, loops=1 2012-02-21 08:45:31,664 plivo-outbound[781]: DEBUG: (48) Response: <CommandResponse headers={'Content-Type': 'command/reply', 'Reply-Text': '+OK'}, body=> 2012-02-21 08:45:40,804 plivo-outbound[781]: DEBUG: (48) Execute: api args='uuid_getvar 5271be4c-5c92-11e1-b0da-7152211e9a5b pagd_input' 2012-02-21 08:45:40,805 plivo-outbound[781]: DEBUG: (48) Response: <ApiResponse headers={'Content-Length': '1', 'Content-Type': 'api/response'}, body=1> 2012-02-21 08:45:40,805 plivo-outbound[781]: INFO: (48) GetDigits, Digits '1' Received 2012-02-21 08:45:40,805 plivo-outbound[781]: INFO: (48) [GetDigits] Done (redirect) 2012-02-21 08:45:40,805 plivo-outbound[781]: DEBUG: (48) Execute: api args='uuid_exists 5271be4c-5c92-11e1-b0da-7152211e9a5b' 2012-02-21 08:45:40,806 plivo-outbound[781]: DEBUG: (48) Response: <ApiResponse headers={'Content-Length': '4', 'Content-Type': 'api/response'}, body=true> 2012-02-21 08:45:40,806 plivo-outbound[781]: WARNING: (48) Call doesn't exist ! 2012-02-21 08:45:40,806 plivo-outbound[781]: WARNING: (48) Channel has hung up, breaking Processing Call 2012-02-21 08:45:40,806 plivo-outbound[781]: INFO: (48) Processing Call Ended 2012-02-21 08:45:40,806 plivo-outbound[781]: DEBUG: (48) Releasing Connection ... 2012-02-21 08:45:40,806 plivo-outbound[781]: DEBUG: (48) Releasing Connection Done 2012-02-21 08:45:40,806 plivo-outbound[781]: INFO: (48) End request from ('127.0.0.1', 37209)
ok can you try with last commit a1072a4d289671741374c83b1712b5326474105b ?
I did get "git pull" from /usr/share/plivo/src/plivo and I got syntax error after restarting plivo service ( am I doing it wrong?)
Plivo-Rest [default] stopped
Plivo-Outbound [default] stopped
Traceback (most recent call last):
File "/usr/share/plivo/bin/plivo-outbound", line 7, in
oops sorry a typo, fixed now
Awesome works now! thank you.
ok nice :)
I can't GetDigits action to work, tried different DTMF types but still no hope:
2012-02-20 18:29:57,176 plivo-outbound[781]: INFO: (41) Requested RESTXML to http://127.0.0.1:3000/phonemenu.php 2012-02-20 18:29:57,176 plivo-outbound[781]: DEBUG: (41) Answering because Element GetDigits need it 2012-02-20 18:29:57,176 plivo-outbound[781]: DEBUG: (41) Execute: answer args=, uuid='', lock=True, loops=1 2012-02-20 18:29:57,177 plivo-outbound[781]: DEBUG: (41) Response: <CommandResponse headers={'Content-Type': 'command/reply', 'Reply-Text': '+OK'}, body=> 2012-02-20 18:29:57,177 plivo-outbound[781]: INFO: (41) [GetDigits] {'finishOnKey': '#', 'retries': 1, 'timeout': 5, 'validDigits': '0123456789_#', 'invalidDigitsSound': '', 'playBeep': 'false', 'action': 'http://127.0.0.1/phonemenu.php?node=default', 'method': 'POST', 'numDigits': '1'} 2012-02-20 18:29:57,177 plivo-outbound[781]: INFO: (41) GetDigits Started ["say:flite:slt:'Hello and welcome to the Initech Phone Menu'", "say:flite:slt:'For business hours, press 1'", "say:flite:slt:'For directions, press 2'", "say:flite:slt:'To hear a duck quack, press 3'", "say:flite:slt:'To speak to a receptionist, press 0'"] 2012-02-20 18:29:57,199 plivo-outbound[781]: DEBUG: (41) Execute: set args=playback_delimiter=!, uuid='', lock=True, loops=1 2012-02-20 18:29:57,212 plivo-outbound[781]: DEBUG: (41) Response: <CommandResponse headers={'Content-Type': 'command/reply', 'Reply-Text': '+OK'}, body=> 2012-02-20 18:29:57,212 plivo-outbound[781]: DEBUG: (41) Execute: play_and_get_digits args=1 1 1 5000 '#' file_string://silence_stream://1!say:flite:slt:'Hello and welcome to the Initech Phone Menu'!say:flite:slt:'For business hours, press 1'!say:flite:slt:'For directions, press 2'!say:flite:slt:'To hear a duck quack, press 3'!say:flite:slt:'To speak to a receptionist, press 0' silence_stream://150 pagdinput ^(0|1|2|3|4|5|6|7|8|9|\|#)+ 5000, uuid='', lock=True, loops=1 2012-02-20 18:29:57,221 plivo-outbound[781]: DEBUG: (41) Response: <CommandResponse headers={'Content-Type': 'command/reply', 'Reply-Text': '+OK'}, body=> 2012-02-20 18:30:13,451 plivo-outbound[781]: DEBUG: (41) Execute: api args='uuid_getvar ccb8986a-5c1a-11e1-b0cc-7152211e9a5b pagd_input' 2012-02-20 18:30:13,452 plivo-outbound[781]: DEBUG: (41) Response: <ApiResponse headers={'Content-Length': '1', 'Content-Type': 'api/response'}, body=2> 2012-02-20 18:30:13,452 plivo-outbound[781]: INFO: (41) GetDigits, Digits '2' Received 2012-02-20 18:30:13,452 plivo-outbound[781]: INFO: (41) [GetDigits] Done (redirect) 2012-02-20 18:30:13,452 plivo-outbound[781]: DEBUG: (41) Execute: api args='uuid_exists ccb8986a-5c1a-11e1-b0cc-7152211e9a5b' 2012-02-20 18:30:13,453 plivo-outbound[781]: DEBUG: (41) Response: <ApiResponse headers={'Content-Length': '4', 'Content-Type': 'api/response'}, body=true> 2012-02-20 18:30:13,453 plivo-outbound[781]: WARNING: (41) Call doesn't exist ! 2012-02-20 18:30:13,453 plivo-outbound[781]: WARNING: (41) Channel has hung up, breaking Processing Call 2012-02-20 18:30:13,453 plivo-outbound[781]: INFO: (41) Processing Call Ended 2012-02-20 18:30:13,453 plivo-outbound[781]: DEBUG: (41) Releasing Connection ... 2012-02-20 18:30:13,453 plivo-outbound[781]: DEBUG: (41) Releasing Connection Done 2012-02-20 18:30:13,453 plivo-outbound[781]: INFO: (41) End request from ('127.0.0.1', 33733)
looks like the action never happens although I see:
2012-02-20 18:30:13,452 plivo-outbound[781]: INFO: (41) GetDigits, Digits '2' Received 2012-02-20 18:30:13,452 plivo-outbound[781]: INFO: (41) [GetDigits] Done (redirect)
I am using the PHP example provided in the library (phonemenu.php).
Any ideas?!