I’ve got a new install with a Sangoma card all up and running, receiving the CLI, etc. However after much searching I still can’t figure out how to match my inbound calls on that line in the dialplan.
And here’s my entry from extensions.conf. At present I’ve just used a “match all” in order to catch the inbound call. How can I get the phone number dialled and match it against exten? Currently ${CALLERID(dnid)} always returns blank.
exten => _.,1,Answer()
same => n,Verbose(Caller ID is: ${CALLERID(num)})
same => n,Verbose(Dialled is: ${CALLERID(dnid)})
same => n,Wait(1)
same => n,Playback(zombies)
same => n,Hangup()
I’m sure it’s out there somewhere, but I can’t seem to find it. Any help would be appreciated.
Is it possible to set the number in the config file for dahdi (or somewhere) so that I’d know that a certain telephone number relates to a specific channel?
If I had a 4 port FXO card, each plugged into a phone line how would I know/route the calls in the dialplan depending upon which number it came in on?
As it currently stands my dialplan is just doing a catch-all so that analog calls are falling through the extensions and being caught. There must be a better way?
Thanks
Edit: Thinking about it more… I guess I could just specify a different context from each analogue line and route them within their own context and continue to do a catch-all. Would that be the way to go?