Unterminate incoming call from FXO transfer to another FXO

I have installed an asterisk - only using asterisk@home however some dial plan i’m doing myself.

Here my configuration.
i connect my PSTN line to FXO port at the asterisk for incoming and outgoing call.
When i got incoming call i will forward the call to operator (IAX2 extension)…i’m using KIAX softphone. From this softphone the operator will use it transfer.

If they want to transfer to another SIP/IAX2 when the call is finished the line will hangup properly.
If they transfer go to outside (another fxo) to make to PSTN…when the call is finished, but the zap channel still show in use.
It look like the hangup event can’t be detect.

How can i handle this.
Really appreciate if someone can advice me…

[macro-exten-vm]
exten => s,1,Setvar(FROMCONTEXT=exten-vm)
exten => s,2,Macro(record-enable,${ARG2},IN)
exten => s,3,Macro(dial,${RINGTIMER},${DIAL_OPTIONS},${ARG2})
exten => s,4,GotoIf($[${CHANNEL:0:5} = Local]?s-${DIALSTATUS},1) ; if the chann$
exten => s,5,GotoIf($[${ARG1} = novm]?s-${DIALSTATUS},1) ; no voicemail in use $
exten => s,6,NoOp(Sending to Voicemail box ${ARG1})
exten => s,7,Goto(ext-trisys,${ARG2},1)

[ext-trisys]
exten => 4101,1,Dial(SIP/4101)
exten => 4102,1,Dial(SIP/4102)
exten => 4103,1,Dial(SIP/4103)
exten => 4104,1,Dial(SIP/4104)
exten => 4285,1,Dial(SIP/4285)
exten => 4273,1,Goto(mam,4273,1) ; using another fxo to make outside call

[mam]
exten => 4273,1,Dial(Zap/g0/880195700411)
exten => h,1,Macro(hangupcall)

This is a common problem with CO trunks, you need to check that the CPC signal is being detected. IE if you fire a call into the system and hang up does it stop ringing ? IF that works then fire a call into voicemail and check that hangs up. then and only then can you look at the problem you have. TBH it woul be better to route out over SIP or IAX as they have answer supervision which CO trunks will be lacking.

Ian

Thank ian,
I have try to transfer to the VM.
When the hangup is occur, now the termination is only at the channel of the extension and however at zap that receive the incoming call still show active.

Any other advice or dial plan that i can use. :smile:

This is a common problem with CO trunks, you need to check that the CPC signal is being detected. IE if you fire a call into the system and hang up does it stop ringing ? IF that works then fire a call into voicemail and check that hangs up. then and only then can you look at the problem you have. TBH it woul be better to route out over SIP or IAX as they have answer supervision which CO trunks will be lacking.

Ian