это не критичные деньги
Т.е вы бардак с кучей роутеров хотите перенести на микротики?
[general]
enabled=yes ; возможность работать с AMI (по-умолчанию no)
port=5038; на порту TCP 5038
bindaddr=0.0.0.0 ; принимать соединения в локальной сети (0.0.0.0 - на всех интерфейсах)
timestampevents=yes ; Отправлять в пакетах событий временную метку
displayconnects=yes ; Отображать факт подключения пользователя к AMI
allowmultiplelogin=yes ; Разрешить несколько параллельных подключений с одним именем
; Начало секции, описывающей пользователя
[user] ;Имя пользователя
secret=12345678;пароль
;deny=0.0.0.0/0.0.0.0 ; запрет всех адресов
permit=0.0.0.0/0.0.0.0 ;разрешенная сеть
;permit=192.168.2.0/255.255.255.0 ; разрешенная сеть
read=call,originate ;разрешенные права
write=call,originate ;разрешенные права
eventfilter=!Event: ExtensionStatus ;фильтрация ненужных событий
eventfilter=!Event: MusicOnHold
eventfilter=!Event: NewAccountCode
eventfilter=!Event: Leave
eventfilter=!Event: Rename
eventfilter=!Event: Masquerade
eventfilter=!Event: Join
eventfilter=!Event: NewCallerid
[trunk-2222]
exten => _38.,1,Dial(SIP/trunk-2222/${EXTEN:2})
exten => _0.,1,Dial(SIP/trunk-2222/${EXTEN})
exten => _.,1,Set(CALLERID(num)=${CALLERID(num):1})
exten => _.,n,Set(CALLERID(name)=${CALLERID(name):1})
exten => _.,n,Dial(SIP/3333) ;номер софтфона
exten => h,1,Hangup()
== Using SIP RTP CoS mark 5
> 0x7fb978012a80 -- Strict RTP learning after remote address set to: 192.168.0.86:10276
<-- Examining AMI event: -->
Event: Newchannel
Privilege: call,all
Timestamp: 1541068914.733912
SequenceNumber: 598
File: manager_channels.c
Line: 734
Func: channel_snapshot_update
Channel: SIP/trunk-2222-0000005d
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: +380ХХХХХХХХХ
CallerIDName: +380ХХХХХХХХХ
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: trunk-2222
Exten: trunk-2222
Priority: 1
Uniqueid: 1541068914.146
Linkedid: 1541068914.146
<-- Examining AMI event: -->
Event: Newstate
Privilege: call,all
Timestamp: 1541068914.734026
SequenceNumber: 602
File: manager_channels.c
Line: 734
Func: channel_snapshot_update
Channel: SIP/trunk-2222-0000005d
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: +380ХХХХХХХХХ
CallerIDName: +380ХХХХХХХХХ
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: trunk-2222
Exten: trunk-2222
Priority: 1
Uniqueid: 1541068914.146
Linkedid: 1541068914.146
<-- Examining AMI event: -->
Event: DeviceStateChange
Privilege: call,all
Timestamp: 1541068914.734042
SequenceNumber: 604
File: manager.c
Line: 1836
Func: manager_default_msg_cb
Device: SIP/trunk-2222
State: INUSE
-- Executing [trunk-2222@trunk-2222:1] Set("SIP/trunk-2222-0000005d", "CALLERID(num)=380ХХХХХХХХХ") in new stack
<-- Examining AMI event: -->
Event: Newexten
Privilege: call,all
Timestamp: 1541068914.735166
SequenceNumber: 605
File: manager_channels.c
Line: 734
Func: channel_snapshot_update
Channel: SIP/trunk-2222-0000005d
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: +380ХХХХХХХХХ
CallerIDName: +380ХХХХХХХХХ
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: trunk-2222
Exten: trunk-2222
Priority: 1
Uniqueid: 1541068914.146
Linkedid: 1541068914.146
Extension: trunk-2222
Application: Set
AppData: CALLERID(num)=380ХХХХХХХХХ
<-- Examining AMI event: -->
Event: NewCallerid
Privilege: call,all
Timestamp: 1541068914.735544
SequenceNumber: 606
File: manager_channels.c
Line: 734
Func: channel_snapshot_update
Channel: SIP/trunk-2222-0000005d
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: 380ХХХХХХХХХ
CallerIDName: +380ХХХХХХХХХ
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: trunk-2222
Exten: trunk-2222
Priority: 1
Uniqueid: 1541068914.146
Linkedid: 1541068914.146
CID-CallingPres: 0 (Presentation Allowed, Not Screened)
-- Executing [trunk-2222@trunk-2222:2] Set("SIP/trunk-2222-0000005d", "CALLERID(name)=380ХХХХХХХХХ") in new stack
<-- Examining AMI event: -->
Event: Newexten
Privilege: call,all
Timestamp: 1541068914.736037
SequenceNumber: 607
File: manager_channels.c
Line: 734
Func: channel_snapshot_update
Channel: SIP/trunk-2222-0000005d
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: 380ХХХХХХХХХ
CallerIDName: +380ХХХХХХХХХ
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: trunk-2222
Exten: trunk-2222
Priority: 2
Uniqueid: 1541068914.146
Linkedid: 1541068914.146
Extension: trunk-2222
Application: Set
AppData: CALLERID(name)=380ХХХХХХХХХ
<-- Examining AMI event: -->
Event: NewCallerid
Privilege: call,all
Timestamp: 1541068914.736358
SequenceNumber: 608
File: manager_channels.c
Line: 734
Func: channel_snapshot_update
Channel: SIP/trunk-2222-0000005d
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: 380ХХХХХХХХХ
CallerIDName: 380ХХХХХХХХХ
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: trunk-2222
Exten: trunk-2222
Priority: 2
Uniqueid: 1541068914.146
Linkedid: 1541068914.146
CID-CallingPres: 0 (Presentation Allowed, Not Screened)
-- Executing [trunk-2222@trunk-2222:3] Dial("SIP/trunk-2222-0000005d", "SIP/3333") in new stack
<-- Examining AMI event: -->
Event: Newexten
Privilege: call,all
Timestamp: 1541068914.736750
SequenceNumber: 609
File: manager_channels.c
Line: 734
Func: channel_snapshot_update
Channel: SIP/trunk-2222-0000005d
ChannelState: 4
ChannelStateDesc: Ring
CallerIDNum: 380ХХХХХХХХХ
CallerIDName: 380ХХХХХХХХХ
ConnectedLineNum:
ConnectedLineName:
Language: en
AccountCode:
Context: trunk-2222
Exten: trunk-2222
Priority: 3
Uniqueid: 1541068914.146
Linkedid: 1541068914.146
Extension: trunk-2222
Application: Dial
AppData: SIP/3333
select name
from sys.tables
where object_id in
( select parent_object_id
from sys.foreign_key_columns
where referenced_object_id = 2105058535
and referenced_column_id = 1);
select object_id from sys.tables where name = 'MyTable'
select column_id from sys.columns where name = 'MyTable' and object_id = my_id