Created
August 18, 2012 11:46
-
-
Save bevenky/3386299 to your computer and use it in GitHub Desktop.
Trial lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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