-1 for this patch.
-> please kill extralines
-> tmpstr is already defined.
-> NACK/ACK is processed the same way,
which shoud'nt from the 4.6 specs.
BTW, i'm not in favor of filling extras informations
that will not be used by the operator.
This is bandwith and process wasting.
Do they really requires this ?
What happens if you do not fill this ?
regards
Vincent.
Ősz Ferenc a écrit :
Hi,
A simple patch for gw/smsc/smsc_emi.c creates a system message field for
UCP52 ack message.
(The system message field has the recipient's address + a timestamp.)
Eg. T-Mobile in Hungary requires this for SMSC connections..
----------------------------------------------------------------------------
--- smsc_emi.c 2009-01-12 17:46:50.000000000 +0100
+++ smsc_emi_modified.c 2009-04-15 14:41:03.000000000 +0200
@@ -585,7 +585,8 @@
struct universaltime unitime;
int st_code;
PrivData *privdata = conn->data;
-
+ struct tm tm;
+ char p[20];
switch(emimsg->ot) {
@@ -832,7 +833,31 @@
msg->sms.smsc_id = octstr_duplicate(conn->id);
bb_smscconn_receive(conn, msg);
+
+
reply = emimsg_create_reply(52, emimsg->trn, 1, privdata->name);
+
+ /*
+ * Create a system message field for UCP52 ack message.
+ * The system message has the recipient's address + a timestamp.
+ * Some SMSC (eg. T-Mobile) requires it.
+ */
+ Octstr *tmpstr;
+ tmpstr = octstr_create("");
+
+ /* Get the recipient's address. */
+ octstr_append(tmpstr, emimsg->fields[E50_ADC]);
+ octstr_append_char(tmpstr, ':');
+
+ /* Create a timestamp. */
+ tm = gw_localtime(time(NULL) + msg->sms.deferred * 60);
+ sprintf(p, "%02d%02d%02d%02d%02d%02d", tm.tm_mday, tm.tm_mon +
1, tm.tm_year % 100, tm.tm_hour, tm.tm_min, tm.tm_sec);
+ octstr_append(tmpstr, octstr_create(p));
+
+ /* Concatenate and insert the fields (number + timestamp) above. */
+ reply->fields[2] = tmpstr;
+
+
if (emi2_emimsg_send(conn, server, reply) < 0) {
emimsg_destroy(reply);
return -1;
--------------------------------------------------------------------------------
Regards,
Ferenc (oszfer __at__ aitia.hu) & Csabi ( csabi __at__ aitia.hu)
--
Telemaque - 06560 SOPHIA-ANTIPOLIS - (FR)
Service Technique/Reseau - NOC
Direction du Developpement xMS+
http://www.telemaque.fr/
[email protected]
Tel : +33 4 92 90 99 84 (fax 9142)