]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add auto-reply option to dingaling to allow the gateway bot to auto-reply to chat...
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 12 Oct 2006 14:06:09 +0000 (14:06 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 12 Oct 2006 14:06:09 +0000 (14:06 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3041 d0543943-73ff-0310-b7d9-9358b9ac24b2

conf/freeswitch.xml
src/mod/endpoints/mod_dingaling/mod_dingaling.c

index 9e5d0e2e8069f140f1e057d093f966b6abe0a3db..d983ce3286d40f8c145ea984c252a939c77ecabb 100644 (file)
         <param name="message" value="Jingle all the way"/>
         <param name="rtp-ip" value="10.0.0.1"/>
         <param name="auto-login" value="true"/>
+       <param name="auto-reply" value="Press *Call* to call FreeSWITCH and be sure to come to ClueCon! http://www.cluecon.com"/>
         <!-- SASL "plain" or "md5" -->
         <param name="sasl" value="plain"/>
         <!-- if the server where the jabber is hosted is not the same as the one in the jid -->
index 3fc026b982121974d890bd67886887cf1c3b17e4..05d6979c40a805debd916624f7362ef75eb2bc4a 100644 (file)
@@ -95,6 +95,7 @@ struct mdl_profile {
     char *login;
     char *password;
     char *message;
+       char *auto_reply;
     char *dialplan;
     char *ip;
     char *extip;
@@ -1302,6 +1303,8 @@ static void set_profile_val(struct mdl_profile *profile, char *var, char *val)
                switch_set_flag(profile, TFLAG_TIMER);
        } else if (!strcasecmp(var, "dialplan")) {
                profile->dialplan = switch_core_strdup(module_pool, val);
+       } else if (!strcasecmp(var, "auto-reply")) {
+               profile->auto_reply = switch_core_strdup(module_pool, val);
        } else if (!strcasecmp(var, "name")) {
                profile->name = switch_core_strdup(module_pool, val);
        } else if (!strcasecmp(var, "message")) {
@@ -1551,6 +1554,11 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
                                if (msg) {
                                        switch_event_add_body(event, msg);
                                }
+
+                               if (profile->auto_reply) {
+                                       ldl_handle_send_msg(handle, from, "", profile->auto_reply);
+                               }
+
                                switch_event_fire(&event);
                        }
                        break;