Support forum

Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_TopicIcon
Setting the MessageParts field manually?
sp_NewPost Add Reply sp_NewTopic Add Topic
July 21, 2020
1:22 pm
Matheos
Guest
Guests

That's a good point.

Thanks Henk!

July 21, 2020
12:47 pm
Henk Helmantel
Admin
Forum Posts: 1488
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

No, but you can add the number of message parts to one of the status parameters, for instance the StatusText parameter. Then you at least have the information about the number of message parts available in the send log.

Regards, Henk

July 21, 2020
12:27 pm
Matheos
Guest
Guests

So there is no way of updating the MessageParts parameter when receiving the delivery report (as explained in my other thread about our setup)?

As our provider does the splitting into messages server-side, we get the message parts back after the sms is already sent (in the delivery report).

Matheos

July 21, 2020
11:54 am
Henk Helmantel
Admin
Forum Posts: 1488
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

The 'PostSendResultUpdate' method cannot be used to change any of the message parameters in the send log, only the status parameters StatusCode, StatusText, ErrorCode and ErrorText can be updated with the 'PostSendResultUpdate' method.

Regards, Henk

July 21, 2020
9:37 am
Matheos
Guest
Guests

Hello,

Thanks for your reply.
I tried and indeed it does work in PostSendResult, like you say, but I now realised I am not getting the messageparts in the POST reply, but I get them in a seperate POST that I receive on my httpserver, meaning I want to update an exisiting entry's messageparts in PostSendResultUpdate. In here, this does not seem to work... The value in the DB does not change

July 18, 2020
2:36 pm
Henk Helmantel
Admin
Forum Posts: 1488
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

Hello Matheos,

You are on the right track but you have to add the MessageParts property to the message packet in the 'PostSendResult' method, otherwise Diafaan SMS Server does not know which message the MessageParts property refers to.

In the standard Scripting Gateway script you can change the 'PostSendResult' method header to:

private void PostSendResult(string recordId, string messageId, StatusCode status,
string statusText, string errorCode, string errorText, bool sendStatusRequest, int messageParts)

And add the following line in the 'PostSendResult' method (after line 116 in the standard script):

messagePacket.Add("MessageParts", messageParts.ToString());

Regards, Henk

July 17, 2020
7:15 am
Matheos
Guest
Guests

Hello.

We have an lesser known provider in use to which we use a scripting gateway to POST our messages. In the return from the POST request, we can receive how many parts our message was split into (Our provider handles splitting, encoding and stuff serverside).
How can I use this information to tell diafaan how many messageparts it should log to MessageLog?

My initial guess was to do something like:
Hashtable messagePacket = new Hashtable();
messagePacket.Add("MessageParts", messageparts);
host.PostMessagePacket(messagePacket);

(simplified), where host is the IScriptHost object and messageparts is a string containing the number of part (hoping SQL server handles changing this string to an integer).

Kind Regards,
Matheos

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 529

Currently Online:
16 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Member Stats:

Guest Posters: 672

Members: 0

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 3

Topics: 1141

Posts: 3899

Newest Members:

, Henk Helmantel

Administrators: Henk Helmantel: 1488