Call tying: различия между версиями

Материал из fidoman.ru
 
Строка 10: Строка 10:
 
Dialplan for incoming calls:
 
Dialplan for incoming calls:
 
  same => n,Gosubif(${DB_EXISTS(lastcall_trunkname/${CALLERID(num)})}?internal_dialplan,${DB(lastcall_trunkname/${CALLERID(num)})},1)
 
  same => n,Gosubif(${DB_EXISTS(lastcall_trunkname/${CALLERID(num)})}?internal_dialplan,${DB(lastcall_trunkname/${CALLERID(num)})},1)
 +
 +
Better is to use call tying only for one incoming call (then reset to default), then change DB in the dialplan to DB_DELETE (it gets the value then deletes it).

Текущая версия на 12:53, 29 октября 2023


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)

Better is to use call tying only for one incoming call (then reset to default), then change DB in the dialplan to DB_DELETE (it gets the value then deletes it).