[Freeswitch-users] Issue with mod_verto enabled inside modules.conf.xml and originate not working correctly

Ken Rice krice at freeswitch.org
Fri May 20 06:10:57 MSD 2016


Potential bugs like this should be reported to the jira bug tracker @ https://freeswitch.org/jira

Sent from my iPhone

> On May 19, 2016, at 8:25 PM, Andrew Keil <andrew.keil at visytel.com> wrote:
> 
> To FreeSWITCH Users,
>  
> I thought I would pass this on since I spent all day yesterday trying to track this issue down.
>  
> See below for my setup of FreeSWITCH version 1.6.8 (this problem also happens on 1.6.5 since that is why I upgraded to see if the problem was fixed or not).
>  
> I can reproduce this issue on FreeSWITCH 1.6.5 and 1.6.8 100% of the time.
>  
> Basically if mod_verto is not commented out inside the modules.conf.xml file then the “originate” does not function as it is supposed to.
>  
> See at the bottom of this message my test Lua script (visytel-test-out.lua).
>  
> I setup a simple SIP phone (Bria) to register with FreeSWITCH under user 1000 (sofia status profile internal reg checked out OK) then called the originate command:
>  
> originate {ignore_early_media=true,call_timeout=15,return_ring_ready=true}user/1000 00000000
>  
> When mod_verto is commented out and FreeSWITCH is started everything works OK (except session:hangupCause() always returns NONE – but I can work around this)
> When mod_verto is not commented out and FreeSWITCH is started originate gets stuck and never starts the Lua script (unless answered) despite return_ring_ready=true.
>  
> Luckily I currently do not need video on my FreeSWITCH installations so I can happily comment out mod_verto, however this may not be the case in the future.
>  
> Kind Regards,
>  
> Andrew Keil
> Visytel Pty Ltd
>  
> New setup of FreeSWITCH 1.6.8 on up-to-date CentOS 6.7
>  
> yum -y install epel-release
>  
> yum -y install git gcc-c++ autoconf automake libtool wget python ncurses-devel zlib-devel libjpeg-devel openssl-devel sqlite-devel libcurl-devel libxml2-devel libidn-devel readline-devel
>                 These should be already installed and up-to-date
> yum -y install e2fsprogs-devel pcre-devel speex-devel ldns-devel libedit-devel libyuv-devel opus-devel libvpx-devel unbound-devel libuuid-devel libsndfile-devel sox
>                 These should install
>                 Note: No packages for: libvpx2*, libdb4* (so mod_vpx & mod_fsv will not be supported)
>  
> cd /usr/local/src
> git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git 
> cd /usr/local/src/freeswitch
> ./bootstrap.sh
> vi modules.conf
>     Comment out (ie. place '#' infront):
>                                 mod_fsv
>                                 mod_h26x
>                 Save and close (<Esc> :wq!)
>  
> ./configure --disable-libvpx --disable-libyuv
>  
> yum install yasm-devel  {This is extra from the original yum install pre-requisites}
>  
> make
> make install
> make cd-sounds-install
> make cd-moh-install
> cd /usr/local/freeswitch/conf
> vi vars.xml
>     Change:  <X-PRE-PROCESS cmd="set" data="default_password=1234"/> {!!set it to something different!!}
>     Save and close (<Esc> :wq!)
> cd /usr/local/freeswitch/conf/autoload_configs
> vi modules.conf.xml
>     comment out (ie. place '<!--' infront and '-->' at the end):
>                                 mod_fsv
>                 Save and close (<Esc> :wq!)
> cd /usr/local/freeswitch/bin
> ./freeswitch -nonat -nonatmap
>  
> version
> FreeSWITCH Version 1.6.8+git~20160505T153832Z~99de0ad502~64bit (git 99de0ad 2016-05-05 15:38:32Z 64bit)
> ... to exit from FreeSWITCH console
>  
>  
> Here is my test Lua script which was placed inside scripts/visytel-test-out.lua:
>  
> local trace_string
>  
> -- Script tested by using originate: originate {ignore_early_media=true,call_timeout=15,return_ring_ready=true}user/1000 00000000
>  
> --[[
>  
> Dialplan inside conf/dialplan/default/00_visytel_out.xml:
>  
> <include> 
>                 <extension name="visytel_out">  
>                                 <condition field="destination_number" expression="00000000">   
>                                                 <action application="lua" data="visytel-test-out.lua"/>   
>                                 </condition> 
>                 </extension>
> </include>
>  
>  
> ]]-- 
>  
> -- Trace some channel variables here
> trace_string = session:getVariable("uuid")
> freeswitch.consoleLog("INFO", trace_string)
> trace_string = session:getVariable("destination_number")
> freeswitch.consoleLog("INFO", trace_string)
> trace_string = session:getVariable("ani")
> freeswitch.consoleLog("INFO", trace_string)
> trace_string = session:getVariable("direction")
> freeswitch.consoleLog("INFO", trace_string)
> trace_string = session:getVariable("channel_name")
> freeswitch.consoleLog("INFO", trace_string)
>  
> -- waitForAnswer here
> freeswitch.consoleLog("INFO", "Prior to session.waitForAnswer()")
> session:waitForAnswer(session)
> freeswitch.consoleLog("INFO", "After session.waitForAnswer()")
> -- Get Hangup Cause {this does not seem to work}
> freeswitch.consoleLog("INFO", session:hangupCause())  -- This seems to be always a value of NONE so not much use
>  
> -- Handle whether outbound call was ANSWERED or not here
> if (session:getState() ~= "CS_HANGUP") then
>                 freeswitch.consoleLog("INFO", "OUTBOUND ANSWERED")
>                 session:sleep(2000)
>                 session:hangup() -- Just HANGUP for now
> else
>                 freeswitch.consoleLog("INFO", "OUTBOUND FAILED")    
>                 session:hangup()            
> end
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services: 
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.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/20160519/bca66106/attachment.html 


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