[441234567890] ; Redirect incoming calls from trunk with context +441234567890 to internal extension 0. exten => _+X.,1,Goto(internal,0,1) [outgoing] ; Redirect all calls entering this context via SIP trunk "twilio". exten => _X.,1,Dial(SIP/twilio/+${EXTEN}) same => n,Hangup [internal] ; Dialplan for extension 1000. ; Dial SIP user 1000. Timeout after 10 seconds. exten => 1000,1,Dial(SIP/1000,10) same => n,VoiceMail(${EXTEN}) same => n,Hangup ; Dialplan for extension 1001. exten => 1001,1,Dial(SIP/1001,10) same => n,VoiceMail(${EXTEN}) same => n,Hangup ; Dialgroup "everyone" at extension 0 to ring mulitple extensions. exten => 0,1,Set(DIALGROUP(everyone,add)=SIP/1000) same => n,Set(DIALGROUP(everyone,add)=SIP/1001) same => n,Dial(${DIALGROUP(everyone)},10) same => n,VoiceMail(${EXTEN}) same => n,Hangup ; Dialplans for redirecting calls to outgoing context. ; Redirect international calls in format 00441234567890. exten => _00X.,1,Goto(outgoing,${EXTEN:2},1) ; Redirect international calls in format +441234567890. exten => _+X.,1,Goto(outgoing,${EXTEN:1},1) ; Redirect outgoing national calls in format 01234567890. exten => _0ZX.,1,Goto(outgoing,44${EXTEN:1},1)