Call tying

Материал из fidoman.ru


Save number called from internal extension into DB. When call received from that number it is routed directly to that extension.

Dialplan for outgoing calls:

exten => _8XXXXXXXXXX,1,Set(DB(lastcall_trunkname/${EXTEN})=${CALLERID(num)})

Dialplan for incoming calls:

same => n,Gosubif(${DB_EXISTS(lastcall_trunkname/${CALLERID(num)})}?internal_dialplan,${DB(lastcall_trunkname/${CALLERID(num)})},1)