Bridging SIP and CAPI: Early dial?

Hi, I am trying to setup a possibility to dial into asterisk via SIP and to be able to dial a number which gets dialed by CAPI (ISDN).
The purpose of this is to allow certain SIP users to use their SIP phones as if they were using an ISDN phone i.e. dial internal extensions, dial out etc.

I created an entry in extensions.conf like:
[from-sip-intern]
exten => _X.,1,Dial(CAPI/ISDN1/202:${EXTEN})

and in sip.conf I put something like
[22]
type=friend ; either “friend” (peer+user), “peer” or "user"
secret=MyPassword
username=22 ; Authentication user for outbound proxies
context=from-sip-intern
fromuser=22 ; overrides the callerid, e.g. required by FWD
;callerid=My Name<22>
host=dynamic
nat=yes ; there is NAT between phone and Asterisk
qualify=yes
canreinvite=no ; allow RTP voice traffic to bypass Asterisk
dtmfmode=info ; either RFC2833 or INFO for the BudgeTone
incominglimit=2 ; permit 2 outgoing calls at a time
; from the phone to asterisk
disallow=all ; need to disallow=all before we can use allow=
allow=ulaw ; Note: In user sections the order of codecs
; listed with allow= does NOT matter!
allow=alaw
allow=g723.1 ; Asterisk only supports g723.1 pass-thru!
allow=g729 ; Pass-thru only unless g729 license obtained

Now, this setup works perfect for two digit numbers.
However I can’t seam to find a solution to allow an arbitrary number of digits to be dialed and then:

  • Either dial them after a certain timeout or
  • use early dialing to pass these digits to CAPI one by one until the call can be completed.

Any ideas? Thanks in advance!