No recovery possible from SIP blind transfer failure

I am having a problem with a SIP program that talks to *. It requests a blind transfer using the REFER method described in section 6.1 of the IETF spec ietf.org/internet-drafts/dra … fer-09.txt.

On failed transfer (for example if the other line is busy), instead of getting a NOTIFY 503 “Service Unavailable” or 486 “Busy Here” or 487 “Request Cancelled” as described in section 6.3 of the spec, I get 200 OK.

I thought I saw a patch once to allow * to support this “semi”-blind transfer mode that allows the transfer to be cancelled if the other party isn’t available, but now I can’t find it.

Can anyone recommend the best way to fix this? Is there some configuration of Asterisk or patch that I can apply?

I’ve found the following section in chan_sip.c that seems relevant. This is from the transmit_refer() function. Can anyone suggest how I can make the change suggested here?

[code] /* We should propably wait for a NOTIFY here until we ack the transfer /
/
Maybe fork a new thread and wait for a STATUS of REFER_200OK on the refer status before returning to app_transfer */

/*! \todo In theory, we should hang around and wait for a reply, before
returning to the dial plan here. Don't know really how that would
affect the transfer() app or the pbx, but, well, to make this
useful we should have a STATUS code on transfer().
*/[/code]