friends-of-freeswitch / switchio

asyncio powered FreeSWITCH cluster control
http://switchio.rtfd.io
Mozilla Public License 2.0
191 stars 28 forks source link

Not able to change the duration #40

Open goodboy opened 6 years ago

goodboy commented 6 years ago

Issue by UjjwalaVuyyala Thursday Nov 02, 2017 at 16:13 GMT Originally opened as https://github.com/sangoma/switchy/issues/70


Hello, Switchy is a great and easy to set up tool. I want to make calls to a particular URI and hold the call for 10 seconds and hangup. I am using the cli statement "switchy dial 127.0.0.1 --dest-url 105@xx.xx.xx.xx:5060 --profile external --rate 1 --limit 1 --max-offered 5 --duration 10". The calls connect but a BYE is sent immediately ( within approx. .22 sec after the INVITE) no matter how much I change the rate, limit, max-offered and duration values. Any help to solve this issue is appreciated. Thank you in advance.

goodboy commented 6 years ago

Hey @UjjwalaVuyyala just to let you know the original authors/maintainers of switchy have now hard forked the project here.

The duration setting should work out of the box. Are you actually literally writing --dest-url 105@xx.xx.xx.xx:5060? If so this of course won't work; you need to replace xx.xx.xx.xx withe IP address of the target host you wish to send traffic to.

Assuming you're actually using a real address then this might be something to do with the dialplan configured on the FreeSWITCH minion server. Can you paste the debug log from freeswitch when you make a single call?

UjjwalaVuyyala commented 6 years ago

Hello tgoodlet, Freeswitch log file had the following for a single call -

"2017-11-13 06:52:31.745119 [CRIT] switch_loadable_module.c:1522 Error Loading module /usr/lib/freeswitch/mod/mod_bert.so /usr/lib/freeswitch/mod/mod_bert.so: cannot open shared object file: No such file or directory 46e21bfa-c882-11e7-8ecd-000c29e96698 2017-11-13 06:52:32.324362 [ERR] switch_core_session.c:2683 Invalid Application bert_test"

The file mod_bert.so was not present in the system. I downloaded freeswitch for Ubuntu Xenial as per the instructions given in this website "https://freeswitch.org/confluence/display/FREESWITCH/Ubuntu+16.04+Xenial" not more than a month ago. I was able to find mod_bert.so file in other versions of the download for different OS. This might be the problem because switchy uses the mod_bert.so module. I will try this setup with a different OS. Please mention your thoughts on this. Thank you very much.

goodboy commented 6 years ago

@UjjwalaVuyyala yep that's your problem.

mod_bert is used to verify the audio stream and written by our very own @moises-silva :) If you don't need to verify audio you can just change the app that's used.

You can check for available built-in apps using: switchio list-apps

I'd recommend just a simple tone stream to start: switchio dial <hosts> <other options> --app :TonePlay

As a warning there may be some bugs still in this stuff since forking the project. I have some CLI tests in the works as we speak so most of it should be cleared up shortly. Thanks for bearing with us :)

goodboy commented 6 years ago

@moises-silva maybe ^ is justification to maintain our own docker image which includes mod_bert. I'm starting to get the feeling a lot of people are going to use switchio for stress testing more then anything else.

goodboy commented 6 years ago

@UjjwalaVuyyala just fixed some bugs with the CLI stuff so you might need to use the console_tests branch for now to get those fixes.