[solved] Change the status sms

hello
I created a new generic gateway that is working properly when there is no error in sending the sms.
but let’s say the phone number is invalid, I have a return on json, and within it something like “errors”: [“Not a valid phone number”].
currently the playsms says the status that this message has been sent correctly, of course he does not know of this message.
In this case as I do for him to understand that to find “errors”: [“Not a valid phone number”] should not count as a message sent correctly?

hav you tried gateway Generic (from recent release 1.3.1) ?

with gateway generic your gateway need to return plain text: [message id] [error message]

for example:

181 OK
7182693193 Message sent

and example for failed sent message:

0 Fail
0 User not found
0 Invalid number

anton

Thank you for your answer.
this gateway returns a json and I can not change the return.
I have to see another way to control it.
which the table and field that is recorded what went right or wrong status?

its in the file, the gateway plugin you use
you set the status using dlr()

anton

sorry but dlr() is a file where I change the status?
I am new to playsms, so sorry again the question

no, dlr() is a function that is used to set the status

visit here:

see how I examine the returns and decide the status using dlr()

hint: line 83 to 113

anton

thanks again Anton,
I changed the line
of $ resp = explode (’ ', $response, 2);
for $ resp = explode (‘success’, $response, 2);
and managed to control.

Thank you very much.

anton, how can I send the message id in the URL?

This is for me to respond with
Message_ID OK