Asterisk Man in the Middle

From Etel

Jump to: navigation, search


Problem

When attempting to extend a proprietary phone system some times the last and best option is to work in front of the proprietary system and directly with the Telco provider.


Solution

A man in the middle is just what it sounds like. A box sits in between the Telco and the new PBX and the Proprietary PBX. The MIM accepts a trunk connection and then using a dial plan switch it directs the calls to the correct port.

Background

  • Trunk
    • DIDs 81XX and 82XX
    • T1 23 channels
  • New PBX
    • Actually is the MIM box
    • Dual T1 card
  • Proprietary
    • Must Dial 9 to get out
    • Has Paging

Dial Plan

extensions.conf
[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no
userscontext=default

[globals]
TRUNK = Zap/g1

[inbound]
exten => s,1,Set(TIMEOUT(digit)=5)
exten => s,n,Set(TIMEOUT(response)=20)
exten => s,n,GosubIf($["${answermode}" = "holiday"]?holiday)
exten => s,n,GotoIfTime(*|sat-sun|*|*?nightmode)
exten => s,n,GotoIfTime(16:00-07:00|mon-fri|*|*?nightmode:start)
exten => s,n,Gosub(start)
exten => s,n(nightmode),Background(silence/1)
exten => s,n,Background(ivr_welcome)
exten => s,n,Background(ivr_hours)
exten => s,n,Background(ivr_extension)
exten => s,n,Background(ivr_sales)
exten => s,n,Background(ivr_engineering)
exten => s,n,Background(ivr_directory)
exten => s,n,Voicemail(1500)
exten => s,n(holiday),Background(silence/1)
exten => s,n,Background(ivr_welcome)
exten => s,n,Background(ivr_holiday)
exten => s,n,Background(ivr_extension)
exten => s,n,Background(ivr_sales)
exten => s,n,Background(ivr_engineering)
exten => s,n,Background(ivr_directory)
exten => s,n,Voicemail(1500)
exten => s,n(start),Answer
exten => s,n,Background(silence/1)
exten => s,n,Background(ivr_welcome)
exten => s,n,Background(ivr_extension)
exten => s,n,Background(ivr_sales)
exten => s,n,Background(ivr_engineering)
exten => s,n,Background(ivr_directory)
exten => s,n,Background(ivr_stay_on)
exten => s,n,WaitExten(30)
exten => s,n,Goto(operator,s,1)

exten => 0,1,Goto(operator,s,1)
exten => 1,1,Goto(sales,s,1)
exten => 2,1,Goto(engineering,s,1)
exten => 3,1,Goto(purchasing,s,1)
exten => 9,1,Directory(default) 

exten => t,1,Goto(operator,s,1)
exten => i,1,Background(invalid)
exten => i,n,Goto(s,1)


[proprietary]
exten => _NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN})
exten => _1NXXNXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN})
exten => _011X.,1,Dial(${GLOBAL(TRUNK)}/${EXTEN})

[new_pbx]
exten => _NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN})
exten => _1NXXNXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN})
exten => _011X.,1,Dial(${GLOBAL(TRUNK)}/${EXTEN})

exten => _1XX,1,Dial(${GLOBAL(TRUNK)}/8${EXTEN})


Zaptel

zaptel.conf
span=1,1,5,esf,b8zs
bchan=1-23
dchan=24

span=2,0,0,esf,b8zs
bchan=25-47
dchan=48

loadzone = us
defaultzone = us
zapata.conf
[channels]
language=en
immediate=no
echocancel=yes
pridialplan=unknown
prilocaldialplan=unknown
;echocancelwhenbridged=no
;echotraining=yes

context=inbound
signalling=pri_cpe
group=1
channel => 1-23

context=proprietary
signalling=fxo_ls
group=2
channel => 25-48


Discussion

See Also:

Metadata

Personal tools