Extensions.conf, Filter not available SIPs

Hi,

i have 3 digits internal Numbers (100-999) and i want to realize a function who checks, if an extension is available (or not) and route this to a defined specific extension.

Example:
I have extensions for 100 and 101. When a call is for 102 (extension that doesnt exists) it would be nice, that the call is tranfered to 100. When a call is for 100, the call should be tranferred to 100…

Thanks for help,
Mod

${DIALSTATUS} after Dial

I think 1.6 has functions for getting device status.

Hi!

I have asterisk 1.4 :frowning:

My extensions.conf looks like this:

exten => _12345XXX,1,Dial(SIP/${EXTEN:5},20)

This handles calls from outside…

How can i implementent DIALSTATUS in this Case?

Mod

I don’t see why not.

Could you please help me HOW to implement DIALSTATUS in my extensions.conf?

exten => _12345XXX,1,Dial(SIP/${EXTEN:5},20) exten => _12345XXX,n,NoOp(${DIALSTATUS}) exten => _12345XXX,n, do something based on the status...

And DIALSTATUS will be one of:

CHANUNAVAIL | CONGESTION | NOANSWER | BUSY | ANSWER | CANCEL
DONTCALL | TORTURE | INVALIDARGS

Hi,

thanks for help.

And when an extension is not available it is ths status “chanunavail”?

I dont know how to “do something based on the status”. Could you please provide me an example based on my need?

Thanks,
Mod

Look in the configs directory of your asterisk source for some example dialplans in extensions.conf. Specifically look at macro-stdexten.