return SWITCH_STATUS_BREAK;
}
+
+static switch_status_t parse_voicemail(const char *tag_name, client_t *client, switch_xml_t tag, const char *body)
+{
+ const char *check = switch_xml_attr(tag, "check");
+ const char *auth = switch_xml_attr(tag, "auth-only");
+ const char *profile = switch_xml_attr(tag, "profile");
+ const char *domain = switch_xml_attr(tag, "domain");
+ const char *id = switch_xml_attr(tag, "id");
+ char *ddom = NULL;
+ char *str;
+ switch_status_t status;
+
+ if (zstr(profile)) profile = "default";
+
+ if (zstr(domain)) {
+ if ((ddom = switch_core_get_variable_dup("domain"))) {
+ domain = ddom;
+ }
+ }
+
+ if (switch_true(check)) {
+ check = "check";
+ } else {
+ check = "";
+ }
+
+ if (switch_true(auth)) {
+ auth = "auth_only";
+ } else {
+ auth = "";
+ }
+
+ str = switch_core_session_sprintf(client->session, "%s %s %s %s %s", check, auth, profile, domain, id);
+
+ while(*str == ' ') str++;
+
+ status = switch_core_session_execute_application(client->session, "voicemail", str);
+
+ switch_safe_free(ddom);
+
+ return status;
+}
+
static switch_status_t parse_break(const char *tag_name, client_t *client, switch_xml_t tag, const char *body)
{
return SWITCH_STATUS_FALSE;
bind_parser("log", parse_log);
bind_parser("continue", parse_continue);
bind_parser("setVar", parse_get_var);
+ bind_parser("voicemail", parse_voicemail);
if (do_config() != SWITCH_STATUS_SUCCESS) {
return SWITCH_STATUS_FALSE;
permanent : Add as a permanent param or just once.
+<voicemail action temp-action check auth-only profile domain id/>
+ : Get a Channel variable (depends on permissions)
+
+ATTRS:
+action : Change url to submit to.
+temp-action : Change url to submit to. just for the next loop.
+check : true to check (omit to leave)
+auth-only : authenticate only and move on
+profile : profile name to use (omit for "default")
+domain : domain to use (omit for global domain variable)
+id : id to use (omit to prompt for id)
+
+