On Tue, Aug 6, 2013 at 11:50 PM, Karl Schmidt <karl@xtronics.com> wrote:
I want to use a freeDTM fxs to make local calls on a POTS line IF it isn't busy - not seeing an
example of how to test. ( There are some ftdm commands for the fs_cli - but I'm not seeing how to
grab this information for the dialplan.

Has someone else set up a backup line like this?

Hello Karl,

You can execute CLI commands (which in FreeSWITCH lingo are called APIs) from the dialplan using dollar-sign syntax such as:

<condition field="${ftdm_usage(1 1)}" expression="^0$">
</condition>

That checks if span 1 channel 1 has 0 calls. Note there is an inherent small race between the time you check and the time you try to use the channel, but that ought to be good enough I think.

Moises Silva
Manager, Software Engineering

msilva@sangoma.com

Sangoma Technologies

100 Renfrew Drive, Suite 100, Markham, ON L3R 9R6 Canada


t.   +1 800 388 2475 (N. America)

t.   +1 905 474 1990 x128

f.   +1 905 474 9223

 

Products | Solutions | Events | Contact | Wiki | Facebook | Twitter`| | YouTube