How to detect what ddi number on isdn30 was dialed


#1

Hi,

I have 2 ISDN 30e lines with multiple ddi numbers and channels all going to asterisk via a digium 205 card.

IF the ddi numbers are like

888001
888002
888003

889001
889002
etc

How can I detect which number our customer has called ie 889001 888001 etc.
All incoming numbers would be sent to a [incoming] context in extensions.conf and I need some way to detect the number so I can route some of the ddi numbers to other parts of extensions.conf.

Thanks

Nick


#2

Heres how I do mine on a pri. I use the goto to jump to another context

exten => 1116980008,1,Goto(cpatel,s,1)
exten => 1116980009,1,Goto(jansutton,s,1)
exten => 1116980010,1,GoTo(floyd,s,1)
exten => 1116980011,1,GoTo(matts,s,1)
exten => 1116980012,1,GoTo(hqin,s,1)
exten => 1116980013,1,GoTo(nomenufront,s,1)


#3

Thanks for the help.

I will give it a go.

Nick


#4

Hi

depending on the number you have, if you have a few then hardcoding is fine but a managment headache.

[code][pstn-in]
exten => _.,1,set(ddi=${EXTEN:-4}) ; for 4 digit numbers
exten => _.,n,set(CALLERID(num) = 90${CALLERID(num)})
exten => _.,n,Dial(Local/${ddi}@default/n,60,wW)
exten => _.,n,Hangup

[/code]

This will match the ddi numbers to you extensions.