I have a problem with call transfer when Asterisk is in the middle of this call. Well, first, I have a proxysip (opensips) that is working great and receives all the SIP messages. The calls between internal SIP phones using the proxysip are OK. The transfers among internal SIP phones are also OK.
When the call is made from the internal PSTN network through Asterisk towards an internal SIP phone (name X), the Asterisk acts as a gateway and makes the call through proxysip to reach the internal SIP phone X. The call works OK, but when SIP phone X tranfers the call by pushing the flash key (REFER message) to an internal SIP phone Y, the Asterisk answers to the REFER message with an Accept followed by a NOTIFY with a “SIP/2.0 481 Call leg/transaction does not exist”.
Thanks for your answer. But the proxysip changes only the Contact header from REFER message. The REFER message has the “Refer-To:” with the new fromtag, totag and call id obtained by the new INVITE/OK from SIP phone X to SIP phone Y.
I don’t believe that Asterisk supports refer replaces involving a third user agent, i.e. I don’t think it can generate INVITE/replaces. If you have the situation described in your reference, where the proxy is switching the second leg, I don’t think it is going to work.
The other case, I would have learned about by seeing it on issues.asterisk.org.
The features.conf method will work, even if the proxy would set up the enquiry leg directly, as the features.conf method forces asterisk to set up that leg, so it knows about it.