Search code examples
phpxmlfreeswitchplivo

Error: Processing Call Failure ! (while setup Plivoframework and freeswitch)


There found problem in plivo-outbound while setup freeswitch and plivoframework. plivo-outbound.log file gave following Error log when i called plivo from freeswitch using softphone. Furthermore, the freeswitch worked fine and there was no problem in interface between plivo and freeswitch.

plivo-outbound.log :

2014-08-04 16:12:52,422 plivo-outbound[26271]: INFO: (2) Requested RESTXML to http://127.0.0.1/answer/
2014-08-04 16:12:52,422 plivo-outbound[26271]: ERROR: (2) Processing Call Failure !
2014-08-04 16:12:52,422 plivo-outbound[26271]: ERROR: (2) Unrecognized Element: ['speak']
2014-08-04 16:12:52,450 plivo-outbound[26271]: ERROR: (2) Traceback (most recent call last):
2014-08-04 16:12:52,450 plivo-outbound[26271]: ERROR: (2) Traceback (most recent call last):
2014-08-04 16:12:52,450 plivo-outbound[26271]: ERROR: (2)     self.process_call()
2014-08-04 16:12:52,450 plivo-outbound[26271]: ERROR: (2)   File "/usr/local/plivo/src/plivo/src/plivo/rest/freeswitch/outboundsocket.py", line 500, in process_call
2014-08-04 16:12:52,450 plivo-outbound[26271]: ERROR: (2)     self.lex_xml()
2014-08-04 16:12:52,450 plivo-outbound[26271]: ERROR: (2)   File "/usr/local/plivo/src/plivo/src/plivo/rest/freeswitch/outboundsocket.py", line 599, in lex_xml
2014-08-04 16:12:52,450 plivo-outbound[26271]: ERROR: (2)     % invalid_element)
2014-08-04 16:12:52,450 plivo-outbound[26271]: ERROR: (2) UnrecognizedElementException: Unrecognized Element: ['speak']
2014-08-04 16:12:52,450 plivo-outbound[26271]: INFO: (2) Processing Call Ended
2014-08-04 16:12:52,450 plivo-outbound[26271]: DEBUG: (2) Releasing Connection ...
2014-08-04 16:12:52,451 plivo-outbound[26271]: DEBUG: (2) Releasing Connection Done
2014-08-04 16:12:52,451 plivo-outbound[26271]: INFO: (2) End request from ('127.0.0.1', 48645)

Whereas, i tried to run following scrip from plivo which is in [loopbackip]/answer/index.php - location.

<?xml version="1.0" encoding="UTF-8" ?>
<Response>
   <speak>welcome</speak>
</Response>

Any idea how can i solve it ?


Solution

  • After one day of confusion finally i found out that error is not in the plivo script and installation. It was in my index.php script- each keyword like <Speak>,<Play> .. should be started with Capital letter. Now the script looks like :

    index.php

    <?xml version="1.0" encoding="UTF-8" ?>
    <Response>
       <Speak>welcome</Speak>
    </Response>