I finally found the culprit.
Once Asternic is installed. It modify below file:
-rw-rw-r-- 1 asterisk asterisk 3706 Nov 29 19:56 extensions_custom.conf
into:
-rw-rw-r-- 1 asterisk asterisk 3781 Nov 29 20:59 extensions_custom.conf
Modification on the file is:
#include "/etc/asterisk/extensions_custom_asternic_outbound_hotdesk.conf"
Once it's applied. It will only accept outgoing external calls dialed via FOP, if dialed via phone it will prompt "invalid option".:
[root@HDVOIP3ISSABEL4 asterisk]# cat /etc/asterisk/extensions_custom_asternic_outbound_hotdesk.conf
; This macro will override dialout in freepbx and will track in Asternic outbound
; calls. To use in conjunction with the hotdesk fop2 plugin as an agent console
[macro-dialout-trunk-predial-hook]
exten => s,1,Noop(Test Track Outbound)
exten => s,n,GotoIf($["${CHANNEL:0:5}" = "Local"]?dolocal)
; Set variables when dial from phone directly
;exten => s,n,Set(REALCHAN=${CUT(CHANNEL,-,1)})
;exten => s,n,Set(VIRTUAL=${DB(hotdeskmap/${REALCHAN})})
; Si es llamado directo, y no existe hotdeskmap, verificar que sea una extension real
exten => s,n,ExecIf($["${VIRTUAL}" = ""]?Set(VIRTUAL=${CUT(REALCHAN,/,2)}))
exten => s,n,Set(REAL=${DB(AMPUSER/${VIRTUAL}/device)})
; Si no tiene device definido en astdb, asumimos que no esta logueado
exten => s,n,GotoIf($["${REAL}" = ""]?noestalogueado)
exten => s,n,Goto(setmore)
exten => s,n(noestalogueado),Playback(option-is-invalid)
exten => s,n,Hangup
; Set variables from Local chan (originating from FOP2)
exten => s,n(dolocal),Set(CHAN=${CUT(CHANNEL,@,1)})
exten => s,n,Set(CHAN=${CUT(CHAN,/,2)})
exten => s,n,Set(VIRTUAL=${CHAN})
exten => s,n,Set(REAL=${DB(AMPUSER/${VIRTUAL}/device)})
exten => s,n,Set(REALCHAN=${DB(DEVICE/${REAL}/dial)})
; Continue
exten => s,n(setmore),Set(QDIALER_AGENT=${DB(AMPUSER/${VIRTUAL}/cidname)})
exten => s,n,Set(QDIALER_QUEUE=${DB(previewcampaign/${REALCHAN})})
exten => s,n,GotoIf($["${QDIALER_QUEUE}" != ""]?setprefix)
exten => s,n,Set(QDIALER_QUEUE=${DB(profile/${REALCHAN})})
exten => s,n(setprefix),Set(DIAL_PREFIX=${DB(dialprefix/${QDIALER_QUEUE})})
exten => s,n(continue),Noop(Trunk is ${OUT_${DIAL_TRUNK}})
exten => s,n,Noop(Dialout number is ${OUTNUM})
exten => s,n,Noop(Dial options are ${DIAL_TRUNK_OPTIONS})
exten => s,n,GotoIf($["${QDIALER_AGENT}" != ""]?nextcheck)
exten => s,n,Noop(NO AGENT?, exit normally with no tracking outbound)
exten => s,n,MacroExit()
exten => s,n(nextcheck),GotoIf($["${QDIALER_QUEUE}" != ""]?bypass)
exten => s,n,Noop(NO QUEUE, exit normally with no tracking outbound)
exten => s,n,MacroExit()
exten => s,n(bypass),Set(PREDIAL_HOOK_RET=BYPASS)
exten => s,n,Goto(queuedial,${DIAL_PREFIX}${OUTNUM},1)
exten => s,n,MacroExit()
I did disable line:
;#include "/etc/asterisk/extensions_custom_asternic_outbound_hotdesk.conf"
then ran amportal restart, external outgoing via phone went okay.
What is the effect if I disable that line in general? Is it okay to disable it?
How not to disable phone external outgoing with that line enabled?
Please kindly advise. Thank you in advance!