]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_skinny: add minimal handling of MeetMe button to send to a conference creation...
authorNathan Neulinger <nneul@neulinger.org>
Fri, 2 Aug 2013 15:54:46 +0000 (10:54 -0500)
committerNathan Neulinger <nneul@neulinger.org>
Fri, 2 Aug 2013 15:54:46 +0000 (10:54 -0500)
src/mod/endpoints/mod_skinny/conf/skinny_profiles/internal.xml
src/mod/endpoints/mod_skinny/mod_skinny.c
src/mod/endpoints/mod_skinny/mod_skinny.h
src/mod/endpoints/mod_skinny/skinny_api.c
src/mod/endpoints/mod_skinny/skinny_server.c
src/mod/endpoints/mod_skinny/skinny_tables.c
src/mod/endpoints/mod_skinny/skinny_tables.h

index 39ce60fe4a714227fb5177aa53e96eed897176fb..74cb86701b763ddd68ad10c92557ef2b088981f6 100644 (file)
@@ -14,6 +14,7 @@
     <param name="auto-restart" value="true"/>
     <param name="ext-voicemail" value="vmain"/>
     <param name="ext-redial" value="redial"/>
+    <!-- <param name="ext-meetme" value="conference"/> -->
   </settings>
   <soft-key-set-sets>
     <soft-key-set-set name="default">
index dc83c472948dabcac213cf8855971686ed4da294..18b0f3c3f534d08683099d331201d9f8cf9e79f0 100644 (file)
@@ -171,6 +171,7 @@ switch_status_t skinny_profile_dump(const skinny_profile_t *profile, switch_stre
        stream->write_function(stream, "Listener-Threads  \t%d\n", profile->listener_threads);
        stream->write_function(stream, "Ext-Voicemail     \t%s\n", profile->ext_voicemail);
        stream->write_function(stream, "Ext-Redial        \t%s\n", profile->ext_redial);
+       stream->write_function(stream, "Ext-MeetMe        \t%s\n", profile->ext_meetme);
        stream->write_function(stream, "%s\n", line);
 
        return SWITCH_STATUS_SUCCESS;
@@ -1864,6 +1865,10 @@ switch_status_t skinny_profile_set(skinny_profile_t *profile, const char *var, c
                if (!profile->ext_redial || strcmp(val, profile->ext_redial)) {
                        profile->ext_redial = switch_core_strdup(profile->pool, val);
                }
+       } else if (!strcasecmp(var, "ext-meetme")) {
+               if (!profile->ext_meetme || strcmp(val, profile->ext_meetme)) {
+                       profile->ext_meetme = switch_core_strdup(profile->pool, val);
+               }
        } else {
                return SWITCH_STATUS_FALSE;
        }
@@ -1956,6 +1961,10 @@ static switch_status_t load_skinny_config(void)
                                        skinny_profile_set(profile, "ext-redial", "redial");
                                }
 
+                               if (!profile->ext_meetme) {
+                                       skinny_profile_set(profile, "ext-meetme", "conference");
+                               }
+
                                if (profile->port == 0) {
                                        profile->port = 2000;
                                }
index d8ed1b03bf3c5dcdc7f902d7affca00ac8bcf8a5..39faed4388d435b4ecc58b30dc491aaa82ba5e11 100644 (file)
@@ -117,6 +117,7 @@ struct skinny_profile {
        /* extensions */
        char *ext_voicemail;
        char *ext_redial;
+       char *ext_meetme;
        /* db */
        char *dbname;
        char *odbc_dsn;
index 604b8509f797d2730129e87ccccba889b1984197..94318c8de05afb66a4157739a4dcbe1893d780a4 100644 (file)
@@ -233,6 +233,7 @@ static switch_status_t skinny_api_list_settings(const char *line, const char *cu
        switch_console_push_match(&my_matches, "auto-restart");
        switch_console_push_match(&my_matches, "ext-voicemail");
        switch_console_push_match(&my_matches, "ext-redial");
+       switch_console_push_match(&my_matches, "ext-meetme");
 
        if (my_matches) {
                *matches = my_matches;
index 95d486d3e0de0fd6ced62b758b95d39955646210..f2d8eb8abe75255c242ccf96a3265655fce6df9d 100644 (file)
@@ -76,7 +76,7 @@ uint32_t soft_key_template_default_events[] = {
        SOFTKEY_CONF,
        SOFTKEY_PARK,
        SOFTKEY_JOIN,
-       SOFTKEY_MEETMECONF,
+       SOFTKEY_MEETME,
        SOFTKEY_CALLPICKUP,
        SOFTKEY_GRPCALLPICKUP,
        SOFTKEY_DND,
@@ -1929,6 +1929,10 @@ switch_status_t skinny_handle_soft_key_event_message(listener_t *listener, skinn
                                }
                        }
                        break;
+               case SOFTKEY_MEETME:
+                       skinny_create_incoming_session(listener, &line_instance, &session);
+                       skinny_session_process_dest(session, listener, line_instance, listener->profile->ext_meetme, '\0', 0);
+                       break;
                default:
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
                                        "Unknown SoftKeyEvent type: %d.\n", request->data.soft_key_event.event);
index 9f04f8cd636c6edea5ad4ac32f916c6ff5fcfd64..ea29918cbbb9a21b3d4ceb329a0f5b3dd2c878e1 100644 (file)
@@ -239,7 +239,7 @@ SKINNY_DECLARE_STR2ID(skinny_str2button, SKINNY_BUTTONS, -1)
                {SOFTKEY_CONF, "SoftkeyConf"},
                {SOFTKEY_PARK, "SoftkeyPark"},
                {SOFTKEY_JOIN, "SoftkeyJoin"},
-               {SOFTKEY_MEETMECONF, "SoftkeyMeetmeconfrm"},
+               {SOFTKEY_MEETME, "SoftkeyMeetme"},
                {SOFTKEY_CALLPICKUP, "SoftkeyCallpickup"},
                {SOFTKEY_GRPCALLPICKUP, "SoftkeyGrpcallpickup"},
                {SOFTKEY_DND, "SoftkeyDnd"},
index 1e35a7d2085d2ed0c91aff038e246c1f9cad4ccb..647837f212ae9ba1bafe9fbb2a5d16933bb5e041 100644 (file)
@@ -192,7 +192,7 @@ enum skinny_soft_key_event {
        SOFTKEY_CONF = 0x0D,
        SOFTKEY_PARK = 0x0E,
        SOFTKEY_JOIN = 0x0F,
-       SOFTKEY_MEETMECONF = 0x10,
+       SOFTKEY_MEETME = 0x10,
        SOFTKEY_CALLPICKUP = 0x11,
        SOFTKEY_GRPCALLPICKUP = 0x12,
        SOFTKEY_DND = 0x13,