From c794af652ea09740182881c2111b33e86f4d107b Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Fri, 18 Mar 2011 01:59:18 +0000 Subject: [PATCH] CallRerouting response not sent if peer hangs up first. Send the CallRerouting response on the next message instead of only on the DISCONNECT message. The next message is either going to be a DISCONNECT or RELEASE depending on who initiates disconnection first. git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2258 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- pri_facility.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pri_facility.c b/pri_facility.c index 11b7a0b..c5aaa6d 100644 --- a/pri_facility.c +++ b/pri_facility.c @@ -3951,7 +3951,12 @@ int pri_rerouting_rsp(struct pri *ctrl, q931_call *call, int invoke_id, enum PRI rose_err = ROSE_ERROR_Gen_ResourceUnavailable; switch (code) { case PRI_REROUTING_RSP_OK_CLEAR: - return rose_result_ok_encode(ctrl, call, Q931_DISCONNECT, invoke_id); + /* + * Send the response out on the next message which should be + * either Q931_DISCONNECT or Q931_RELEASE depending upon who + * initiates the disconnect first. + */ + return rose_result_ok_encode(ctrl, call, Q931_ANY_MESSAGE, invoke_id); case PRI_REROUTING_RSP_OK_RETAIN: return send_facility_result_ok(ctrl, call, invoke_id); case PRI_REROUTING_RSP_NOT_SUBSCRIBED: