plivo / plivoframework

Open Source Telephony Application Prototyping Framework
http://www.plivo.com/open-source/
Other
418 stars 179 forks source link

ConferenceRecord Stopping immediately after starting #77

Closed mattwilliamson closed 12 years ago

mattwilliamson commented 12 years ago

Immediately after issuing a ConferenceRecordStart REST request, the Record Stop Event occurs and causes the callback to be hit with a blank duration.

plivo-rest.log

2012-02-29 10:24:56,587 plivo-rest[23882]: DEBUG: RESTAPI ConferenceRecordStart with [('ConferenceName', u'ACadea151d708d45febbbb5104c98977ca.1234'), ('FileFormat', u'mp3'), ('FilePath', u'/tmp/myapp/recordings')]
2012-02-29 10:24:56,590 plivo-rest[23882]: INFO: Conference Api (sync) 'conference 'ACadea151d708d45febbbb5104c98977ca.1234' record /tmp/myapp/recordings/20120229-102456_ACadea151d708d45febbbb5104c98977ca.1234.mp3' with JobUUID 148819e1-e35f-48a8-b831-3c324ae69b1c
2012-02-29 10:24:56,591 plivo-rest[23882]: INFO: Conference Api (sync) Response for JobUUID 148819e1-e35f-48a8-b831-3c324ae69b1c -- Record file /tmp/myapp/recordings/20120229-102456_ACadea151d708d45febbbb5104c98977ca.1234.mp3
2012-02-29 10:24:56,591 plivo-rest[23882]: INFO: Conference RecordStart Executed
2012-02-29 10:24:56,591 plivo-rest[23882]: INFO: 127.0.0.1 - - [2012-02-29 10:24:56] "POST /v0.1/ConferenceRecordStart/ HTTP/1.1" 200 173 "-" "Python-urllib/2.6"

2012-02-29 10:24:56,591 plivo-rest[23882]: INFO: Conference Record Stop event {'ConferenceName': u'ACadea151d708d45febbbb5104c98977ca.1234', 'RecordFile': u'/tmp/myapp/recordings/20120229-102456_ACadea151d708d45febbbb5104c98977ca.1234.mp3', 'RecordDuration': ''}
2012-02-29 10:24:56,591 plivo-rest[23882]: INFO: Fetching POST http://[REDACTED]/_plivo/recording/complete/ with {'ConferenceName': u'ACadea151d708d45febbbb5104c98977ca.1234', 'RecordFile': u'/tmp/myapp/recordings/20120229-102456_ACadea151d708d45febbbb5104c98977ca.1234.mp3', 'RecordDuration': ''}
mattwilliamson commented 12 years ago

To be clear, what I am expecting is the recording will continue until the conference ends or the record stop method is called.

mike-plivo commented 12 years ago

Hi Matt,

really weird cause Conference Record Stop is only fired on this condition : if event['Event-Subclass'] == 'conference::maintenance' \ and event['Action'] == 'stop-recording':

if you can test again having a telnet open to get events and paste here : telnet localhost EVENT_SOCKET_PORT

auth YourEventSocketPassword

event plain CUSTOM conference::maintenance

mattwilliamson commented 12 years ago

Thanks Mike, I will try that and possibly upgrade Freeswitch

mattwilliamson commented 12 years ago

by the way, that's a really cool trick to test event sockets :thumbsup:

mattwilliamson commented 12 years ago

Looks like it was due to the recordings folder not existing. I found it thanks to you. You can close this. Thank you Mike!!!

mike-plivo commented 12 years ago

ok nice :)