Misc. Dialplan Tools bind meta app

From FreeSWITCH Wiki

Jump to: navigation, search

bind_meta_app allows you to bind an application to specified call leg(s). During a bridge, it will respond to the specified DTMF sequence and execute the application that you specify. The call leg that the bind_meta_app is *not* bound to will *not* hear the DTMF sequence being dialed. Once bound to a call leg, the application binding will survive for the lifetime of the call leg.

Important: This feature will not work when bypass_media=true

Usage

<action application="bind_meta_app" data="KEY LISTEN_TO RESPOND_ON APPLICATION[::PARAMETERS]"/>

Explanation of parameters

  • KEY is the button you want to respond to after the * button is pressed. If you wanted to respond to *1, you would put 1 in place of KEY. You are limited to a single digit.
  • LISTEN_TO is which call leg(s) to listen on. Acceptable parameters are a, b or ab.
  • RESPOND_ON is which call leg(s) to perform the action on. Acceptable parameters are s or o. s means same and o means opposite in cases where you use both a and b
  • APPLICATION is which application you want to execute.
  • PARAMETERS are the arguments you want or need to provide to the APPLICATION. You must put :: after the APPLICATION for these arguments to be handled properly.


Examples:

<action application="bind_meta_app" data="1 a s execute_extension::dx XML features"/>

When *1 is pressed on the A call leg, the execute_extension application is executed upon the A call leg. The extension that is executed is the dx extension in the XML dialplan under the features context.


<action application="bind_meta_app" data="2 a s record_session::$${base_dir}/recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>

When *2 is pressed on the A call leg, the session audio starts recording on the A call leg. It saves the audio to the $$(base_dir)/recordings/${caller_id_number}.$(strftime(%Y-%m-%d-%H-%M-%S)}.wav file. (i.e. /usr/local/freeswitch/recordings/1234.2008-04-09-10-11-12.wav). Important note: In default diaplan example record_session is listening for DMTF on the B leg, so callee can only activate the recording.

Personal tools
Community