I dont think there is any other option, I am doing the same at this very moment. In short, this is probably what has to be done:
exten => _X*XXXXXXXXX,1,Set(numer=${EXTEN:-9}) exten => _X*XXXXXXXXX,n,Set(CDR(accountcode)=${EXTEN:0:1}) exten => _X*XXXXXXXXX,n,Dial(${Port}/${numer},60,rW) exten => _X*XXXXXXXXX,104,Hangup
in the above example I am assuming that the accuntcode is 1 digit, if it has to be 10 digits, just make the exten: _XXXXXXXXXX*XXXXXXXXX,etc... and ofcourse: Set(CDR(accountcode)=${EXTEN:0:10})
Marcin
|