]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
gsmopen: added proof of concet to send pdu messages via gsmlib
authorGiovanni Maruzzelli <gmaruzz@gmail.com>
Tue, 17 Apr 2012 20:54:54 +0000 (22:54 +0200)
committerGiovanni Maruzzelli <gmaruzz@gmail.com>
Tue, 17 Apr 2012 20:54:54 +0000 (22:54 +0200)
src/mod/endpoints/mod_gsmopen/Makefile
src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp

index 7084df12e412d3ac8fb490c44c9f0c11bfa9b896..bf1920aa6f5b607d12d58742c37242327c282082 100644 (file)
@@ -1,6 +1,6 @@
 MODNAME=mod_gsmopen
 SVNDEF := -D'GSMOPEN_SVN_VERSION="$(shell svnversion -n .)"'
 LOCAL_CFLAGS += $(SVNDEF) -I../../../../libs/spandsp/src -I../../../..//libs/tiff-3.8.2/libtiff
-LOCAL_LDFLAGS=-L../../../../libs/spandsp/src -lspandsp -lctb-0.16
+LOCAL_LDFLAGS=-L../../../../libs/spandsp/src -lspandsp -lctb-0.16 -lgsmme
 LOCAL_OBJS=gsmopen_protocol.o
 include ../../../../build/modmake.rules
index a03c2b614b45034df433df4d806b79107ab25a2a..041ed8caa6d23094fd2a88648ea7763d5bba80e3 100644 (file)
@@ -1685,6 +1685,26 @@ read:
                                                //servicecentretimestamp = sms->serviceCentreTimestamp();
                                                //sender_recipient_address = sms->address();
 
+
+
+#ifdef NOTDEF_SENDING_EXAMPLE
+                                               SMSMessageRef smsMessage;
+                                               // message text has probably to be in 8859-1
+                                               smsMessage = new SMSSubmitMessage("submit me ", "3472665618");
+                                               cout << smsMessage->toString() << endl;
+                                               string pdu = smsMessage->encode();
+                                               cout << pdu << endl;
+                                               //cout << intToStr(pdu.length() / 2 - getSCAddressLen())  << endl;
+                                               cout << intToStr(pdu.length() / 2 - 1)  << endl;
+
+                                               /*
+                                                  string pdu = encode();
+                                                  Parser p(_at->sendPdu("+CMGS=" +
+                                                  intToStr(pdu.length() / 2 - getSCAddressLen()),
+                                                  "+CMGS:", pdu));
+                                                  */
+#endif// NOTDEF_SENDING_EXAMPLE
+
 #endif// WANT_GSMLIB