Revision
14675
Author
gmaruzz
Date
2009-08-29 08:15:21 -0500 (Sat, 29 Aug 2009)

Log Message

celliax: sends dtmf to remote

Modified Paths

Diff

Modified: freeswitch/branches/gmaruzz/mod_celliax/celliax_protocol.c (14674 => 14675)


--- freeswitch/branches/gmaruzz/mod_celliax/celliax_protocol.c	2009-08-29 12:07:23 UTC (rev 14674)
+++ freeswitch/branches/gmaruzz/mod_celliax/celliax_protocol.c	2009-08-29 13:15:21 UTC (rev 14675)
@@ -4622,12 +4622,22 @@
 
 int celliax_senddigit(private_t * tech_pvt, char digit)
 {
-	char msg_to_skype[1024];
 
 	DEBUGA_SKYPE("DIGIT received: %c\n", SKYPIAX_P_LOG, digit);
-	sprintf(msg_to_skype, "SET CALL %s DTMF %c", tech_pvt->skype_call_id, digit);
 	//celliax_signaling_write(tech_pvt, msg_to_skype);
+  if (tech_pvt->controldevprotocol == PROTOCOL_AT && tech_pvt->at_send_dtmf[0]) {
+    int res = 0;
+    char at_command[256];
 
+    memset(at_command, '\0', 256);
+    sprintf(at_command, "%s=\"%c\"", tech_pvt->at_send_dtmf, digit);
+    res = celliax_serial_write_AT_ack(tech_pvt, at_command);
+    if (res) {
+      ERRORA("senddigit command failed, command used: '%s=\"%c\"', giving up\n",
+             SKYPIAX_P_LOG, tech_pvt->at_send_dtmf, digit);
+    }
+  }
+
 	return 0;
 }
 /*! \brief Write audio frames to interface */