[SOLVED] Kannel Pending Status for all sent Messages

I have playSMS 1.4 installed on Ubuntu 12.4. messages are sent ok. But when I goto Reports / My Sent SMS , I see YELLOW button (PENDING) on all sent messages.
I set dlr-mask to 31 too in the smsc config but still not solved.

following is kannel bearerbox log.
2016-09-02 17:20:43 [22347] [6] DEBUG: AT2[zaibgsmid]: <-- > 2016-09-02 17:20:43 [22347] [6] DEBUG: AT2[zaibgsmid]: send command status: 1 2016-09-02 17:20:43 [22347] [6] DEBUG: AT2[zaibgsmid]: --> 0031000A8133332091900000A72364B61C442FCFE969F7196496BFDB207D382D0601C8EF88FB4D8FC8CB70761E 2016-09-02 17:20:43 [22347] [6] DEBUG: AT2[zaibgsmid]: --> ^Z 2016-09-02 17:20:45 [22347] [6] DEBUG: AT2[zaibgsmid]: <-- > 0031000A8133332091900000A72364B61C442FCFE969F7196496BFDB207D382D0601C8EF88FB4D8FC8CB70761E 2016-09-02 17:20:45 [22347] [6] DEBUG: AT2[zaibgsmid]: <-- +CMGS: 219 2016-09-02 17:20:45 [22347] [6] DEBUG: AT2[zaibgsmid]: <-- OK 2016-09-02 17:20:45 [22347] [6] DEBUG: AT2[zaibgsmid]: send command status: 0 2016-09-02 17:20:45 [22347] [6] DEBUG: DLR[mysql]: Adding DLR smsc=zaibgsmid, ts=219, src=0333302100000, dst=3333021909, mask=31, boxc= 2016-09-02 17:20:45 [22347] [6] DEBUG: sql: INSERT INTO dlr (smsc, ts, source, destination, service, url, mask, boxc, status) VALUES ('zaibgsmid', '219', '0333302100000', '3333021909', 'kannel', 'http:///usr/local/bin/index.php?app=call&cat=gateway&plugin=kannel&access=dlr&type=%d&smslog_id=16&uid=1&smsc=kannel', '31', '', '0'); 2016-09-02 17:20:45 [22347] [6] DEBUG: SMSC[zaibgsmid]: creating DLR message 2016-09-02 17:20:45 [22347] [6] DEBUG: SMSC[zaibgsmid]: DLR = http:///usr/local/bin/index.php?app=call&cat=gateway&plugin=kannel&access=dlr&type=%d&smslog_id=16&uid=1&smsc=kannel 2016-09-02 17:20:45 [22347] [9] DEBUG: send_msg: sending msg to box: <127.0.0.1> 2016-09-02 17:20:45 [22347] [9] DEBUG: boxc_sender: sent message to <127.0.0.1> 2016-09-02 17:20:45 [22347] [8] DEBUG: boxc_receiver: got ack 2016-09-02 17:20:50 [22347] [6] DEBUG: AT2[zaibgsmid]: <-- +CDSI: "MT",301 2016-09-02 17:20:50 [22347] [6] DEBUG: AT2[zaibgsmid]: +CMTI incoming SMS indication: +CDSI: "MT",301 2016-09-02 17:20:51 [22347] [6] DEBUG: AT2[zaibgsmid]: --> AT+CPMS="MT"^M 2016-09-02 17:20:51 [22347] [6] DEBUG: AT2[zaibgsmid]: <-- AT+CPMS="MT" 2016-09-02 17:20:51 [22347] [6] DEBUG: AT2[zaibgsmid]: <-- +CPMS: 9,350,1,50,1,50 2016-09-02 17:20:51 [22347] [6] DEBUG: AT2[zaibgsmid]: <-- OK 2016-09-02 17:20:51 [22347] [6] DEBUG: AT2[zaibgsmid]: --> AT+CMGR=301^M 2016-09-02 17:20:51 [22347] [6] DEBUG: AT2[zaibgsmid]: <-- AT+CMGR=301 2016-09-02 17:20:51 [22347] [6] DEBUG: AT2[zaibgsmid]: <-- +CMGR: 0,,24 2016-09-02 17:20:51 [22347] [6] DEBUG: AT2[zaibgsmid]: <-- 079129330320111006DB0A813333209190619020710254026190207102740200 2016-09-02 17:20:51 [22347] [6] DEBUG: AT2[zaibgsmid]: received message from SMSC: +923330021101 2016-09-02 17:20:51 [22347] [6] DEBUG: AT2[zaibgsmid]: got STATUS-REPORT for message <219>: 2016-09-02 17:20:51 [22347] [6] DEBUG: AT2[zaibgsmid]: Numeric receiver <3333021909> 2016-09-02 17:20:51 [22347] [6] DEBUG: DLR[mysql]: Looking for DLR smsc=zaibgsmid, ts=219, dst=3333021909, type=1 2016-09-02 17:20:51 [22347] [6] DEBUG: sql: SELECT mask, service, url, source, destination, boxc FROM dlr WHERE smsc='zaibgsmid' AND ts='219'; 2016-09-02 17:20:51 [22347] [6] DEBUG: Found entry, row[0]=31, row[1]=kannel, row[2]=http:///usr/local/bin/index.php?app=call&cat=gateway&plugin=kannel&access=dlr&type=%d&smslog_id=16&uid=1&smsc=kannel, row[3]=0333302100000, row[4]=3333021909 row[5]= 2016-09-02 17:20:51 [22347] [6] DEBUG: DLR[mysql]: created DLR message for URL <http:///usr/local/bin/index.php?app=call&cat=gateway&plugin=kannel&access=dlr&type=%d&smslog_id=16&uid=1&smsc=kannel> 2016-09-02 17:20:51 [22347] [6] DEBUG: removing DLR from database 2016-09-02 17:20:51 [22347] [6] DEBUG: sql: DELETE FROM dlr WHERE smsc='zaibgsmid' AND ts='219' LIMIT 1; 2016-09-02 17:20:51 [22347] [9] DEBUG: send_msg: sending msg to box: <127.0.0.1> 2016-09-02 17:20:51 [22347] [9] DEBUG: boxc_sender: sent message to <127.0.0.1> 2016-09-02 17:20:51 [22347] [8] DEBUG: boxc_receiver: got ack

