Author |
Post |
|
#1 Fri Sep 03, 2010 08:33, 176 months ago.
|
Member
Registered: Aug 2010
Location: beijing, China
|
Hi keke :
I send many messages to a shot number and it returns messages to the modem .
but , the incoming msg is not in the order of sending msg . for some reason , the first sending msg will not the first one coming back .
Is there an uniq order_id or something to match the sent and the received msg ?
thanks
|
|
#2 Fri Sep 03, 2010 09:03, 176 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
There is no any id which can be used for this purpose.
You should send only one message at a time and wait until an answer is received. Then send the next message, and wait again.
If I should make this kind of a functionality, it could be the following (just an idea, not tested):
- All outgoing messages are placed into the outgoing directory, as usual. - Those messages which should get a "return message", have extra header: "Waiting_for_return_message: yes".
- Another directory is required: "outgoing_next".
- Checkhandler script should check the outgoing directory: - - If there are more than one messages to the same number and with "waiting" header, the oldest one is kept and other messages are moved to the "outgoing_next" directory.
- The oldest one message is then spooled and sent.
- Eventhandler script should check incoming message: -- If in the "outgoing_next" directory there are messages to the same number, the oldest one is moved to the outgoing directory.
- If, at the same time, new messages are created into the outgoing directory, the checkhandler will keep the oldest one (which was now moved back) and other messages are moved to "outgoing_next".
|