Как-то так:
dahdi.conf
; Span 1: WCTDM/0 "Wildcard TDM2400P Board 1" (MASTER)
;;; line="1 WCTDM/0/0 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=0
context=company-1
echocancel=256
channel => 1
;;; line="2 WCTDM/0/1 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=0
context=company-2
echocancel=256
channel => 2
users.conf
[01001]
cid_number = 001
secret = password1
context=company-1
[02001]
cid_number = 001
secret = password2
context=company-2
extensions.conf
[company-1]
exten => _XXX,1,Dial(SIP/01${EXTEN})
exten => _XXXX!,1,Dial(DAHDI/1/${EXTEN})
[company-2]
exten => _XXX,1,Dial(SIP/02${EXTEN})
exten => _XXXX!,1,Dial(DAHDI/2/${EXTEN})