BYE is sent immediately after transfer

Hi:

When you execute a Transfer() inside a context, asterisk send a BYE immediately and it is not possible to manage the transfer if fails.

I think that parking call only works if you receive a REFER in asterisk as described in documentation: https://www.voip-info.org/asterisk-call-parking/, and not in my case where the REFER is sent from asterisk. Is it correct?

Is there any way to manage a failed transfer when the transfer is generated by Asterisk?

My code in the context is really simple at this moment:

[sip-to-sip-transfer]
; The transfer application is called already established, so a REFER                                                                                                                                               
; message is sent.                                                                                                                                                                            
exten => _X.,1, Noop(Trying to make sip to sip transfer)
same => n,Transfer(<sip:${EXTEN}@IP>)
same=> n,Noop(TRANSFERCAUSE: ${TRANSFERSTATUS} ${EXTEN})

I’m not sure if 16.6.0 could solve our issue:

2019-04-02 14:42 +0000 [f4896703b9]  Dan Cropp <dan@amtelco.com>

	* chan_pjsip:  Transmit REFER waits for the REFER result setting TRANSFERSTATUS

	  Previously, when a Transfer (REFER) was performed, chan_pjsip would set
	  the TRANSFERSTATUS to SUCCESS when the REFER was queued up.  This did not
	  reflect a successful/unsuccessful transfer the way chan_sip did.
	  Added a callback module to process the refer subscription information.

	  Now depends on res_pjsip_pubsub so call transfer progress can be monitored
	  and reported

	  ASTERISK-26968 #close
	  Reported-by: Dan Cropp

	  Change-Id: If6c27c757c66f71e8b75e3fe49da53ebe62395dc

Regards.

I have the same thing. The support of the peer whom I am connected to also pointed out at this problem.

I thought it had already been pointed out that pjsip transfer returns immediately. That won’t, itself, result in a BYE, but if you then immedately end the dialplan, you will get one.