Support forum
3:27 pm
Thank you Henk, yes indeed it solved the problem (my type should be numeric, it was hex before).
However we faced another issue. I will open another ticket.
Best regards
Hello Dovob,
The difference in the message ID in the 'message_log' and 'message_log_update' HTTP callback is caused by an idiosyncrasy in the specification of the SMPP protocol. SMPP 3.4 specifies that the message id in the submit_sm response is returned as a hexadecimal value and the message id in the receipt is returned in the corresponding decimal value. However some SMPP servers use decimal values for both message id's and later versions of SMPP recommend using an alphanumeric message id.
To fix this problem you can set the 'MessageIdFormat' property in the advanced settings of the SMPP Gateway to 'Hexadecimal'.
Regards, Henk
6:09 pm
Hi Henk, I tried your way, here is what I got down below (sorry for details); bottom line is, there may be a mismatch of message_id assignement from the SMPP intercommunication:
Quick scenario; we enabled the message_out and message_logs. We first send a custom message, which arrives with message_out, we do post process and response the correct parameters. Then we track the delivery and we perform activities on the event details. As you may see below; once we set the parameters in message_out response, message_log arrives normally with our set values but message_log_update comes with a different guid and message_id, hence we can't relate to them. We use SMPPSim as emulator. Below are the protocol details that may help you.
1- What we submit to send sms
{"source":"Web Connector","action":"message_out","user_id":"2","ip_number":"192.168.4.111","from":"0","to":"0","message":"{\"from\":\"8080\",\"to\":\"10\",\"service\":\"8080\",\"message\":\"Testing123\",\"outMessageRid\":\"#126:46\"}","message_guid":"080f5000-461f-4d2b-beae-3616388f7ab7","message_type":"outMessage","user_info":"080f5000-461f-4d2b-beae-3616388f7ab7"}
----> What we modify and respond to message_out
result=1&message_type=smpp.automatic&message_info=%23126%3A46&from=8080&to=10&message=Testing123&user_id=10&user_info=Testing123
---> What we receive to our initial request.
OK: 080f5000-461f-4d2b-beae-3616388f7ab7
2- This is diafaan sends to SMPPsim and its reply
============================================================================
2019.10.12 18:55:05 324 INFO 16 : Standard SUBMIT_SM:
2019.10.12 18:55:05 324 INFO 16 Hex dump (49) bytes:
2019.10.12 18:55:05 327 INFO 16 00000031:00000004:00000000:0000006B:
2019.10.12 18:55:05 330 INFO 16 00030038:30383000:00013130:00000000:
2019.10.12 18:55:05 334 INFO 16 00000100:00000A54:65737469:6E673132:
2019.10.12 18:55:05 338 INFO 16 33
2019.10.12 18:55:05 340 INFO 16 cmd_len=49,cmd_id=4,cmd_status=0,seq_no=107,service_type=,source_addr_ton=3
2019.10.12 18:55:05 344 INFO 16 source_addr_npi=0,source_addr=8080,dest_addr_ton=0,dest_addr_npi=1,dest_addr=10
2019.10.12 18:55:05 350 INFO 16 esm_class=0,protocol_ID=0,priority_flag=0,schedule_delivery_time=
2019.10.12 18:55:05 350 INFO 16 validity_period=,registered_delivery_flag=1,replace_if_present_flag=0
2019.10.12 18:55:05 350 INFO 16 data_coding=0,sm_default_msg_id=0,sm_length=10,short_message=Testing123
2019.10.12 18:55:05 354 INFO 16
2019.10.12 18:55:05 357 INFO 16 Validity period is not set: defaulting to 5 minutes from now
2019.10.12 18:55:05 359 INFO 16 Generated default validity period=191012190005000+
2019.10.12 18:55:05 363 INFO 16 :SUBMIT_SM_RESP:
2019.10.12 18:55:05 363 INFO 24 Assessing state of 1 messages in the OutboundQueue
2019.10.12 18:55:05 367 INFO 16 Hex dump (19) bytes:
2019.10.12 18:55:05 368 INFO 16 00000013:80000004:00000000:0000006B:
2019.10.12 18:55:05 371 INFO 16 343400
2019.10.12 18:55:05 373 INFO 16 cmd_len=0,cmd_id=-2147483644,cmd_status=0,seq_no=107,message_id=44
2019.10.12 18:55:05 377 INFO 16
2019.10.12 18:55:05 380 INFO 16 SubmitSM processing - response written to connection
3- Diafaan reports it. Note the "message_id", it is different then SMPPSim's message id (??)
{"source":"Web Connector","action":"message_log","user_id":"2","from":"8080","to":"10","message":"Testing123","message_type":"smpp.automatic","message_id":"68","message_guid":"080f5000-461f-4d2b-beae-3616388f7ab7","message_info":"#126:46","message_parts":"1","user_info":"080f5000-461f-4d2b-beae-3616388f7ab7","gateway":"SMPPSim","connector":"Web Connector","status_code":"200","status_text":"Success: Message accepted by the SMPP gateway.","error_code":"","error_text":"","send_time":"2019-10-12T18:55:05.4684310","pdu":"0000003100000004000000000000006B000300383038300000013130000000000000010000000A54657374696E67313233","result_trace":"*13*:200"}
=======================================================
4- Smpp sim sends delivery receipt.
2019.10.12 18:55:10 364 INFO 24 Assessing state of 1 messages in the OutboundQueue
2019.10.12 18:55:10 364 INFO 24 Message:107 state=DELIVERED
2019.10.12 18:55:10 365 INFO 24 Delivery Receipt requested
2019.10.12 18:55:15 364 INFO 24 Assessing state of 1 messages in the OutboundQueue
2019.10.12 18:55:19 469 INFO 23 addressIsServicedByReceiver(8080)
2019.10.12 18:55:19 469 INFO 23 DELIVER_SM (receipt):
2019.10.12 18:55:19 470 INFO 23 Hex dump (169) bytes:
2019.10.12 18:55:19 470 INFO 23 000000A9:00000005:00000000:0000002D:
2019.10.12 18:55:19 471 INFO 23 00000131:30000300:38303830:00040000:
2019.10.12 18:55:19 471 INFO 23 00000000:00006869:643A3434:20737562:
2019.10.12 18:55:19 471 INFO 23 3A303031:20646C76:72643A30:30312073:
2019.10.12 18:55:19 472 INFO 23 75626D69:74206461:74653A31:39313031:
2019.10.12 18:55:19 472 INFO 23 32313835:3520646F:6E652064:6174653A:
2019.10.12 18:55:19 473 INFO 23 31393130:31323138:35352073:7461743A:
2019.10.12 18:55:19 473 INFO 23 44454C49:56524420:6572723A:30303020:
2019.10.12 18:55:19 474 INFO 23 54657874:3A546573:74696E67:31323300:
2019.10.12 18:55:19 474 INFO 23 1E000334:34000427:00010214:03000A34:
2019.10.12 18:55:19 474 INFO 23 34313233:34353637:38
2019.10.12 18:55:19 475 INFO 23 cmd_len=0,cmd_id=5,cmd_status=0,seq_no=45,service_type=,source_addr_ton=0
2019.10.12 18:55:19 475 INFO 23 source_addr_npi=1,source_addr=10,dest_addr_ton=3,dest_addr_npi=0
2019.10.12 18:55:19 476 INFO 23 destination_addr=8080,esm_class=4,protocol_ID=0,priority_flag=0
2019.10.12 18:55:19 476 INFO 23 schedule_delivery_time=,validity_period=,registered_delivery_flag=0
2019.10.12 18:55:19 477 INFO 23 replace_if_present_flag=0,data_coding=0,sm_default_msg_id=0,sm_length=104
2019.10.12 18:55:19 477 INFO 23 short_message=id:44 sub:001 dlvrd:001 submit date:1910121855 done date:1910121855 stat:DELIVRD err:000 Text:Testing123
2019.10.12 18:55:19 477 INFO 23 TLV=30/3/343400,TLV=1063/1/02,TLV=5123/10/34343132333435363738
2019.10.12 18:55:19 478 INFO 23
2019.10.12 18:55:19 480 INFO 23 InboundQueue: empty - waiting
2019.10.12 18:55:19 636 INFO 16 : DELIVER_SM_RESP:
2019.10.12 18:55:19 636 INFO 16 Hex dump (17) bytes:
2019.10.12 18:55:19 637 INFO 16 00000011:80000005:00000000:0000002D:
2019.10.12 18:55:19 638 INFO 16 00
2019.10.12 18:55:19 639 INFO 16 cmd_len=17,cmd_id=-2147483643,cmd_status=0,seq_no=45,system_id=
5- This is what diafaan reports with message_log_update, guid is different, message id is now correct
{"source":"Web Connector","action":"message_log_update","message_id":"44","message_guid":"bc8a8615-3055-43f3-95f8-ed96dc1ba7f2","message_info":"","status_code":"201","status_text":"Success: Message received on handset.","error_code":"","error_text":"","receive_time":"2019-10-12T18:55:00.0000000","user_id":"1","user_info":"","receipt":"id:44 sub:001 dlvrd:001 submit date:1910121855 done date:1910121855 stat:DELIVRD err:000 Text:Testing123","tlv_list":"0x1E:343400;0x427:02;0x1403:34343132333435363738"}
================
Hello Dovob,
Unfortunately, the handling of message ID fields is implemented differently in different connectors and gateways of Diafaan SMS Server. Changing this could break existing configurations after an update so we decided to leave the original message ID handling intact.
In Diafaan SMS Server 4.1.0.0 and higher there are two new fields that can be used to identify a message or specify additional message information: message_guid and message_info. These fields can be set when the call is made or with a 'message_out' HTTP callback and are added to the 'message_log' and 'message_log_update' HTTP callbacks.
Regards, Henk
6:08 pm
Hi Henk, I am puzzled with GUID and IDs. I am trying to set the guid with HTTP-API (emulator gateway), yet the response to http api is a different GUID. And yet the http callbacks does not mention this guid of mine in anywhere in message-log-udpate messages. Can you please explain the chain of events a little bit more then the below (which puzzled me even more)
Henk Helmantel said
The GUID in the HTTP API response is used to add the message_id to the message as soon as the message is sent by the gateway. Changing this value would not solve the real issue, that the mobile network does not return the same number in the delivery report than in the original message.Regards, Henk
Many thanks.
The GUID of the HTTP API response can be changed with the 'message_out' HTTP callback, but that will not solve this issue. The last part of the message ID (the 'B' in 'A:+xxxxxxx:B') is the message reference number that is returned by the GSM modem when the message is sent. This reference number is not yet available when the HTTP API call is made, it may take seconds, minutes, or even hours before the reference number is generated.
The GUID in the HTTP API response is used to add the message_id to the message as soon as the message is sent by the gateway. Changing this value would not solve the real issue, that the mobile network does not return the same number in the delivery report than in the original message.
Regards, Henk
12:03 pm
is it possible to modify the output text of http api?
i want to echo the message_id instead of message-guid like this
ok: A+xxxxxxx:B
Regards
Thank you for the log. Unfortunately there is no solution for this issue. Your mobile network returns a modified phone number in the delivery report that is different from the destination number in the message. If the phone number in the outgoing message and the delivery report are not exactly the same, Diafaan SMS Server cannot match the message with the delivery report and the status of the message will not be updated.
Regards, Henk
4:39 am
i have sent an email including the log. is there any way to get message_id as http api send output reply. currently http api output something like this
ok: messageguid/userinfo
but if there is anyway that it can give something like this
ok: message_id (X:+xxxxxxx:X)
then we will be able to use this application. i know i can use custom message-guid but unfortunately it's not same as the message_id is different for send and delivered output.
Regards
Can you send me the communication log of the GSM Modem Gateway that includes at least one mismatch between the message and the delivery report? I would also like to see the configurations file (menu options 'File-Export-Configuration).
You can send the two files to email address 'dms@diafaan.com'.
Regards, Henk
2:31 am
Dear concern,
I have checked your demo software. it can send SMS properly using gsm modem but can't provide accurate delivery report. i have sent three sms and got only one delivered status when all the sms delivered successfully. After checking the log i found that the message id is not returning accurately. if i send sms to +xxyyzzzzzzzzz number the message id should be something like a:+xxyyzzzzzzzzz:b but it return a:+xxzxyzyyzzzzzzzzz:b like this. sometime it can return accurate message_id though ! but not everytime. that's why the delivery report can't update properly. so what should i do now?
i'm using http api to send sms.
so is there any way to set message_id while sending sms through http api just like message-guid?
i want to purchase the application but this is the problem that is preventing me as it is important to get accurate delivery status. can you please give me any plugin or way to change message_id with gsm modem via http api.
Regards
Most Users Ever Online: 529
Currently Online:
3 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Member Stats:
Guest Posters: 681
Members: 0
Moderators: 0
Admins: 1
Forum Stats:
Groups: 2
Forums: 3
Topics: 1160
Posts: 3962
Newest Members:
, Henk HelmantelAdministrators: Henk Helmantel: 1518