How can I correct it?

ok i managed to solve it. the issue was I left ‘playSMS web url’ in smsc blank.
after filling it with valid playsms url like “http://localhost/playsms” all worked ok. i can now see the DLR blue icon of delivered. :slight_smile:
also dont forget to set the dlr-mask, in my case i set it to 31

3 Likes

where in smsc you mean??

This is a common problem. I also had the same issues with the latest PlaySMS 1.4 and fixed it programmatically by editing the fn.php in plugins/gateways/kannel. This checks if the playsms_web URL has either http or https and when empty adds to playsms_web URL for dlr-url

Hopping it helps.

CODE SNIPPET:

   // prior to 0.9.5.1
    // $dlr_url = $plugin_config['kannel']['playsms_web'] . "/plugin/gateway/kannel/dlr.php?type=%d&smslog_id=".$smslog_id."&uid=".$uid;
    // since 0.9.5.1
    $weburl = $plugin_config['kannel']['playsms_web']; //PlaySMS_web URL

$parsed = parse_url($weburl);

if (empty($parsed[‘scheme’])) {
if (!empty($_SERVER[‘HTTPS’])) {
// https is enabled
$playsms_web = ‘https://’ . ltrim($weburl, ‘/’);
}else{
$playsms_web = ‘http://’ . ltrim($weburl, ‘/’);
}
}else{
$playsms_web = $weburl;
}

//DLR-URL Now becomes:

    $dlr_url = $playsms_web . "/index.php?app=call&cat=gateway&plugin=kannel&access=dlr&type=%d&smslog_id=" . $smslog_id . "&uid=" . $uid . "&smsc=" . $smsc;