Hello,
I would like to achieve the following schema to send sms:
app ---> kannel gw 1---> php code
I would like the php code is seen as another kannel gw by the kannel gw #1.
In the php code, I wrote some code answering "0: Accepted for delivery" or
"Sent." but the GW1 saw it as NACK and so make it as failed in the kannel
database.
I take a look in the kannel source and I found that in the
/gw/smsc/smsc_http.c :
static void kannel_parse_reply(SMSCConn *conn, Msg *msg, int status,
List *headers, Octstr *body)
{
/* Test on three cases:
* 1. an smsbox reply of an remote kannel instance
* 2. an smsc_http response (if used for MT to MO looping)
* 3. an smsbox reply of partly successful sendings */
if ((status == HTTP_OK || status == HTTP_ACCEPTED)
&& (octstr_case_compare(body, octstr_imm("Sent.")) == 0 ||
octstr_case_compare(body, octstr_imm("Ok.")) == 0 ||
octstr_ncompare(body, octstr_imm("Result: OK"),10) == 0)) {
bb_smscconn_sent(conn, msg, NULL);
} else {
bb_smscconn_send_failed(conn, msg,
SMSCCONN_FAILED_MALFORMED, octstr_duplicate(body));
}
}
So I assume kannel saw a good transmission when it receive a HTTP OK and a
message like "Sent." or "Ok."
Does I forget something ?
Does someone got similar issue ?
Regards