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)
