]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9700 #resolve
authorSeven Du <dujinfang@gmail.com>
Sat, 5 Nov 2016 12:42:24 +0000 (20:42 +0800)
committerSeven Du <dujinfang@gmail.com>
Sat, 5 Nov 2016 12:43:27 +0000 (20:43 +0800)
src/mod/applications/mod_httapi/mod_httapi.c

index 7fb8926315773b94de0f0354383d8518aeb31459..74de05e842a7b346d83fe4bdb29470de637cb78b 100644 (file)
@@ -25,6 +25,7 @@
  * 
  * Anthony Minessale II <anthm@freeswitch.org>
  * Raymond Chandler <intralanman@freeswitch.org>
+ * Seven Du <dujinfang@gmail.com>
  *
  * mod_httapi.c -- HT-TAPI Hypertext Telephony API
  *
@@ -710,6 +711,8 @@ static switch_status_t parse_conference(const char *tag_name, client_t *client,
        char *str;
        char *dup, *p;
        const char *profile_name = switch_xml_attr(tag, "profile");
+       const char *pin = switch_xml_attr(tag, "pin");
+       const char *flags = switch_xml_attr(tag, "flags");
        
        if (!client->profile->perms.conference.enabled) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Permission Denied!\n");
@@ -728,6 +731,10 @@ static switch_status_t parse_conference(const char *tag_name, client_t *client,
        }
 
        str = switch_core_session_sprintf(client->session, "%s@%s", dup, profile_name);
+
+       if (!zstr(pin)) str = switch_core_session_sprintf(client->session, "%s+%s", str, pin);
+       if (!zstr(flags)) str = switch_core_session_sprintf(client->session, "%s+flags{%s}", str, flags);
+
        switch_core_session_execute_application(client->session, "conference", str);
 
        return SWITCH_STATUS_SUCCESS;