If we receive a MESSAGE request that we cannot send a response
to, we should not send the incoming MESSAGE to the dialplan.
This commit should help the bouncing message_retrans test to
pass consistently.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434218
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
return PJ_TRUE;
}
- /* send it to the messaging core */
- ast_msg_queue(msg);
- send_response(rdata, PJSIP_SC_ACCEPTED, NULL, NULL);
+ /* Send it to the messaging core.
+ *
+ * If we are unable to send a response, the most likely reason is that we
+ * are handling a retransmission of an incoming MESSAGE and were unable to
+ * create a transaction due to a duplicate key. If we are unable to send
+ * a response, we should not queue the message to the dialplan
+ */
+ if (!send_response(rdata, PJSIP_SC_ACCEPTED, NULL, NULL)) {
+ ast_msg_queue(msg);
+ }
return PJ_TRUE;
}