[asterisk-users] Call Record File and Play

Ashish Agarwal ashishag67 at gmail.com
Mon May 28 04:25:36 CDT 2012


Hello List,

Someone please address my issue...

On Thu, May 24, 2012 at 2:08 PM, Ashish Agarwal <ashishag67 at gmail.com>wrote:

> Hello,
>
> I am trying to achieve call record file and play the file to the user
> using phpagi script.
>
> I am using the following code
>
> $rand="/var/sounds/145712900";
>
> $agi->record_file($rand, "gsm", "0123456789*#", -1, 0, true, 0);
>
> also tried
>
> $agi->record_file($rand, "wav", "0123456789*#", -1, 0, true, 0);
>
> the file is created in the directory but when I try to play the sound I
> get the following error incase of gsm
>
> <DAHDI/i1/40275507-52>AGI Rx << STREAM FILE /var/sounds/145712900 "" 0
> [May 24 14:00:07] WARNING[22415][C-0000019c]: file.c:492 filehelper: File
> /var/sounds/145712900.gsm detected to have zero size.
>
> and the following error incase of wav file format
>
> <DAHDI/i1/40275507-54>AGI Rx << STREAM FILE /var/sounds/1886163042 "" 0
> [May 24 14:07:07] WARNING[22587][C-0000019e]: format_wav.c:159
> check_header: Does not begin with RIFF
> [May 24 14:07:07] WARNING[22587][C-0000019e]: file.c:393 fn_wrapper:
> Unable to open format wav
> <DAHDI/i1/40275507-54>AGI Tx >> 200 result=0 endpos=0
>     -- <DAHDI/i1/40275507-54>AGI Script record.php completed, returning 0
>
>
> Please help
>
>
> --
> Regards,
>
> Ashish Agarwal
>



-- 
Regards,

Ashish Agarwal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120528/6d3140dd/attachment.htm>


More information about the asterisk-users mailing list