Hi, I've got 2 issues about outgoing messages that exceed MMSC limit.
First: For one of operators the message is properly detected as failed, with following relevant fields in send-conf: X-Mms-Response-Status: Error-service-denied X-Mms-Response-Text: Message size too large Problem here is that mbuni treats this as temporary failure and schedules message for another delivery. I've set maximum-send-attempts to a high number to be safe against temporary GPRS failures, but trying to send such message 50 times is just a waste of bandwidth. The second problem: As said before, for one of operators message is properly detected as failed. Unfortunately for another one it isn't. That MMSC additionally sets Message-ID header in send-conf. In that case mbuni reports message as sent ignoring X-Mms-Response-Status indication. I'm attaching a patch that fixes those problems for me. However after applying it I noticed that DLR url isn't called for failed messages: Queue descriptor for message looks like: $ cat qf8044.1.x543.50 Tm-send-req Iqf8044.1.x543.50 iMMSBox F666666666/TYPE=PLMN R666666666/TYPE=PLMN HX-Mbuni-TransactionID:Mbuni-msg.8041.x1.43.10 C1293118044 L1293118052 D1293118082 X1293722841 N1 S671061 sTest vsendmms-user Uhttp://localhost/tests/mbuni_notify_ng.php uhttp://localhost/tests/mbuni_notify_ng.php rYes but after processing message logs contain: 2010-12-23 16:34:05 [21675] [8] INFO: mmsbox.c:645 <mmsbox_service_dispatch> [MM7] [orange] MMSBox: Skipped delivery-report URL call for [qf8044.1.x543.50]. Empty URL, from [666666666/TYPE=PLMN] I have no idea where, when and how dlr-url gets lost. I would appreciate if someone could help me tracking this down. Regards, Piotr
--- mbuni-cvs-orig/extras/mmsbox-mm1/mmsbox_mm1.c
+++ mbuni-cvs/extras/mmsbox-mm1/mmsbox_mm1.c
@@ -348,7 +348,11 @@
pthread_cond_destroy(&r->cond);
pthread_mutex_destroy(&r->mutex);
gw_free(r);
- *retry = 1; /* always retry ?? */
+ if(r->error && (octstr_compare(r->error,
octstr_imm("Error-service-denied")) == 0 ||
+ octstr_compare(r->error,
octstr_imm("Error-permanent-failure")) == 0))
+ *retry = 0;
+ else
+ *retry = 1;
return id;
}
@@ -491,9 +495,17 @@
mms_warning(0, "mmsbox-mm1", NULL,"No send-conf
returned by operator");
if (m == NULL ||
- (r->result = mms_get_header_value(m,
octstr_imm("Message-ID"))) == NULL) {
+ (r->result = mms_get_header_value(m,
octstr_imm("Message-ID"))) == NULL ||
+ octstr_compare(mms_get_header_value(m,
octstr_imm("X-Mms-Response-Status")),
+ octstr_imm("Ok")) != 0
+ ) {
Octstr *err = m ? mms_get_header_value(m,
octstr_imm("X-Mms-Response-Text")) : NULL;
Octstr *status = m ? mms_get_header_value(m,
octstr_imm("X-Mms-Response-Status")) : NULL;
+ if(status && (octstr_compare(status,
octstr_imm("Error-service-denied")) == 0 ||
+ octstr_compare(status,
octstr_imm("Error-permanent-failure")) == 0)) {
+ r->error = octstr_duplicate(status);
+ }
+ r->result = NULL; /* indicate failure to bearerbox */
mms_error(0, "mmsbox-mm1", NULL, "Sending failed: %s,
%s!",
err ? octstr_get_cstr(err) : "(none)",
status ? octstr_get_cstr(status) : "(none)");
pgpZq9oHMGM8d.pgp
Description: PGP signature
_______________________________________________ Devel mailing list [email protected] http://lists.mbuni.org/mailman/listinfo/devel
