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:
exten => _X.,1,Dial(CAPI/ISDN1/202:${EXTEN})

and in sip.conf I put something like
type=friend ; either “friend” (peer+user), “peer” or "user"
username=22 ; Authentication user for outbound proxies
fromuser=22 ; overrides the callerid, e.g. required by FWD
;callerid=My Name<22>
nat=yes ; there is NAT between phone and Asterisk
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=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!