]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add continue tag
authorAnthony Minessale <anthm@freeswitch.org>
Sat, 7 Jan 2012 13:48:37 +0000 (07:48 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Sat, 7 Jan 2012 13:48:37 +0000 (07:48 -0600)
src/mod/applications/mod_httapi/mod_httapi.c
src/mod/applications/mod_httapi/mod_httapi_doc.txt

index 51b82a9f791e19e339404afb02efad0a35ed079d..f9deb48d6547a9aebcaca7bba64fc8198ab0ee5b 100644 (file)
@@ -259,6 +259,12 @@ static void console_clean_log(const char *level_str, const char *msg)
        switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, level, "%s", switch_str_nil(msg));
 }
 
+static switch_status_t parse_continue(const char *tag_name, client_t *client, switch_xml_t tag, const char *body)
+{
+       
+       return SWITCH_STATUS_SUCCESS;
+}
+
 static switch_status_t parse_log(const char *tag_name, client_t *client, switch_xml_t tag, const char *body)
 {
        const char *level = switch_xml_attr(tag, "level");
@@ -920,6 +926,16 @@ static switch_status_t parse_record(const char *tag_name, client_t *client, swit
        return status;
 }
 
+static switch_status_t parse_common(const char *tag_name, client_t *client, switch_xml_t tag, const char *body)
+{
+       const char *action = switch_xml_attr(tag, "action");
+
+       if (action) {
+               switch_event_add_header_string(client->params, SWITCH_STACK_BOTTOM, "url", action);
+       }
+       
+       return SWITCH_STATUS_SUCCESS;
+}
 
 static switch_status_t parse_xml(client_t *client)
 {
@@ -990,6 +1006,8 @@ static switch_status_t parse_xml(client_t *client)
                                                        }
 
                                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Process Tag: [%s]\n", tag->name);
+
+                                                       parse_common(tag->name, client, tag, expanded);
                                                        handler(tag->name, client, tag, expanded);
                                                        
                                                        if (expanded && expanded != tag->txt) {
@@ -2423,6 +2441,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_httapi_load)
        bind_parser("conference", parse_conference);
        bind_parser("break", parse_break);
        bind_parser("log", parse_log);
+       bind_parser("continue", parse_continue);
 
        if (do_config() != SWITCH_STATUS_SUCCESS) {
                return SWITCH_STATUS_FALSE;
index f6c94e6fd4d8aed6f60f708873ed63beb31b580a..8d6e8a6746c8d8e3f35c00da2931332008697e33 100644 (file)
@@ -150,25 +150,28 @@ gender              : gender (fs param)
 
 
 
-<execute application>*DATA*</execute>
+<execute application data action>*DATA*</execute>
                    : Execute a FreeSWITCH app.
 ATTRS:
 application         : The app to run
+action             : Change url to submit to
+data               : Alternate source for app data
 *DATA*              : The app data
 
 
 
-<sms to>DATA</sms>
+<sms to action>DATA</sms>
                    : Send a SMS message.
 ATTRS:
 to                  : The dest number
+action             : Change url to submit to
 *DATA*              : The message data
 
 
 
 
 
-<dial context dialplan caller-id-name caller-id-number>*DATA*</dial>
+<dial context dialplan caller-id-name caller-id-number action>*DATA*</dial>
                    : Place an outbound call or transfer.
 
 ATTRS:
@@ -176,6 +179,7 @@ context             : Dialplan context.
 dialplan            : Dialplan dialplan.
 caller-id-name      : Caller ID Name.
 caller-id-number    : Caller ID Number.
+action             : Change url to submit to
 *DATA*              : Number to dial or originate string
 
 
@@ -194,22 +198,22 @@ action              : URL action to use.
 
 
 
-<conference profile>
+<conference profile action>
                    : Start a conference call.
 
 ATTRS:
 profile             : Conference profile to use.
+action             : Change url to submit to
 
 
 
 
-
-<hangup cause>
+<hangup cause action>
                    : Hangup the call
 
 ATTRS:
 cause               : Hangup cause
-
+action             : Change url to submit to
 
 
 
@@ -221,11 +225,19 @@ cause               : Hangup cause
 
 
 
-<log level clean>
+<log level clean action>
                    : Exit the httapi application and continue in the dialplan.
 ATTRS:
 level               : The log level to use.
 clean               : If true do not pring log prefix.
+action             : Change url to submit to
+
+<continue action>
+                    : Just continue (no-op)
+
+ATTRS:
+action             : Change url to submit to
+