On Sun, Dec 7, 2008 at 9:19 AM, <andrej at teksavvy.com>
wrote:> Hi Everyone,
>
> Sorry, if this has been already discussed, but maybe someone encountered
> interesting issue.
> I have an * Dialplan configured with MySQL db. Everything works excellent,
> except, I can't specify the "ex-girlfriend logic". For
example
>
> Context exten Priority app
> appdata
> Default 400 1 Wait 20
> Default 400/100 1 Wait 10
>
> So, it does not matter what is my callerid, it will always go in wait(20)
If
> user with callerID 100 will try to dial x400, it will go to wait(20) as
> well, and never wait(10). In another words Asterisk will disregard this
> logic. If I place this logic in the extensions.conf file it will work as a
> charm - no problem.
>
> Thank you for your help.
>
Hi,
I believe it's a technological limitation. If it's in extensions.conf,
Asterisk can easilly draw a map of all possible matches in memory,
however for db it has to do query for each possible match. Perhaps
matching specific CallerID's was never thought of in realtime. If it
would work the same way as extension matching, probably a separate
column would be better (but that's just thought of how it should be).
Anyway, you can try creating separate context with callerid in exten
and then GoSub(${CALLERID(num)}) to it. Remember that ${EXTEN} is just
any number in your dialplan, and you can set it to CallerID when
jumping to other context. Upon returning from gosub it would be back
the same.
Regards,
Atis
--
Atis Lezdins,
VoIP Project Manager / Developer,
IQ Labs Inc,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835