Transferred call ending with a delay

Hi,
I’m using Asterisk 1.8.32.3. I have an issue with transferring. The first call hung up immediately but the second call that I transferred hung up about 8 sec later and I get the BYE message with this delay. Actually asterisk completes all the stacks but I think the process doesn’t end for a reason and SIP sends the message with a delay. Does anyone have an idea why that could be?

Thanks for help.

Screenshot from 2022-10-28 09-42-58

Most people have forgotten the details of Asterisk 1.8, which is 7 years beyond end of life. This will generally mean that the answers you will get relate to Asterisk 18 upwards, not Asterisk 1.8.

You would need to provide your dialplan and possibly verbose logging, although I would note that transfers generally require action to be taken for legs to hang up; they are not hung up just because the transfer completes.

Also, for protocol logs, there is strong preference for them to be captured, as text, from the Asterisk log files, and as the complete text, not one line history summaries.

Thank you for your reply. Here is my asterisks and sip logs. Do you have any other comments?

—starting transfer—
[Nov 3 05:55:16] – Goto (OutgoingCall,,1)
[Nov 3 05:55:16] – Executing [
@OutgoingCall:8] GotoIf("SIP/", “0?busy,1”) in new stack
[Nov 3 05:55:16] – Executing [
@OutgoingCall:9] GotoIf("SIP/
", “0?error,1”) in new stack
[Nov 3 05:55:16] – Executing [
@OutgoingCall:10] Hangup(“SIP/", “”) in new stack
[Nov 3 05:55:16] == Spawn extension (OutgoingCall, , 10) exited non-zero on 'SIP/


[Nov 3 05:55:16] – Goto (OutgoingCall,
,1)
[Nov 3 05:55:16] – Executing [@OutgoingCall:1] GotoIf("SIP/", "1?,1") in new stack
[Nov 3 05:55:16] – Goto (OutgoingCall,
,1)
[Nov 3 05:55:16] – Executing [
@OutgoingCall:1] AGI("SIP/", “agi://****”) in new stack
[Nov 3 05:55:16] NOTICE[1059]: chan_sip.c:21181 handle_response_notify: Got OK on REFER Notify message
[Nov 3 05:55:17] – <SIP/
>AGI Script agi://**** completed, returning 0
[Nov 3 05:55:17] – Executing [
@OutgoingCall:2] AGI("SIP/", ",ANSWER,16,SIP/") in new stack
[Nov 3 05:55:17] – Launched AGI Script ***
[Nov 3 05:55:17] – <SIP/
>AGI Script *** completed, returning 0
[Nov 3 05:55:17] – Executing [@OutgoingCall:3] GotoIf("SIP/", "0?*,1”) in new stack

You didn’t say that the REFER was being done from AGI. Obviously you need to provide the AGI script and enable AGI debugging.

Also, your logging needs to extend to the termination of the dialplan that initiated the transfer. It should be checking for a successful transfer and immediately hanging up if there has been one.

Also, I find that anything less than the full protocol logging produced by “sip set debug on” is often a waste of time