Misdn incoming ddi

Hi!

i have 10 ddi numbers, an isdn line, and i use the misdn module. Would like to route the incoming calls to various ip phones based on the numbers, that was called.

exten => s,1, is working fine for all the ddi-s.

But how can i tell asterisk to Dial(SIP/X) if the ddi was X?
how can i debug what extension has been called?

thx,

Depends on your telco, but normally he is passing the WHOLE msn to your box.

So just have the dialplan looking like this

exten=> 551233,1, dial(SIP/11); John
exten=> 551233,2, hangup

exten=> 551244,1, dial(SIP/12) ;Christine
exten=> 551244,2, hangup

The “s” extension is the “standard” extension.

If you want to handle calls by its DDI, use the above way.

Have fun !

PS.:
You can see on the asterisk CLI what number is passed.
It looks like
ACCEPTING CALL FROM ‘123456’ to ‘YOUR NUMBER CALLED STANDS HERE’

PPS:
That is diaplan knowledge phase 0.1, you might wanna reread the manual :wink:

[quote=“RichardHH”]Depends on your telco, but normally he is passing the WHOLE msn to your box.

So just have the dialplan looking like this

exten=> 551233,1, dial(SIP/11); John
exten=> 551233,2, hangup

exten=> 551244,1, dial(SIP/12) ;Christine
exten=> 551244,2, hangup

The “s” extension is the “standard” extension.

If you want to handle calls by its DDI, use the above way.

Have fun !

PS.:
You can see on the asterisk CLI what number is passed.
It looks like
ACCEPTING CALL FROM ‘123456’ to ‘YOUR NUMBER CALLED STANDS HERE’

PPS:
That is diaplan knowledge phase 0.1, you might wanna reread the manual :wink:[/quote]

you are right, that would be the obvious way. but in my case, it isn’t working. you may have a look at this link(be warned, it is huge): http://frugalware.org/~xbit/debug

note that the only place i get a ddi is somekind of a ‘dad’ parameter. also note, that ast wants to start from the ‘s’ extension.

now i have an ugly solution:

exten => s,1,WaitForDigits(1000,2,false,15)
exten => _X,1,Dial(SIP/1${EXTEN},20,t)

this is working fine for now, i dont even know why really.

Because your diaplan is not matching correct.

Can you post the output of the CLI the moment a call is coming in ?

[quote=“RichardHH”]Because your diaplan is not matching correct.

Can you post the output of the CLI the moment a call is coming in ?[/quote]

sure, but pls hang on till the middle of the next week.

[quote=“RichardHH”]Because your diaplan is not matching correct.

Can you post the output of the CLI the moment a call is coming in ?[/quote]

here is the output: frugalware.org/~xbit/debug2
i’ve dialed the misdn line from cli through a voip call.

i’m having some trouble with sending fax. would like to show the dialplan. guess it is related with the above.

[sip-fax]
; receiving from the fax machine
exten => _9.,1,Answer()
exten => _9.,2,Set(FAXFILE=/tmp/fax.tif)
exten => _9.,3,rxfax(${FAXFILE})

; send it out
exten =>_9.,4,Macro(faxkuldes,${EXTEN:1},${FAXFILE})

;exten => _9.,6,Dial(misdn/1/${EXTEN:1},10,G(7))
;exten => _9.,7,txfax(${FAXFILE}|caller)

[macro-faxkuldes]
;exten => s,1,Set(FAXFILE=/tmp/fax.tif)
exten => s,1,Set(LOCALHEADERINFO=${FAXHEADER})

exten => s,2,Dial(misdn/1/${ARG1},10,G(4))
exten => s,3,txfax(${ARG2}|caller)

; isdn incoming
[misdn]

exten => 0614568011,5,NoOp(FAX!!!)

exten => s,1,WaitForDigits(1000,2,false,15)

; fax
exten => 1,1,Set(FAXFILE=/var/spool/asterisk/fax/${TIMESTAMP}.tif)
exten => 1,2,Answer()
exten => 1,3,rxfax(${FAXFILE})
exten => 1,4,System(’${SFAX} ${FAXFILE} >> ~/sfaxout’)

if i’m sending a fax to our fax number(0614568011)
the and the misdn exten picks it up, the control goes to extension 0614568011. Meanwhile, other incoming faxes, dont go trough that extension.

why is that? some wrong option?