Hi all, I'm using mod_verto with the javascript library and it's working great except for one thing I haven't quite figured out yet. 95% of our calls are outbound, from mod_verto to PSTN and my outbound dialplan is set to record all sessions. Before mod_verto, we used a desktop app developed by me, wich in turn received a variable from the dialplan on A-leg set like this: <action application="set" data="sip_rh_X-RecordingFilename=${strftime(%Y)}/${strftime(%m)}/${strftime(%d)}/${strftime(%H)}/${strftime(%M)}/${destination_number}_${caller_id_number}.wav"/> My application would store that variable along with all client details, for later supervision. Recordings are stored using YYYY/MM/DD/HH/MM/LEG-B-NUMBER_LEG-A-EXTENSION.WAV format, and I need to acess this variable, because client's clock may slightly differ from freeswitch server, and the path to the recording would be wrong when stored in MySQL. With mod_verto and the javascript library, I can't read custom variables and get them on the javascript dialog object, more specifically on dialog.params, which is the place to read them I believe. This is my complete dialplan: <include> <extension name="Call_Verto"> <condition field="source" expression="mod_verto"> <condition field="destination_number" expression="(^\d{9,14}$)"> <action application="set" data="absolute_codec_string=^^:PCMA:PCMU"/> <action application="set" data="RECORD_DATE=${strftime(%Y-%m-%d %H:%M)}"/> <action application="set" data="RECORD_STEREO=false"/> <action application="record_session" data="$${basedir}/Program Files/FreeSWITCH/recordings/archive/outbound/${strftime(%Y)}/${strftime(%m)}/${strftime(%d)}/${strftime(%H)}/${strftime(%M)}/${destination_number}_${caller_id_number}.wav"/> <action application="set" data="verto_h_recording_filename=${strftime(%Y)}/${strftime(%m)}/${strftime(%d)}/${strftime(%H)}/${strftime(%M)}/${destination_number}_${caller_id_number}.wav"/> <action application="bridge" data="sofia/gateway/IPPBX/$1"/> </condition> </condition> </extension> </include> How can I set the verto_h_recording_filename variable in order to acess it with verto javascript client being the A-leg a mod_verto client? I searched all over but couldn't find a solution to my specific case, and documention is still a little sparse unfortunatelly. Thanks in advance for your help!
verto_h_ is only for incoming verto invites. why not generate filename at client side as you got any needed data at it anyway ср, 21 нояб. 2018 г. в 18:17, Nuno Bessa <nunoferreirabessa@gmail.com>:
Hi all,
I'm using mod_verto with the javascript library and it's working great except for one thing I haven't quite figured out yet. 95% of our calls are outbound, from mod_verto to PSTN and my outbound dialplan is set to record all sessions. Before mod_verto, we used a desktop app developed by me, wich in turn received a variable from the dialplan on A-leg set like this:
<action application="set" data="sip_rh_X-RecordingFilename=${strftime(%Y)}/${strftime(%m)}/${strftime(%d)}/${strftime(%H)}/${strftime(%M)}/${destination_number}_${caller_id_number}.wav"/>
My application would store that variable along with all client details, for later supervision. Recordings are stored using YYYY/MM/DD/HH/MM/LEG-B-NUMBER_LEG-A-EXTENSION.WAV format, and I need to acess this variable, because client's clock may slightly differ from freeswitch server, and the path to the recording would be wrong when stored in MySQL.
With mod_verto and the javascript library, I can't read custom variables and get them on the javascript dialog object, more specifically on dialog.params, which is the place to read them I believe.
This is my complete dialplan:
<include> <extension name="Call_Verto"> <condition field="source" expression="mod_verto"> <condition field="destination_number" expression="(^\d{9,14}$)"> <action application="set" data="absolute_codec_string=^^:PCMA:PCMU"/> <action application="set" data="RECORD_DATE=${strftime(%Y-%m-%d %H:%M)}"/> <action application="set" data="RECORD_STEREO=false"/> <action application="record_session" data="$${basedir}/Program Files/FreeSWITCH/recordings/archive/outbound/${strftime(%Y)}/${strftime(%m)}/${strftime(%d)}/${strftime(%H)}/${strftime(%M)}/${destination_number}_${caller_id_number}.wav"/> <action application="set" data="verto_h_recording_filename=${strftime(%Y)}/${strftime(%m)}/${strftime(%d)}/${strftime(%H)}/${strftime(%M)}/${destination_number}_${caller_id_number}.wav"/> <action application="bridge" data="sofia/gateway/IPPBX/$1"/> </condition> </condition> </extension> </include>
How can I set the verto_h_recording_filename variable in order to acess it with verto javascript client being the A-leg a mod_verto client?
I searched all over but couldn't find a solution to my specific case, and documention is still a little sparse unfortunatelly.
Thanks in advance for your help! _________________________________________________________________________ Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
Hi Alexander, thanks for your reply. Actually, that's what I feared. As for your suggestion, recordings are stored in Freeswitch server, not in client's PC. So, the filename has to be defined by freeswitch dialplan itself. I actually used another approach to solve this. Freeswitch server is also a web server, so I set up a php script which returns the filename according to server time. So whenever there's an outbound call, the client queries the Freeswitch server's php script for the filename and everything works as expected. Anyway, it would be nice if mod_verto would allow what I mentioned in my first post. It would be much simpler to just define a variable in the dialplan and then access it from verto.js on verto outbound calls. Anyway, I also thought that any dialplan variable would be accessible on the SDP itself, which in turn could be somehow parsed by verto.js. Isn't that possible in any way? Nuno Bessa <nunoferreirabessa@gmail.com> escreveu no dia quarta, 21/11/2018 à(s) 15:32:
Hi all,
I'm using mod_verto with the javascript library and it's working great except for one thing I haven't quite figured out yet. 95% of our calls are outbound, from mod_verto to PSTN and my outbound dialplan is set to record all sessions. Before mod_verto, we used a desktop app developed by me, wich in turn received a variable from the dialplan on A-leg set like this:
<action application="set" data="sip_rh_X-RecordingFilename=${strftime(%Y)}/${strftime(%m)}/${strftime(%d)}/${strftime(%H)}/${strftime(%M)}/${destination_number}_${caller_id_number}.wav"/>
My application would store that variable along with all client details, for later supervision. Recordings are stored using YYYY/MM/DD/HH/MM/LEG-B-NUMBER_LEG-A-EXTENSION.WAV format, and I need to acess this variable, because client's clock may slightly differ from freeswitch server, and the path to the recording would be wrong when stored in MySQL.
With mod_verto and the javascript library, I can't read custom variables and get them on the javascript dialog object, more specifically on dialog.params, which is the place to read them I believe.
This is my complete dialplan:
<include> <extension name="Call_Verto"> <condition field="source" expression="mod_verto"> <condition field="destination_number" expression="(^\d{9,14}$)"> <action application="set" data="absolute_codec_string=^^:PCMA:PCMU"/> <action application="set" data="RECORD_DATE=${strftime(%Y-%m-%d %H:%M)}"/> <action application="set" data="RECORD_STEREO=false"/> <action application="record_session" data="$${basedir}/Program Files/FreeSWITCH/recordings/archive/outbound/${strftime(%Y)}/${strftime(%m)}/${strftime(%d)}/${strftime(%H)}/${strftime(%M)}/${destination_number}_${caller_id_number}.wav"/> <action application="set" data="verto_h_recording_filename=${strftime(%Y)}/${strftime(%m)}/${strftime(%d)}/${strftime(%H)}/${strftime(%M)}/${destination_number}_${caller_id_number}.wav"/> <action application="bridge" data="sofia/gateway/IPPBX/$1"/> </condition> </condition> </extension> </include>
How can I set the verto_h_recording_filename variable in order to acess it with verto javascript client being the A-leg a mod_verto client?
I searched all over but couldn't find a solution to my specific case, and documention is still a little sparse unfortunatelly.
Thanks in advance for your help!
Hi! verto_h works only on invite, where you can send variables to verto client and access it in Javascript. Just one thought. Try to use chat functionality of verto where you can send message from server to verto client. https://freeswitch.org/confluence/plugins/servlet/mobile#content/view/658651... You can subscribe on client side on incoming message event and define your own protocol in message how will you handle it in client side. It might works. Best regards, Gregor On Fri, 23 Nov 2018, 22:25 Nuno Bessa <nunoferreirabessa@gmail.com wrote:
Hi Alexander, thanks for your reply.
Actually, that's what I feared. As for your suggestion, recordings are stored in Freeswitch server, not in client's PC. So, the filename has to be defined by freeswitch dialplan itself. I actually used another approach to solve this. Freeswitch server is also a web server, so I set up a php script which returns the filename according to server time. So whenever there's an outbound call, the client queries the Freeswitch server's php script for the filename and everything works as expected.
Anyway, it would be nice if mod_verto would allow what I mentioned in my first post. It would be much simpler to just define a variable in the dialplan and then access it from verto.js on verto outbound calls. Anyway, I also thought that any dialplan variable would be accessible on the SDP itself, which in turn could be somehow parsed by verto.js.
Isn't that possible in any way?
Nuno Bessa <nunoferreirabessa@gmail.com> escreveu no dia quarta, 21/11/2018 à(s) 15:32:
Hi all,
I'm using mod_verto with the javascript library and it's working great except for one thing I haven't quite figured out yet. 95% of our calls are outbound, from mod_verto to PSTN and my outbound dialplan is set to record all sessions. Before mod_verto, we used a desktop app developed by me, wich in turn received a variable from the dialplan on A-leg set like this:
<action application="set" data="sip_rh_X-RecordingFilename=${strftime(%Y)}/${strftime(%m)}/${strftime(%d)}/${strftime(%H)}/${strftime(%M)}/${destination_number}_${caller_id_number}.wav"/>
My application would store that variable along with all client details, for later supervision. Recordings are stored using YYYY/MM/DD/HH/MM/LEG-B-NUMBER_LEG-A-EXTENSION.WAV format, and I need to acess this variable, because client's clock may slightly differ from freeswitch server, and the path to the recording would be wrong when stored in MySQL.
With mod_verto and the javascript library, I can't read custom variables and get them on the javascript dialog object, more specifically on dialog.params, which is the place to read them I believe.
This is my complete dialplan:
<include> <extension name="Call_Verto"> <condition field="source" expression="mod_verto"> <condition field="destination_number" expression="(^\d{9,14}$)"> <action application="set" data="absolute_codec_string=^^:PCMA:PCMU"/> <action application="set" data="RECORD_DATE=${strftime(%Y-%m-%d %H:%M)}"/> <action application="set" data="RECORD_STEREO=false"/> <action application="record_session" data="$${basedir}/Program Files/FreeSWITCH/recordings/archive/outbound/${strftime(%Y)}/${strftime(%m)}/${strftime(%d)}/${strftime(%H)}/${strftime(%M)}/${destination_number}_${caller_id_number}.wav"/> <action application="set" data="verto_h_recording_filename=${strftime(%Y)}/${strftime(%m)}/${strftime(%d)}/${strftime(%H)}/${strftime(%M)}/${destination_number}_${caller_id_number}.wav"/> <action application="bridge" data="sofia/gateway/IPPBX/$1"/> </condition> </condition> </extension> </include>
How can I set the verto_h_recording_filename variable in order to acess it with verto javascript client being the A-leg a mod_verto client?
I searched all over but couldn't find a solution to my specific case, and documention is still a little sparse unfortunatelly.
Thanks in advance for your help!
_________________________________________________________________________ Professional FreeSWITCH Services sales@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
participants (3)
-
Alexandr Popov
-
Gregor Nanger
-
Nuno Bessa