I guess I'm doing it right. I've been programming in perl for the last few months, so I'm just not used to the lua way. I'm pretty close to a solution, but what I would like to get now is the callee number - that is, the main number dialed before it was transferred to an extension. I tried "show detailed_calls", but the only numbers that gave me were the caller-ID number (which I already have from the event), and the number called (which is only the extension, and is also already present in the event). It's not a big deal, since I can use the outbound_caller_id_number variable, but there are some voice mailboxes here where 2 different called numbers end up at the same extension, and same voice box. -- Steve On Tue, May 31, 2016 at 6:46 PM, Abaci B <abaci64@gmail.com> wrote:
This is the correct way to get user data, why do you consider this unclean?
On Tue, May 31, 2016 at 8:10 PM, Steven Schoch < schoch+freeswitch.org@xwin32.com> wrote:
I may have just answered my own question again. I found a way, but please let me know if you know of a cleaner way:
user = event:getHeader("VM-User") domain = event:getHeader("VM-Domain") api = freeswitch.API(); from = api:executeString("user_data " ..user .. "@" .. domain .. " var outbound_caller_id_number") to = api:executeString("user_data " .. user .. "@" .. domain .. " param vm-notify-sms")
This should get me what I need to send the text.
-- Steve
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org