I have been struggling with inbound/outbound routes I finally have the inbound routes working and the outbound states “cal cannot be completed as dialed”
working with freepbx 14
peer details:
context=from-pstn-toheader
fromdomain=callcentric.com
fromuser=17778387121
host=callcentric.com
insecure=port,invite
secret=hello1
type=peer
defaultuser=17778387121
disallowed_methods=UPDATE
directmedia=no
videosupport=no
disallow=all
allow=ulaw
extensions_custom.conf
[incoming]
exten => s,1,Set(Var_FROM_DOMAIN=${CUT(CUT(SIP_HEADER(TO),@,2),>,1)})
exten => s,2,GotoIF($["${Var_FROM_DOMAIN}" = “callcentric.com”]?5:3)
exten => s,3,GotoIF($["${Var_FROM_DOMAIN}" = “ss.callcentric.com”]?5:4)
exten => s,4,GotoIF($["${Var_FROM_DOMAIN}" = “66.193.176.35”]?5:7)
exten => s,5,Set(Var_TO_DID=${CUT(CUT(SIP_HEADER(TO),@,1),:,2)})
exten => s,6,GotoIF($["${Var_TO_DID}" != “”]?ext-did,${Var_TO_DID},1:7)
; Users may edit the lines below to route incoming calls to other locations/contexts.
; If you don’t know what this means then you should likely skip the lines below and
; allow the script to run unmodified
exten => s,7,GoTo(from-pstn,s,1)
exten => h,8,Playback(ss-noservice)
exten => h,9,Macro(hangupcall)
[100]
context=to-callcentric
type=friend
defaultuser=100
secret=PASSWORD
host=dynamic
[101]
context=to-callcentric
type=friend
defaultuser=101
secret=PASSWORD
host=dynamic
[to-callcentric]
exten => _X.,1,Dial(SIP/${EXTEN}@callcentric)
any help would be greatly appreciated