[Freeswitch-users] js and VMD

Nik Middleton nik.middleton at noblesolutions.co.uk
Thu Feb 12 14:26:17 PST 2009


Just been chatting to Ken Rice, his view (and he may be mistaken) is
that it should fire the call back event in much the same way as DTMF
does, however, it's not working.  I used to develop with C/C++ for about
10 years, but that was 12 years ago. Very rusty.  However, I'm going to
look at the start_dtmf code and try to replicate the functionality in
mod_vmd.

Regarding your suggestion, that wouldn't really work as I'm streaming a
file.  However, if memory serves me well, there is a timer function in C
that you can set to run that can call a function.  There is a function
in js called setTimeout(time_func, 500) but sadly it's not available in
spidermonkey.  BTW this function would resolve a bounty on call duration
timeouts


Regards


-----Original Message-----
From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of
Michael Collins
Sent: 12 February 2009 21:45
To: freeswitch-users at lists.freeswitch.org
Subject: Re: [Freeswitch-users] js and VMD

On Thu, Feb 12, 2009 at 12:49 PM, Nik Middleton
<nik.middleton at noblesolutions.co.uk> wrote:
> That makes sense, though could it not have a call back mechanism
similar
> to DTMF detect?
>

It probably could but the mod's author was using it exclusively from
event socket. I personally added the channel variable code for the
sake of testing. I'm sure this could be added but it's beyond my
skills presently. I would recommend opening up a JIRA and requesting
this functionality as an improvement. Perhaps the author, Eric Des
Courtis, could add it or perhaps another skilled programmer could add
this functionality. In the grand scheme of things it probably isn't
that difficult and with a little time even I could figure it out.

> I'm still not sure how I could use it even in an event socket.  I plan
> to call my js IVR script using a socket, but that has the originate
call
> in it which is nice and simple, but I'm unsure how I could abort it
(js
> IVR.

As a proof of concept you could have your script loop and check the
value of ${vmd_status} every 1000ms or so, and if it ever has the
value "TRUE" then you know VMD was positive and you could hangup and
do whatever other cleanup is necessary. That solution would be a temp
fix even though it wouldn't actually scale very well.

How are you handling answered calls now? Do you just start playing a
message? I'm wondering how this would work even if there was a
callback. Would you mind doing a pastebin of your script? I'd like to
see the big picture.
-MC

>
> The functionality I'm looking for is really simple. I simply don't
want
> to leave a voicemail message.  So VMD looks just the ticket.
>
> Regards

_______________________________________________
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
http://www.freeswitch.org




More information about the FreeSWITCH-users mailing list