[Freeswitch-users] mod_avmd stops

francesco allertsen francesco at stormbits.com
Thu Nov 5 19:50:44 MSK 2015


Hello everyone,

I was testing the avmd mod, and I found a problem. The voicemail detection
starts, but after few seconds (2/3) it stops for 4/5 seconds, and then
"misses" the voicemail beep.

I'm using this small script for testing the avmd in python, partly taken
from an old email

---
import sys

from freeswitch import *

def input_callback(session, what, obj):
    consoleLog("info", "Callback")

    return "TRUE"

def handler(session, args):
    session.answer()
    callback = session.setInputCallback("input_callback")
    session.execute("avmd", "start")
    consoleLog("info", "AVMD start\n")
    session.execute("sleep", "20000")
    consoleLog("info", "AVMD status %s\n" %
session.getVariable('avmd_detect'))
    session.execute("avmd", "stop")
    consoleLog("info", "AVMD stop\n")
    session.hangup()
---

And you can see an example of the console log here

---
2015-11-05 16:44:04.609583 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.014491
f=0.364007 463.468433Hz sma=0.332653 sqa=0.125149 >>>
2015-11-05 16:44:04.649600 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.008135
f=0.300647 382.795802Hz sma=0.030065 sqa=0.009039 >>>
2015-11-05 16:44:04.669598 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.013395
f=0.277465 353.279229Hz sma=0.057811 sqa=0.016738 >>>
2015-11-05 16:44:04.669598 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.019046
f=0.322899 411.127973Hz sma=0.090101 sqa=0.027164 >>>
2015-11-05 16:44:04.689594 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.022637
f=0.323557 411.965056Hz sma=0.122457 sqa=0.037633 >>>
2015-11-05 16:44:04.689594 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.024591
f=0.336631 428.611912Hz sma=0.156120 sqa=0.048965 >>>
2015-11-05 16:44:04.709584 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.023547
f=0.309434 393.983412Hz sma=0.187063 sqa=0.058540 >>>
2015-11-05 16:44:04.709584 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.020918
f=0.326125 415.235059Hz sma=0.219676 sqa=0.069176 >>>
2015-11-05 16:44:04.729583 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.015642
f=0.275036 350.186756Hz sma=0.247179 sqa=0.076740 >>>
2015-11-05 16:44:09.709590 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.055515
f=0.785391 999.990286Hz sma=0.078539 sqa=0.061684 >>>
2015-11-05 16:44:09.769592 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.055515
f=0.785391 999.990286Hz sma=0.078539 sqa=0.061684 >>>
2015-11-05 16:44:09.809600 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.220715
f=1.566012 1993.908596Hz sma=0.156601 sqa=0.245239 >>>
2015-11-05 16:44:09.829595 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.251632
f=0.785391 999.990286Hz sma=0.235140 sqa=0.306923 >>>
2015-11-05 16:44:09.869585 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.055515
f=0.785391 999.990286Hz sma=0.078539 sqa=0.061684 >>>
2015-11-05 16:44:09.889639 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.098694
f=0.785391 999.990286Hz sma=0.157078 sqa=0.123368 >>>
2015-11-05 16:44:10.329624 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.170815
f=1.377658 1754.088297Hz sma=0.137766 sqa=0.189794 >>>
2015-11-05 16:44:10.349620 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.055515
f=0.785391 999.990286Hz sma=0.078539 sqa=0.061684 >>>
2015-11-05 16:44:10.349620 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.166566
f=1.201495 1529.791460Hz sma=0.198689 sqa=0.206043 >>>
2015-11-05 16:44:10.389591 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.043729
f=0.697050 887.512119Hz sma=0.069705 sqa=0.048588 >>>
2015-11-05 16:44:10.389591 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.056064
f=0.455676 580.184924Hz sma=0.115273 sqa=0.069352 >>>
2015-11-05 16:44:10.409623 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.091352
f=1.007482 1282.766487Hz sma=0.100748 sqa=0.101502 >>>
2015-11-05 16:44:10.429621 [DEBUG] mod_avmd.c:538 <<< AVMD v=0.171934
f=1.064772 1355.710235Hz sma=0.207225 sqa=0.214876 >>>
---

As you can see in the timestamps, it stopped for 5 seconds, and during
those 5 seconds probably there was the "beep" which was not caught.
I have checked in the wiki, but I don't see any specific configuration
about the avmd, so I don't know where to look for anymore, and online I
couldn't find any solution.

If you need more informations I'm happy to provide so.

Thanks a lot.

Best Regards,
Francesco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20151105/39661a9e/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list