playSMS Forum

Send sms with senderid

Hello,

It’s necessary to able send sms with playsms http request with alphanumeric senderid (from or source number).
Now we use link like
http://myplaysmsserver/index.php?app=ws&u=user&p=password&h=e2bfg2f393gf47dc34f160324975b99a&op=pv&to=349876756778&from=123456789&msg=HELLO

Playsms received sms ok,
after that send sms with default senderid from Main Configuration section, not as provided with link &from=123456789

So how it’s correct to provide with https link ‘from’ number ?

Thanks you.

just to be sure, is your sms gateway can set sender ID ? (for example Kannel using GSM modems cannot set sender ID)

to set sender ID form ws you use from. make sure you have logstate set to 3 and check log while testing

anton

request this http link I get playsms log

xx.xx.xx.xx yy.yy.yy.yy 2020-03-23 16:49:53 PID5e78cc9119b75 user L2 sendsms # start uid:7 sender_id:[22343456723] smsc:[]
xx.xx.xx.xx yy.yy.yy.yy 2020-03-23 16:49:53 PID5e78cc9119b75 user L3 sendsms # maxlen:1530 footerlen:0 footer:[] msglen:5 message:[HELLO]
xx.xx.xx.xx yy.yy.yy.yy 2020-03-23 16:49:53 PID5e78cc9119b75 user L2 sendsms_queue_create # saving queue_code:896a3b2ebdb0d86e3fc2292590b29b3c src:22343456723 scheduled:2020-03-23 16:49:53
xx.xx.xx.xx yy.yy.yy.yy 2020-03-23 16:49:53 PID5e78cc9119b75 user L2 sendsms_queue_create # saved queue_code:896a3b2ebdb0d86e3fc2292590b29b3c id:725574
xx.xx.xx.xx yy.yy.yy.yy 2020-03-23 16:49:53 PID5e78cc9119b75 user L3 sendsms_manipulate_prefix # before prefix manipulation:[349876756778]
xx.xx.xx.xx yy.yy.yy.yy 2020-03-23 16:49:53 PID5e78cc9119b75 user L3 sendsms_manipulate_prefix # after prefix manipulation:[349876756778]
xx.xx.xx.xx yy.yy.yy.yy 2020-03-23 16:49:53 PID5e78cc9119b75 user L3 simplerate_hook_rate_getbyprefix # rate not found to:349876756778 default_rate:0
xx.xx.xx.xx yy.yy.yy.yy 2020-03-23 16:49:53 PID5e78cc9119b75 user L3 simplerate_hook_rate_getcharges # uid:7 u:user len:5 unicode:0 to:349876756778 enable_credit_unicode:0 count:1 rate: charge:0
xx.xx.xx.xx yy.yy.yy.yy 2020-03-23 16:49:53 PID5e78cc9119b75 user L2 sendsms # dst_count:1 sms_count:1 total_charges:0
xx.xx.xx.xx yy.yy.yy.yy 2020-03-23 16:49:53 PID5e78cc9119b75 user L2 sendsms_queue_push # saving queue_code:896a3b2ebdb0d86e3fc2292590b29b3c dst:349876756778
xx.xx.xx.xx yy.yy.yy.yy 2020-03-23 16:49:53 PID5e78cc9119b75 user L2 sendsms_queue_push # saved queue_code:896a3b2ebdb0d86e3fc2292590b29b3c smslog_id:724826
xx.xx.xx.xx yy.yy.yy.yy 2020-03-23 16:49:53 PID5e78cc9119b75 user L2 sendsms # end queue_code:896a3b2ebdb0d86e3fc2292590b29b3c queue_count:1 sms_count:1 failed_queue:0 failed_sms:0
xx.xx.xx.xx yy.yy.yy.yy 2020-03-23 16:49:53 PID5e78cc9119b75 user L3 webservices # u:user ip:xx.xx.xx.xx op:pv timestamp:1584974993 status: error: error_string:
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L2 sendsmsd # start processing queue_code:896a3b2ebdb0d86e3fc2292590b29b3c chunk:0 queue_count:1 sms_count:1 scheduled:2020-03-23 16:49:53 uid:7 gpid:0 sender_id:22343456723
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L2 sendsmsd # sending queue_code:896a3b2ebdb0d86e3fc2292590b29b3c smslog_id:724826 to:349876756778 sms_count:1 counter:1
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L3 sendsms_intercept # msgtemplate modified sms_sender:[22343456723] sms_footer:[] sms_to:[349876756778] sms_msg:[HELLO] uid:[7] gpid:[0] sms_type:[text] unicode:[0] queue_code:[896a3b2ebdb0d86e3fc2292590b29b3c] smsc:[]
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L3 outgoing_hook_sendsms_intercept # found SMSCs:[dev]
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L3 outgoing_hook_sendsms_intercept # using prefix based smsc smsc:[dev] uid:7 parent_uid:0 from:22343456723 to:349876756778
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L3 sendsms_intercept # outgoing modified sms_sender:[22343456723] sms_footer:[] sms_to:[349876756778] sms_msg:[HELLO] uid:[7] gpid:[0] sms_type:[text] unicode:[0] queue_code:[896a3b2ebdb0d86e3fc2292590b29b3c] smsc:[dev]
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L2 sendsms_process # start
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L3 simplerate_hook_rate_getbyprefix # rate not found to:349876756778 default_rate:0
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L3 simplerate_hook_rate_getcharges # uid:7 u:user len:5 unicode:0 to:349876756778 enable_credit_unicode:0 count:1 rate: charge:0
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L2 simplerate_hook_rate_cansend # allowed user uid:7 sms_to:349876756778 adhoc_credit:9.81 count:1 rate: charge:0 adhoc_balance:9.81
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L2 sendsms # saving smslog_id:724826 u:7 parent_uid:0 g:0 gw:dev smsc:dev s:22343456723 d:349876756778 type:text unicode:0 status:0
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L2 sendsms_process # saved smslog_id:724826 id:724826
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L3 sendsms # final smslog_id:724826 gw:dev smsc:dev message:HELLO len:5
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L3 dev_hook_sendsms # enter smsc:dev smslog_id:724826 uid:7 to:349876756778
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L3 dlr # isdlrd:1 smslog_id:724826 p_status:3 uid:7
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L2 simplerate_hook_rate_deduct # enter smslog_id:724826
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L3 simplerate_hook_rate_getbyprefix # rate not found to:349876756778 default_rate:0
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L3 simplerate_hook_rate_getcharges # uid:7 u:user len:5 unicode:0 to:349876756778 enable_credit_unicode:0 count:1 rate: charge:0
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L2 simplebilling_hook_billing_post # saving smslog_id:724826 rate: count:1 charge:0
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L2 simplebilling_hook_billing_post # saved smslog_id:724826 id:1805103
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L3 simplerate_hook_rate_deduct # deduct successful uid:7 parent_uid:0 smslog_id:724826
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L2 sendsms_process # end
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L2 sendsmsd # result queue_code:896a3b2ebdb0d86e3fc2292590b29b3c to:349876756778 flag:1 smslog_id:724826
- - 2020-03-23 16:49:55 PID5e78cc93564a7 - L2 sendsmsd # finish processing queue_code:896a3b2ebdb0d86e3fc2292590b29b3c uid:7 sender_id:22343456723 queue_count:1 sms_count:1
- - 2020-03-23 16:49:56 PID5e78cb730e95a - L3 dlrd # id:1805103 smslog_id:724826 p_status:3 uid:7

Where sender_id:[22343456723] - this is default SenderId for this user.
But I need to send to kannel sender_id weach I got with link ’ &from=123456789’

Here playSMS check for sender ID:

And here how playSMS decide which sender ID will be used:

So, the gateway number settings in main configuration takes precedence, followed by setting in user preferences, last is supplied from others such as webservices

anton

Thanks ! It’s seems need to hardcore for this scenario.

One more question regarding relivery report url.
Is it possible to put delivery report url to http request ? What is format ?
http://myplaysmsserver/index.php?app=ws&u=user&p=password&h=e2bfg2f393gf47dc34f160324975b99a&op=pv&to=349876756778&from=123456789&msg=HELLO

So user send sms with http reguest and put also dlr-url, plasms receive sms and send to kannel, kannel send sms to SMSC.
Kannel receive delivery report ans send to playsms, playsms send delivery report to user dlr-url.
Is it possible ?

Regarding the sender ID, you can try to remove the main configuration settings and user preferences, or if you still need tham but you want to make the ws 1st priority that will need customization in sendsms_get_sender()

To my knowledge dlr cannot be set/sent via ws

anton

Any other options how to set/send dlr ?