SMPP > NowSMS / HTTP (Kannel) DLRs | Search |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ Archive through April 13, 2018 ⬆ |
◄ ► |
Author | Message | |||
Colin New member Username: Colinis Post Number: 9 Registered: 09-2014 |
Version: Latest - Now SMS/MMS Gateway & MMSC Version 2017.04.07 Method Customers SMPP Connection > NowSMS > HTTP to Kannel I would like a customer to be able to submit messages via SMPP and get Delivery Reports back to their SMPP connection Changes [HTTP - IP:PORT] TrackHTTPReceipts=Yes [SMSGW] ReceiptRequested=Yes Processed received SMS Messages is ticked SMPP Server Enabled Ticked Accepted Received message for this user under the SMPP user Looking at https://support.nowsms.com/discus/messages/1/15186.html I should be able to tell NowSMS to send the ReceiptMessageID (using @@MessageID@@) to Kannel in the API call – something like “&dlr-url=http://example.com/DLR.php?myid==@@MessageID@@&DLR=$dlr&to=$to&from=$from (link needs to be URLEncoded on API Call) The DLR.php script will then process the DLR and call NowSMS in the following format Delivered: http://IP:8800/?user=username&password=password&ReceiptMessageID=@@MessageID@@&R eceiptDelivered=Yes&ReceiptDoneDate=yymmddhhmm Failed: http://IP:8800/?user=username&password=password&ReceiptMessageID=@@MessageID@@&R eceiptFailed=Yes&ReceiptDoneDate=yymmddhhmm Transit: http://IP:8800/?user=username&password=password&ReceiptMessageID=@@MessageID@@&R eceiptIntransit=Yes&ReceiptDoneDate=yymmddhhmm I have tried to set this up manually however when calling http://IP:8800/?user=username&password=password&ReceiptMessageID=@@MessageID@@&R eceiptDelivered=Yes&ReceiptDoneDate=yymmddhhmm I get an error: Error: Invalid Parameter (Invalid format for telephone number.) if I add &phone= to the API call it submits however the Delivery Report never gets submitted to the API. If I add a “*” under the Accepted Received message on the SMPP user I do get a copy of the DLRs however the next outgoing message appear as an incoming message and doesn’t get routed to Kannel, I then tried with id:* however still doesn’t push DLRs back to the SMPP connection I am guessing that its something to do with the $phone parameter I need to change the $phone field to something else or i have missed something :) If not does anyone have a simple php script that forwards the API call to Kannel and replies back to NowSMS with a uniquie ID that way i could use the MessageIDResponsePrefix= under [HTTP - IP:PORT] - and a DLR script if you have it to change the $dlr to the following; 16 =ReceiptFailed=Yes 8 = ReceiptIntransit=Yes 4 = ReceiptIntransit=Yes 2 = ReceiptFailed=Yes 1 = ReceiptDelivered=Yes | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 8254 Registered: 10-2002 |
Hi, Enable the SMSDEBUG.LOG, so that we can see what it reports.
You will get this error if the ReceiptMessageID is an ID that is not known. If you add a phone number, it will get accepted, but since the message id is not recognized, the system doesn't know what account to route it to...and it will end up in the 2-way SMS queue. Do you have TrackHTTPReceipts=Yes set in the [HTTP - server:port] section of SMSGW.INI? -bn Bryce Norwood Now SMS/MMS Support | |||
Colin New member Username: Colinis Post Number: 10 Registered: 09-2014 |
Thanks Bryce - I got the solution working, I think the error was down to me URLEncoding Kannel DLR-URL @@MessageID@@ was %40%40MessageID%40%40. Noticed that if you don't include @@MessageID@@ on the outgoing call it will not accept the DLR as its not recognised :) | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 8256 Registered: 10-2002 |
That is a good point, Colin. The logic for this is that if the message ID is not passed in the URL, there is no way that the other service could know this value. However, this can cause confusion during development and testing. |