[Freeswitch-users] Prerequisites of enabling freeswitch 1.2.7 to use gsm modem

Ashish Mishra itsme.kunnu at gmail.com
Thu Jul 25 03:25:34 MSD 2013


Hello.
Kindly help me with the  prerequisites of enabling freeswitch to use gsm
modem...i have already compiled and installed freeswitch on my ubuntu 12.04
LTS machine...
Thank you...
On Jul 25, 2013 4:42 AM, "Michael Collins" <msc at freeswitch.org> wrote:

Hi Raghu,

I would put the setInputCallback before the sleep, that way if the avmd is
detected while you're sleeping then it should work.

-MC


On Wed, Jul 24, 2013 at 1:30 PM, Raghu <srraghu45 at gmail.com> wrote:

> I am new to freeswitch. I am trying to send a message to voicemail using
> avmd for voicemail detection, here is the code which i am using with
> originate command:
>
> from freeswitch import *
>
> # WARNING: known bugs with hangup hooks, use with extreme caution
> def hangup_hook(session, what):
>
>     consoleLog("info","hangup hook   %s!!\n\n" % what)
>     return
>
> def input_callback(session, what, obj):
>
>     if (what == "dtmf"):
>         consoleLog("info", what + " from callback " + obj.digit + "\n")
>         return
>     elif (what == "event" and session.getVariable('avmd_detect') ==
> "TRUE"):
>         consoleLog("info", "Voicemail Detected\n")
>     return "true"
>
> def handler(session, args):
>
>     session.answer()
>     session.execute("avmd", "start")
>     session.execute("sleep", "25000")
>     callback = session.setInputCallback(input_callback)
>     consoleLog("info","callback returned %s!!\n\n" % callback)
>     while session.getVariable('avmd_detect'):
>          session.execute("speak", "flite|kal|'Hi how are you'")
>
>     session.execute("avmd", "stop")
>     session.setHangupHook(hangup_hook)
>     session.hangup() #hangup the call
>
>
> I can see avmd getting started but it does detect any beep. Is there a
> simpler way to check if avmd is working without using 'originate'?
>
> Thanks
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.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
> http://www.freeswitch.org
>
>


-- 
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org
http://www.freeswitchsolutions.com




Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.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
http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130725/6c00c82d/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list