[Freeswitch-svn] [commit] r3041 - in freeswitch/trunk: conf src/mod/endpoints/mod_dingaling

Freeswitch SVN anthm at freeswitch.org
Thu Oct 12 10:06:10 EDT 2006


Author: anthm
Date: Thu Oct 12 10:06:09 2006
New Revision: 3041

Modified:
   freeswitch/trunk/conf/freeswitch.xml
   freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c

Log:
add auto-reply option to dingaling to allow the gateway bot to auto-reply to chat msgs recieved outside the context of a call

Modified: freeswitch/trunk/conf/freeswitch.xml
==============================================================================
--- freeswitch/trunk/conf/freeswitch.xml	(original)
+++ freeswitch/trunk/conf/freeswitch.xml	Thu Oct 12 10:06:09 2006
@@ -278,6 +278,7 @@
         <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 -->

Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	Thu Oct 12 10:06:09 2006
@@ -95,6 +95,7 @@
     char *login;
     char *password;
     char *message;
+	char *auto_reply;
     char *dialplan;
     char *ip;
     char *extip;
@@ -1302,6 +1303,8 @@
 	  	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 @@
 				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;



More information about the Freeswitch-svn mailing list