How to make Asterisk send INVITE with Replaces header

I have a setup with Asterisk 13.18.3 and 3 PJSIP extensions. Those are used by 2 Android devices with linphone, and 1 Linux desktop with Jitsi. The scenario I’m working with is an attended transfer as follows:

  • Android/Linphone-1 calls Linux/Jitsi
  • Linux/Jitsi put the call on hold and calls Android/Linphone-2
  • after the second call is established, Linux/Jitsi transfers Android/Linphone-1 to Android/Linphone-2

I’ve monitored the SIP traffic on the Asterisk server, and the transfer is successful. My problem is that when Linux/Jitsi sends the REFER request to Asterisk, no new INVITE with Replaces header is generated by Asterisk. It seems Asterisk just merges the calls internally, without the caller and callee know about it.

Is it possible to have Asterisk sends new INVITE with Replaces header?

If the call leg identified by the Replaces is inside Asterisk, it will resolve it internally. I seem to remember that chan_sip had some mechanism for forwarding when the leg isn’t known to Asterisk, but I seem to remember that there was some specific dialplan involved. I’ve never looked into this with chan_pjsip.

Remember that Asterisk is a back to back user agent, and these SIP de-tromboning operations require there to be special case SIP to SIP call handling.

If you’re referring to external_replaces special extension documented in remote attended transfers, then I already tried that, but it doesn’t seem to be invoke in my scenario where all calls/legs are within Asterisk.

I’m basically trying to emulate a customer’s environment (which uses OmniPCX), but I can’t seem to get Asterisk to create the same SIP conversation.

Asterisk would do it internally as @david551 mentioned. There’s no way to override this.

Ok. Thanks for confirming.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.