Skip to content

Instantly share code, notes, and snippets.

@bevenky
Created August 18, 2012 11:46
Show Gist options
  • Save bevenky/3386299 to your computer and use it in GitHub Desktop.
Save bevenky/3386299 to your computer and use it in GitHub Desktop.
Trial lua
pin = argv[1];
app_uri = [email protected]
api = freeswitch.API();
-- Call conference bridge
call_session = freeswitch.Session("sofia/external/" .. app_uri);
-- Get session UUID
session_uuid = call_session:get_uuid();
send_dtmf_command = "uuid_send_dtmf " .. session_uuid .. " W" .. pin;
-- Send DTMF for pin to enter conference
freeswitch.console_log("info", "Sending DTMF for PIN via" .. send_dtmf_command .. "\n");
api:executeString(send_dtmf_command);
freeswitch.console_log("info", "DTMF for PIN sent\n");
-- Sleep for some random time and choose between playing a music or sending digits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment