Call Us Today! 877.742.2583




Page tree
Skip to end of metadata
Go to start of metadata

About

The following code makes one call first, retries max_retries1 times, alternating between 2 different gateways, once the call has been established, it plays a greeting message, it makes the second call, retries max_retries2 times and once the second call has been established, it bridges the two calls. There are also two lines of code included for enabling call recording in stereo (one leg per channel).

 

Notes

  • The uuid parameter is used so you may identify the call through the Event Socket by reading that call/channel variable.
  • The dialstrXY parameters should be in the form: sofia/gateway/gateway_name/dial_number or similar, following the originate command specifications and according to what kind of call you would like to make
  • The greeting_snd parameter is optional, if it is not passed, the greeting message won't be played after the first call is established
  • Depending on the format of your greeting_snd file, you might need to install and enable mod_shout
  • You have to save this code in a file, e.g. bridge.lua, and then run it by issuing 'luarun bridge.lua uuid dialstr1 dialstr2 dialstr12 dialstr22 [greeting_snd]" (greeting_snd is optional). You can do this either from the console or through the Event Socket

Script example