Hello,
I sent message and it show with green squarer and I got the SMS in the mobile inbox but PlaySMS never give a delivery blue sign
I reviewed this old topic and all is fine
committed 07:36AM - 23 Dec 19 UTC
I check the message log in jasmin server and it say [dlr:SMSC_DELIVERY_RECEIPT_REQUESTED]
log of PlaySMS said :
2020-09-29 23:38:29 PID5f73c5757f72a - L2 jasmin__callback # pushed
what’s the problem
anton
September 30, 2020, 5:49am
2
Paste more playSMS logs here, make sure its on log level 3, and also redact all private information such as phone numbers, IPs, hostnames etc
Anton
Hello,
here is a full level 3 log:
x.x.x.x y.y.y.y 2020-09-30 10:04:41 PID5f745839b615b - L3 auth_validate_login # login attempt u:admin uid:1 p:814b9f782f0d227cf788cb3ea3c07576 ip:x.x.x.x
x.x.x.x y.y.y.y 2020-09-30 10:04:41 PID5f745839b615b - L2 auth_validate_login # valid login u:admin uid:1 ip:x.x.x.x
x.x.x.x y.y.y.y 2020-09-30 10:04:41 PID5f745839b615b - L2 login # u:admin uid:1 status:2 sid:e3pc6jbvsjslekojsiano7ogal ip:x.x.x.x
x.x.x.x y.y.y.y 2020-09-30 10:05:15 PID5f74585b2a146 admin L2 sendsms # start uid:1 sender_id:[My Company ] smsc:[]
x.x.x.x y.y.y.y 2020-09-30 10:05:15 PID5f74585b2a146 admin L3 sendsms # maxlen:459 footerlen:0 footer:[] msglen:15 message:[new test @ 1205]
x.x.x.x y.y.y.y 2020-09-30 10:05:15 PID5f74585b2a146 admin L2 sendsms_queue_create # saving queue_code:8076f3bc572cf7f8e5d55ba55d5f8b71 src:My Company scheduled:2020-09-30 10:05:15
x.x.x.x y.y.y.y 2020-09-30 10:05:15 PID5f74585b2a146 admin L2 sendsms_queue_create # saved queue_code:8076f3bc572cf7f8e5d55ba55d5f8b71 id:15
x.x.x.x y.y.y.y 2020-09-30 10:05:15 PID5f74585b2a146 admin L3 sendsms_manipulate_prefix # before prefix manipulation:[+222222222222]
x.x.x.x y.y.y.y 2020-09-30 10:05:15 PID5f74585b2a146 admin L3 sendsms_manipulate_prefix # after prefix manipulation:[+222222222222]
x.x.x.x y.y.y.y 2020-09-30 10:05:15 PID5f74585b2a146 admin L3 simplerate_hook_rate_getbyprefix # found rate id:1 prefix:xxxxxxx rate:0.010 description:xxxxxxx to:+222222222222
x.x.x.x y.y.y.y 2020-09-30 10:05:15 PID5f74585b2a146 admin L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:15 unicode:0 to:+222222222222 enable_credit_unicode:0 count:1 rate:0.010 charge:0.01
x.x.x.x y.y.y.y 2020-09-30 10:05:15 PID5f74585b2a146 admin L2 sendsms # dst_count:1 sms_count:1 total_charges:0.01
x.x.x.x y.y.y.y 2020-09-30 10:05:15 PID5f74585b2a146 admin L2 sendsms_queue_push # saving queue_code:8076f3bc572cf7f8e5d55ba55d5f8b71 dst:+222222222222
x.x.x.x y.y.y.y 2020-09-30 10:05:15 PID5f74585b2a146 admin L2 sendsms_queue_push # saved queue_code:8076f3bc572cf7f8e5d55ba55d5f8b71 smslog_id:17
x.x.x.x y.y.y.y 2020-09-30 10:05:15 PID5f74585b2a146 admin L2 sendsms # end queue_code:8076f3bc572cf7f8e5d55ba55d5f8b71 queue_count:1 sms_count:1 failed_queue:0 failed_sms:0
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L2 sendsmsd # start processing queue_code:8076f3bc572cf7f8e5d55ba55d5f8b71 chunk:0 queue_count:1 sms_count:1 scheduled:2020-09-30 10:05:15 uid:1 gpid:0 sender_id:My Company
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L2 sendsmsd # sending queue_code:8076f3bc572cf7f8e5d55ba55d5f8b71 smslog_id:17 to:+222222222222 sms_count:1 counter:1
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L3 sendsms_intercept # msgtemplate modified sms_sender:[My Company ] sms_footer:[] sms_to:[+222222222222] sms_msg:[new test @ 1205] uid:[1] gpid:[0] sms_type:[text] unicode:[0] queue_code:[8076f3bc572cf7f8e5d55ba55d5f8b71] smsc:[]
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L3 outgoing_hook_sendsms_intercept # found SMSCs:[jasmin]
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L3 outgoing_hook_sendsms_intercept # using prefix based smsc smsc:[jasmin] uid:1 parent_uid:0 from:My Company to:+222222222222
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L3 sendsms_intercept # outgoing modified sms_sender:[My Company ] sms_footer:[] sms_to:[+222222222222] sms_msg:[new test @ 1205] uid:[1] gpid:[0] sms_type:[text] unicode:[0] queue_code:[8076f3bc572cf7f8e5d55ba55d5f8b71] smsc:[jasmin]
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L2 sendsms_process # start
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L3 simplerate_hook_rate_getbyprefix # found rate id:1 prefix:xxxxxx rate:0.010 description:xxxxxx to:+222222222222
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:15 unicode:0 to:+222222222222 enable_credit_unicode:0 count:1 rate:0.010 charge:0.01
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L2 simplerate_hook_rate_cansend # allowed user uid:1 sms_to:+222222222222 adhoc_credit:99.96 count:1 rate:0.010 charge:0.01 adhoc_balance:99.95
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L2 sendsms # saving smslog_id:17 u:1 parent_uid:0 g:0 gw:jasmin smsc:jasmin s:My Company d:+222222222222 type:text unicode:0 status:0
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L2 sendsms_process # saved smslog_id:17 id:17
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L3 sendsms # final smslog_id:17 gw:jasmin smsc:jasmin message:new test @ 1205 len:15
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L3 jasmin_hook_sendsms # enter smsc:jasmin smslog_id:17 uid:1 to:+222222222222
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L3 jasmin_hook_sendsms # send url:[http://y.y.y.y:1401/send?username=username&password=password&to=%2B222222222222&from=My-Co&content=new+test+%40+1205&dlr=yes&dlr-level=2&dlr-url=http%3A%2F%2F1.1.1.1%3A1080%2Fplugin%2Fgateway%2Fjasmin%2Fcallback.php]
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L2 jasmin_hook_sendsms # sent smslog_id:17 message_id:80bf9ecc-0864-45a4-ae9e-89cd47f9f7c2 smsc:jasmin
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L3 dlr # isdlrd:1 smslog_id:17 p_status:1 uid:1
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L2 simplerate_hook_rate_deduct # enter smslog_id:17
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L3 simplerate_hook_rate_getbyprefix # found rate id:1 prefix:24991 rate:0.010 description:SudanZain to:+222222222222
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L3 simplerate_hook_rate_getcharges # uid:1 u:admin len:15 unicode:0 to:+222222222222 enable_credit_unicode:0 count:1 rate:0.010 charge:0.01
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L2 simplebilling_hook_billing_post # saving smslog_id:17 rate:0.010 count:1 charge:0.01
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L2 simplebilling_hook_billing_post # saved smslog_id:17 id:12
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L3 simplerate_hook_rate_deduct # deduct successful uid:1 parent_uid:0 smslog_id:17
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L2 sendsms_process # end
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L2 sendsmsd # result queue_code:8076f3bc572cf7f8e5d55ba55d5f8b71 to:+222222222222 flag:1 smslog_id:17
- - 2020-09-30 10:05:15 PID5f74585b71c77 - L2 sendsmsd # finish processing queue_code:8076f3bc572cf7f8e5d55ba55d5f8b71 uid:1 sender_id:My Company queue_count:1 sms_count:1
- - 2020-09-30 10:05:16 PID5f74582a35688 - L3 dlrd # id:17 smslog_id:17 p_status:1 uid:1
- - 2020-09-30 10:05:16 PID5f74582a35688 - L2 simplebilling__finalize # saving smslog_id:17
- - 2020-09-30 10:05:16 PID5f74582a35688 - L2 simplebilling__finalize # saved smslog_id:17
anton
September 30, 2020, 10:43am
4
Search log for jasmin__callback
, those are what being pushed by Jasmin to playSMS
Anton
Thanks for quick response and thanks for Supporting us,
As I said in 1st post I saw :
jasmin__callback # pushed
Only in last level 3 log didn’t see jasmin__callback
Regards
anton
September 30, 2020, 12:35pm
6
Thats it? Just a word pushed and nothing more? And you got only 1 line? Even after testing more sms?
cat playsms.log| grep "jasmin__callback"
I tried to send many SMS and never show jasmin__callback, last seen yesterday
this is result of grep
2020-09-29 23:38:29 PID5f73c5757f72a - L2 jasmin__callback # pushed
this is last SMS log :
- - 2020-09-30 13:07:38 PID5f74831a17bd1 - L2 sendsmsd # finish processing queue_code:c4811ba006afb525b742ee45cf2cbf12 uid:1 sender_id:Best I.T queue_count:1 sms_count:1
- - 2020-09-30 13:07:39 PID5f74582a35688 - L3 dlrd # id:20 smslog_id:20 p_status:1 uid:1
- - 2020-09-30 13:07:39 PID5f74582a35688 - L2 simplebilling__finalize # saving smslog_id:20
- - 2020-09-30 13:07:39 PID5f74582a35688 - L2 simplebilling__finalize # saved smslog_id:20
anton
September 30, 2020, 5:24pm
8
the log jasmin__callback is an indicator of Jasmin push incoming SMS or delivery report to playSMS, if theres no log then most likely nothing is pushed by Jasmin, or at least not hitting playSMS correctly
Here is relevant code handling incoming push from Jasmin:
include $core_config['apps_path']['libs'] . "/function.php";
chdir("plugin/gateway/jasmin/");
$requests = $_REQUEST;
}
$log = '';
if (is_array($requests)) {
foreach ($requests as $key => $val) {
$log .= $key . ':' . $val . ' ';
}
_log("pushed " . $log, 2, "jasmin callback");
}
$remote_smslog_id = $requests['id'];
$message_status = $requests['message_status'];
// delivery receipt
if ($remote_smslog_id && $message_status) {
$db_query = "SELECT local_smslog_id FROM " . _DB_PREF_ . "_gatewayJasmin_log WHERE remote_smslog_id='$remote_smslog_id'";
$db_result = dba_query($db_query);
$db_row = dba_fetch_array($db_result);
Empty data after “pushed” in your recorded jasmin__callback log means that Jasmin was not pushing anything or using different method
Or, maybe playSMS codes handling this are obsolete
Check your Jasmin logs again, especially part where it needs to access playSMS callback.php
Anton
Here is a new log from jasmin message :
020-09-30 21:52:52 DEBUG 1 ACKing amqpMessage [690994b7-c939-4537-bf43-c5622554dc51] having routing_key [submit.sm.MTN]
2020-09-30 21:52:52 DEBUG 1 There is a HTTP DLR request for msgid[690994b7-c939-4537-bf43-c5622554dc51] ...
2020-09-30 21:52:52 DEBUG 1 Terminal level receipt is requested, will not send any DLR receipt at this level.
2020-09-30 21:52:52 DEBUG 1 Mapping smpp msgid: 1C986BC to queue msgid: 690994b7-c939-4537-bf43-c5622554dc51, expiring in 86400
I check user setting in jasmin mt_messaging_cred authorization dlr_level True
the dlr_level can’t set 2 or 3 > mt_messaging_cred authorization dlr_level 2
anton
October 1, 2020, 3:11am
10
Not sure what to do, try changing it to dlr-level=1 ?
Here:
if ($unicode) {
if (function_exists('mb_convert_encoding')) {
// $sms_msg = mb_convert_encoding($sms_msg, "UCS-2BE", "auto");
$sms_msg = mb_convert_encoding($sms_msg, "UCS-2", "auto");
// $sms_msg = mb_convert_encoding($sms_msg, "UTF-8", "auto");
$unicode_query_string = "&coding=8"; // added at the of query string if unicode
}
}
$query_string = "username=" . urlencode($plugin_config['jasmin']['api_username']) . "&password=" . urlencode($plugin_config['jasmin']['api_password']) . "&to=" . urlencode($sms_to) . "&from=" . urlencode($sms_sender) . "&content=" . urlencode($sms_msg) . $unicode_query_string;
$query_string .= "&dlr=yes&dlr-level=2&dlr-url=" . urlencode($plugin_config['jasmin']['callback_url']);
$url = $plugin_config['jasmin']['url'] . "?" . $query_string;
_log("send url:[" . $url . "]", 3, "jasmin_hook_sendsms");
// new way
$opts = array(
'http' => array(
'method' => 'POST',
'header' => "Content-type: application/x-www-form-urlencoded\r\nContent-Length: " . strlen($query_string) . "\r\nConnection: close\r\n",
'content' => $query_string
Dont forget to restart playSMS daemon after changing fn.php
Anton
I tried your last advice and change dlr-level=1 and I got something new :-
sm_default_msg_id: 1
short_message: "\x06(\x063\x06E\x00 \x06'\x06D\x06D\x06G\x00 \x06'\x06D\x061\x06-\x06E\x06F\x00 \x06'\x06D\x061\x06-\x06J\x06E"
]
2020-10-01 23:02:41 DEBUG 1 Sending SubmitSmPDU[0e9afbfc-8f1b-458b-9e40-6fcf68e6d901] through SMPPClientFactory [cid:MTN]
2020-10-01 23:02:41 INFO 1 SMS-MT [cid:AirTel] [queue-msgid:0e9afbfc-8f1b-458b-9e40-6fcf68e6d901] [smpp-msgid:01CA70B1] [status:ESME_ROK] [prio:0] [dlr:SMSC_DELIVERY_RECEIPT_REQUESTED] [validity:none] [from:Best I.T] [to:+22222222222] [content:"\x06(\x063\x06E\x00 \x06'\x06D\x06D\x06G\x00 \x06'\x06D\x061\x06-\x06E\x06F\x00 \x06'\x06D\x061\x06-\x06J\x06E"]
2020-10-01 23:02:41 DEBUG 1 ACKing amqpMessage [0e9afbfc-8f1b-458b-9e40-6fcf68e6d901] having routing_key [submit.sm.AirTel]
2020-10-01 23:02:41 DEBUG 1 Sending back SubmitSmRespContent[0e9afbfc-8f1b-458b-9e40-6fcf68e6d901] with routing_key[submit.sm.resp.AirTel]
2020-10-01 23:02:41 DEBUG 1 There is a HTTP DLR request for msgid[0e9afbfc-8f1b-458b-9e40-6fcf68e6d901] ...
2020-10-01 23:02:41 DEBUG 1 Got DLR information for msgid[0e9afbfc-8f1b-458b-9e40-6fcf68e6d901], url:http://172.17.0.3:1080/plugin/gateway/jasmin/callback.php, level:1, connector:MTN
2020-10-01 23:02:41 DEBUG 1 Publishing DLRContentForHttpapi[0e9afbfc-8f1b-458b-9e40-6fcf68e6d901] with routing_key[dlr_thrower.http]
2020-10-01 23:02:41 DEBUG 1 Removing DLR request for msgid[0e9afbfc-8f1b-458b-9e40-6fcf68e6d901]
in /dlr-thrower.log we got :-
2020-10-01 23:18:33 ERROR 1 Throwing HTTP/DLR [msgid:58b40c3e-d970-4238-af51-2516530efb21] to (http://172.17.0.2:1080/plugin/gateway/jasmin/callback.php): ConnectionRefusedError('Connection refused',).
I fix this error, Jasmin was not able to read the localhost ip 172.17.0.2 I dont know why?? I put the remote IP and it work like a worm
Now All is fine
Worm Regards,
1 Like
anton
October 2, 2020, 6:08am
13
changes commited for next releases:
committed 06:05AM - 02 Oct 20 UTC
anton
system
Closed
December 1, 2020, 6:08am
14
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.