From 8105f79e622da74de1d03e759e49e888703d8c1f Mon Sep 17 00:00:00 2001 From: Marc Olivier Chouinard Date: Sat, 9 Jul 2011 00:06:03 -0400 Subject: [PATCH] mod_protovm: Adding basic callback functionnality --- src/mod/applications/mod_protovm/menu.c | 8 ++++++++ src/mod/applications/mod_protovm/protovm.conf.xml | 1 + 2 files changed, 9 insertions(+) diff --git a/src/mod/applications/mod_protovm/menu.c b/src/mod/applications/mod_protovm/menu.c index d48e5473c8..3cd22a5884 100644 --- a/src/mod/applications/mod_protovm/menu.c +++ b/src/mod/applications/mod_protovm/menu.c @@ -210,6 +210,14 @@ void mtvm_menu_main(switch_core_session_t *session, vmivr_profile_t *profile) { mt_api_execute(session, profile->api_msg_save, cmd); msg_saved = SWITCH_TRUE; + } else if (!strcasecmp(action, "callback")) { /* CallBack caller */ + const char *cid_num = switch_event_get_header(phrase_params, "VM-Message-Caller-Number"); + if (cid_num) { + /* TODO add detection for private number */ + switch_core_session_execute_exten(session, cid_num, "XML", profile->domain); + } else { + /* TODO Some error msg that the msg doesn't contain a caller number */ + } } else if (!strncasecmp(action, "menu:", 5)) { /* Sub Menu */ void (*fPtr)(switch_core_session_t *session, vmivr_profile_t *profile) = mtvm_get_menu_function(action+5); if (fPtr) { diff --git a/src/mod/applications/mod_protovm/protovm.conf.xml b/src/mod/applications/mod_protovm/protovm.conf.xml index 852f6686e1..dc47f1e95c 100644 --- a/src/mod/applications/mod_protovm/protovm.conf.xml +++ b/src/mod/applications/mod_protovm/protovm.conf.xml @@ -58,6 +58,7 @@ +