Call tying: различия между версиями
Материал из fidoman.ru
Sergey (обсуждение | вклад) (Новая страница: «Category: VoIP Category: asterisk Save number called from internal extension into DB. When call received from that number it is routed directly to that e...») |
Sergey (обсуждение | вклад) |
||
(не показана 1 промежуточная версия этого же участника) | |||
Строка 4: | Строка 4: | ||
Save number called from internal extension into DB. | Save number called from internal extension into DB. | ||
When call received from that number it is routed directly to that extension. | 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). |
Текущая версия на 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).