Caller-ID Number match of calling user using mysql

Hello All
My dial plan is given bellow. If a call came from 123 number to my extenssion 100, it will forward the call to another number 001911317434.
Right now i m trying to asterisk extenssion with realtime. what i have to do to put this dialplan in my mysql table? can u give me any idea
exten => 123/100,1,Answer()
exten => 123/100,2,Dial(SIP/001911317434)

Have a gotoit the callerid(num)=123 to go else where

Hello Dovid

Can u pls give me more specific idea?, as i m new with asterisk

[quote=“shaon”]Hello All
My dial plan is given bellow. If a call came from 123 number to my extenssion 100, it will forward the call to another number 001911317434.
Right now i m trying to asterisk extenssion with realtime. what i have to do to put this dialplan in my mysql table? can u give me any idea
exten => 123/100,1,Answer()
exten => 123/100,2,Dial(SIP/001911317434)[/quote]

you’re pretty close there but reverse the 123/100

so its 100/123…

exten => EXTENSION/CALLERID,Priority,Action

Hi
thanx for ur reply, but when put that to my realtime extenssion it doesn’t check the caller id. Whats the option to use that dialplan on mysql table