I’ve added a second trunck that uses voip for when our 4 lines are full we can still dial out.
Now i want to make ALL outgoing calls use voip, but it doesn’t work.
I’ve added the following line to test outgoing with an 8 instead of our usual 9 to make sure it works before making any perm changes. If i dial a local number 85148 at that point i get a msg saying that the extension is not found. Before i finish dialing the whole thing.
Here’s part of my extensions.conf file
[globals]
TRUNK=Zap/g1
TRUNKSEPHIRA=IAX2/voip_ID:voip_pwd@voip.ms
; Local seven-digit dialing accessed through trunk interface
; ----------------------------------------------------------------------------------------------
[trunklocal]
exten => _9[2-9]11,1,Macro(dialout,${EXTEN:1})
exten => _9NXXXXXX,1,Macro(dialout,${EXTEN:1})
exten => _9NXXXXXXXXX,1,Macro(dialout,${EXTEN:1})
exten => _9*67NXXXXXXXXX,1,Macro(dialout,${EXTEN:1})
exten => _8NXXXXXXXXX,1,Macro(voipdialout,${EXTEN:1})
; MACROS
[macro-dialout]
exten => s,1,Set(CALLERID(all)=ID )
exten => s,n,Dial(${GLOBAL(TRUNK)}/${ARG1},60)
exten => s,n,Goto(s-${DIALSTATUS},1)
; If Zap full (POTS) use VOIP Sephira
exten => s-CHANUNAVAIL,1,Goto(s-CONGESTION,1)
exten => s-CONGESTION,1,Macro(voipdialout,${ARG1})
[macro-voipdialout]
exten => s,1,Playback(transfertvoip)
exten => s,n,Set(CALLERID(all)=ID )
exten => s,n,Dial(${GLOBAL(TRUNKSEPHIRA)}/${ARG1})
exten => s,n,Congestion()
exten => s,n,Hangup()
Thanks