[Freeswitch-svn] [commit] r4258 - freeswitch/trunk/src/mod/endpoints/mod_dingaling

Freeswitch SVN anthm at freeswitch.org
Wed Feb 14 10:32:02 EST 2007


Author: anthm
Date: Wed Feb 14 10:32:02 2007
New Revision: 4258

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

Log:
the guy on the mailing list had a good idea, add a message in dingalaing announcing the caller id as a chat message, added, but not testesd...can someone test this?

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	Wed Feb 14 10:32:02 2007
@@ -1529,6 +1529,7 @@
 		char *dnis = NULL;
 		char workspace[1024] = "";
 		char *p, *u, ubuf[512] = "", *user = NULL;;
+		char *cid_msg = NULL;
 
 		switch_copy_string(workspace, outbound_profile->destination_number, sizeof(workspace));
 		profile_name = workspace;
@@ -1630,6 +1631,10 @@
 		tech_pvt->us = switch_core_session_strdup(*new_session, user);
 		tech_pvt->them = switch_core_session_strdup(*new_session, full_id);
 		ldl_session_create(&dlsession, mdl_profile->handle, sess_id, full_id, user, LDL_FLAG_OUTBOUND);
+		if ((cid_msg = switch_mprintf("Incoming Call From %s %s\n", outbound_profile->caller_id_name, outbound_profile->caller_id_number))) {
+			ldl_handle_send_msg(mdl_profile->handle, tech_pvt->them, tech_pvt->us, "", cid_msg);
+			free(cid_msg);
+		}
 		tech_pvt->profile = mdl_profile;
 		ldl_session_set_private(dlsession, *new_session);
 		ldl_session_set_value(dlsession, "dnis", dnis);



More information about the Freeswitch-svn mailing list