What's the correct way to add a custom global/channel variable to freeswitch?

506 views
Skip to first unread message

Alan Evans

unread,
Jul 10, 2014, 9:56:17 AM7/10/14
to 2600h...@googlegroups.com
Hello 2600 devs,

I'm trying to figure out how I can set custom global and/or channel
variables.
For example I want to be able to add bridge_generate_comfort_noise [1]
into the dialplan for certain devices.

I have some devices that are very sensitive to breaks in the audio path.

[1] https://wiki.freeswitch.org/wiki/Variable_bridge_generate_comfort_noise

Regards
--
Alan R Evans
KAGE Systems Ltd

Alan Evans

unread,
Jul 11, 2014, 7:08:10 AM7/11/14
to 2600h...@googlegroups.com
Can nobody help me with this?
 I now need to modify the progress_timeout for a device which takes longer than normal to reply.
At the moment I'm modifying code to do this but there must be a better way.

Thanks
AlanE

Maksim Krzhemenevskiy

unread,
Jul 11, 2014, 3:51:07 PM7/11/14
to 2600h...@googlegroups.com
Hello!

Take a look at ecallmgr.hrl. Threre is a number of various channel variables defined inside ?SPECIAL_CHANNEL_VARS. You can define your own pseudonym as {<<"Bridge-Generate-Comfort-Noise">>, <<"bridge_generate_comfort_noise">>}. After that you call whapps_call_command:set to set your channel variable. Hope this helps you!

четверг, 10 июля 2014 г., 20:56:17 UTC+7 пользователь Alan Evans написал:

Alan Evans

unread,
Jul 11, 2014, 3:57:53 PM7/11/14
to 2600h...@googlegroups.com
Hello Maksim,

Thanks for the pointer, but that's the sort of thing I'm doing at the moment.
I was hoping there was a way to do this via configuration of the device or resource but as far as I can tell there's no choice other than to modify the code.
Anyway many thanks for your reply.

I may implement something generic and submit pull request if I get some time otherwise I will just carry on with my customizations.

Regards
-- 
Alan R Evans
KAGE Systems Ltd
--
You received this message because you are subscribed to the Google Groups "2600hz-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 2600hz-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Maksim Krzhemenevskiy

unread,
Jul 11, 2014, 4:20:41 PM7/11/14
to 2600h...@googlegroups.com
Take a look at applications/crossbar/priv/couchdb/schemas/devices.json
Is it what you want? You can change this using POST request to `devices` crossbar api.

пятница, 11 июля 2014 г., 18:08:10 UTC+7 пользователь Alan Evans написал:

Alan Evans

unread,
Jul 12, 2014, 7:14:24 AM7/12/14
to 2600h...@googlegroups.com
In case anyone else doesn't know this.

the data section in the callflow element has a timeout attribute which  controls both the call_timeout and originate_timeout values in the bridge command send to FS,

Jul 11 12:23:36 kazoo 2600hz[19989]: |14050778...@10.0.1.102|ecallmgr_call_events:563 (<0.15029.5>) publishing call event channel_execute
    'bridge({ignore_early_media='true',
             call_timeout=30,
             originate_timeout=30,
             local_var_clobber='true'})

https://2600hz.atlassian.net/wiki/display/APIs/Callflow+Flow+Elements

Still doesn't help me with other attributes which I may want to add to the bridge.

Regards
-- 
Alan R Evans
KAGE Systems Ltd
--
Reply all
Reply to author
Forward
0 new messages