Closed elhananjair closed 1 year ago
Hey,
Idk if i understand you well but the charge of message sent is a common flow on every SMSC provider.
Differ from email that usually are billed by delivery, the sms are billed by sent, no matter was the final status
Soon as your SMSC vendor confirm the acceptance of message, they will charge you.
The ESM_CLASS 4 will be given you for DLR (delivery reports) from messages that you had sent.
If isn't 4, then it's a message originated (MO) from a mobile to your shortcode or as reply from some message that you have sent
If you are creating an app that allows user to send SMS, the best way you can do it about the billing is charge by sent, not by delivery.
Keep in mind that lot of carriers around the globe don't send the DLR , so make your whole system dependent on DLR to charge your user it's not a good idea.
To read the final status of message, you will need read the short_message
param given in your deliver_sm
.
Netherless, any doubt about the params, status, esm_class, TLVs, given on yours deliver_sm with this SMSC provider, you'll sure find best match answers with their support :-)
@guicuton thanks for your reply.
Soon as your SMSC vendor confirms the acceptance of a message, they will charge you. My idea was opposed to this one, From my app I send a submit_sm request to SMSC and then SMSC will charge the end user for every SMS received not me.
So the whole point I was making was, that delivery_report is with esm_class=0 means the end user has received the SMS right? The SMSC won't send the text unless the end-user has a balance on the phone, so in that case, my app shouldn't receive a delivery report or pdu_command status shouldn't be = 0 right?
EDIT
To read the final status of the message, you will need to read the short_message param given in your deliver_sm.
oh God this one, I had no idea about that, I was thinking just if I get the delivery receipt it indicates successfully delivered SMS, but now I see a stat string inside the short_message param just like you said.
Thank you so much I will re-edit my code to only depend on that value.
Hello friends, I have successfully sent SMS to mobile phones through connecting with SMSC, I was expecting a delivery report as the client received the SMS. In my situation, the client (mobile user) will be charged on receiving SMS from my web app, and I can only be sure that the user has been charged when my application receives a delivery report, but in my case, I am always getting
esm_class === 4
even while the user didn't receive the SMS because of low in balance.Is there anything I am missing here?