[Freeswitch-users] Variable issue for setting conference record via API?

Dragos Oancea dragos at freeswitch.org
Fri May 8 15:05:45 UTC 2020


Try uuid_getvar and save what it returns and pass it to the next command.
Eg: uuid_getvar 2428fa31-dbfc-4d95-a2bb-a3b44f13315c recordings_dir



On Thu, May 7, 2020 at 8:38 PM Avi Marcus <avi at avimarcus.net> wrote:

> I'm using javascript to trigger the conference API to record when the
> moderator joins.
>
> apiExecute("conference",argv[0] + " recording start
> $${recordings_dir}/conf-"+argv[0]+"/${strftime(%Y-%m-%d-%H-%M)}.mp3");
>
> Those variables should be automatically expanded by FS, just like if it
> was used in the dialplan?
> But it seems they are being treated literally:
>
> 2020-05-07 19:25:36.609713 [ERR] mod_shout.c:893 Error opening
> $${recordings_dir}/conf-test/${strftime(%Y-%m-%d-%H-%M)}.mp3
> 2020-05-07 19:25:36.609713 [ERR] conference_record.c:277 Error Opening
> File [$${recordings_dir}/conf-test/${strftime(%Y-%m-%d-%H-%M)}.mp3]
>
> Ideas?
> Should I expand them myself? I was wondering about wrapping it in an eval,
> but that would probably have the same issue. So running an API to get the
> results of an eval first...
>
> Thanks,
> -Avi Marcus
> _________________________________________________________________________
>
> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> Build your next product on our scalable cloud platform.
>
> Join our online community to chat in real time
> https://signalwire.community
>
> Professional FreeSWITCH Services
> sales at freeswitch.com
> https://freeswitch.com
>
> Official FreeSWITCH Sites
> https://freeswitch.com/oss
> https://freeswitch.org/confluence
> https://cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> https://freeswitch.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20200508/96355ff1/attachment-0001.html>


More information about the FreeSWITCH-users mailing list