voiceglue/voiceglue — Issue #10: record can not be used in submit, rectype sent instead of file data
Author: tazzix
Created: 2012-03-08 06:25:57+00:00
State: open

According to samples a submit containing a record name in its namelist with post and multipart/form-data should POST the the recorded data. Instead it sends rectype, data length and a binary address of some sort:

09:35:49:565 DBUG OPEN_VXI svr001-- callid=[412] SBinetChannel::open(http://localhost/vxml/sub.php) called with mode FILE and with properties: {inet.submitMethod=POST inet.submitMimeType=multipart/form-data inet.timeoutDownload=7000 inet.urlBase=http://localhost/vxml/yasir.php inet.urlQueryArgs={abc=audio/basic:len(40000):p0x2aaaac1c0c00}}

Moreover the following CURL command being called causes a wrong enctype as well, obvious by the usage of "-d" parameter:

09:35:49:571 DBUG HTTCACHE svr001-- hcreq=[1010] started pid=25606 as curl -k -m 7 -q -f -s -S --create-dirs -o /var/lib/asterisk/sounds/voiceglue/url/SqKeVxk_9E45hixyjTq2A-s8F81wQv5U1_sub.php/req.tmp -b /var/lib/asterisk/sounds/voiceglue/cookie/412 -c /var/lib/asterisk/sounds/voiceglue/cookie/412 -D /var/lib/asterisk/sounds/voiceglue/url/SqKeVxk_9E45hixyjTq2A-s8F81wQv5U1_sub.php/req.header --stderr /var/lib/asterisk/sounds/voiceglue/url/SqKeVxk_9E45hixyjTq2A-s8F81wQv5U1_sub.php/req.err -d abc=audio/basic:len(40000):p0x2aaaac1c0c00 -b /var/lib/asterisk/sounds/voiceglue/cookie/412 http://localhost/vxml/sub.php

For reference my XML:

Please record a message after the beep.

===================================

submitrecording.php:
\n");
?>

Audio saved.";
} else {
echo "Audio not saved.";
}
?>