Review Board 1.7.16

res_pjsip_messaging: Serialize outgoing MESSAGEs

Review Request #4579 - Created April 3, 2015 and submitted

Mark Michelson
Because res_pjsip_messaging throws all messages to send into the threadpool, there is no guarantee that consecutive outgoing messages from the same dialplan execution will be sent in the same order.
So for instance, if you had the following dialplan:

exten => hello,1,NoOp()
same => n,SendMessage(hello)
same => n,SendMessage(world)

It would be expected that the "hello" message would be sent before the "world" message. However, it cannot be guaranteed this will happen with the current threadpool usage.

The patch on this review introduces a serializer for outgoing MESSAGE requests from Asterisk. This ensures that all MESSAGE requests are sent in the same order that they are processed in the dialplan.
The bug itself is incredibly difficult to have happen under normal circumstances, but I have confirmed that this patch has not hindered operations any.
Review request changed
Updated (April 3, 2015, 5:25 p.m.)
  • changed from pending to submitted
Committed in revision 433989 runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to