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
This commit is contained in:
Richard Mudgett 2011-03-18 01:59:18 +00:00
parent 1013e7626d
commit c794af652e

View File

@ -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: