[Freeswitch-users] DTMF Reading and Playing

Anthony Minessale anthony.minessale at gmail.com
Thu Sep 11 10:32:31 PDT 2008


problem is if this is over sip, the dtmf is queued into the rtp stack and
sent in real time as the call progresses.
Since you are hanging up right away, it never gets a chance to send it.
you must sleep long enough for the entire tone to be sent.

I added a convicence variable set once you call send_dtmf that will tell you
how long to sleep
until all of the digits should be sent.

update to latest trunk and try this:

JavaSession s = new JavaSession(uuid);
s.answer();
s.streamFile("/usr/local/freeswitch/sounds/1.wav");
s.execute("send_dtmf", "0123456789ABCD*#@2000");
s.execute("sleep", s.getVariable("last_dtmf_duration"));
s.hangup();



On Thu, Sep 11, 2008 at 11:43 AM, Klaus Teller <klaus.teller at gmx.net> wrote:

> HI Brian,
>
> Thanks for your suggestion. I just don't see how this would help me. I
> understand queue_dtmf is to be used before bridging. But i'm not bridging
> calls. I'm just originating calls and interacting with the remote device.
> What i really want is the inverse of getDigits() that you can call anytime
> in the call to send DTMFs. The Asterisk equivalent to what i need would be
> SendDTMF.
>
> Any further idea?
>
> Klaus.
>
>
>
> -------- Original-Nachricht --------
> > Datum: Thu, 11 Sep 2008 11:11:17 -0500
> > Von: Brian West <brian at freeswitch.org>
> > An: freeswitch-users at lists.freeswitch.org
> > Betreff: Re: [Freeswitch-users] DTMF Reading and Playing
>
> > Might want to try queue_dtmf
> >
> > /b
> >
> > On Sep 11, 2008, at 11:03 AM, James Green wrote:
> >
> > > Klaus Teller wrote:
> > >> I tried the following but for unknown reason, the caller is not
> > >> getting anything:
> > >>
> > >>
> > >>       JavaSession s = new JavaSession(uuid);
> > >>        s.answer();
> > >>        s.streamFile("/usr/local/freeswitch/sounds/1.wav");
> > >>        s.execute("send_dtmf", "0123456789ABCD*#@2000");
> > >>        s.hangup();
> > >>
> > >>
> > >> I can play the file 1.wav without problem but the "send_dtmf" is
> > >> simply being ignored. I used wireshrack to check if maybe the
> > >> outbound DTMF was sent and not played by my softphone. But this is
> > >> not the case.
> > >
> > > streamFile() blocks until sound file ends or a DTMF tone is
> > > received, as
> > > detailed on the wiki:
> > >
> > > http://wiki.freeswitch.org/wiki/Session_streamFile
> > >
> > > I suspect you want some background music? I'm still trying to get my
> > > head around which programming features to use in which circumstances,
> > > something I've not found any clear high level guide on yet.
> > > <james_green.vcf>_______________________________________________
> > > 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/frees
> witch-users
> > > http://www.freeswitch.org
> >
> > Brian West
> > sip:brian at freeswitch.org <sip%3Abrian at freeswitch.org>
> >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > 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
>
> --
> Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen:
> http://www.gmx.net/de/go/multimessenger
>
> _______________________________________________
> 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
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080911/ae242979/attachment-0002.html 


More information about the FreeSWITCH-users mailing list