В том то и дело, что у меня прописан DID на входящих маршрутах в Asterisk.
Вот немного другой пример:
В шлюзе установлено 4 SIM карты, на каждую по транку как в Asterisk так и на самом шлюзе. DID номера прописаны на входящем маршруте в GSM Шлюзе и соответственно в входящем на Asterisk.
Звоню на 3ю SIM карту в шлюзе (соответственно транк будет под номером 3 и DID с номером 3). Но шлюз кидает звонок по 4му транку (последнему) с верным DID.
Лог входящего звонка на Asterisk:
Имя транка: g4s04 (НЕ верный, должен быть g4s03)
DID: 100403 (верный, звоним на 3ю SIM)
Код: Выделить всё
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [100403@from-trunk-sip-g4s04:1] Set("SIP/g4s04-0000212c", "GROUP()=OUT_65") in new stack
-- Executing [100403@from-trunk-sip-g4s04:2] Goto("SIP/g4s04-0000212c", "from-trunk,100403,1") in new stack
-- Goto (from-trunk,100403,1)
-- Executing [100403@from-trunk:1] Set("SIP/g4s04-0000212c", "__DIRECTION=INBOUND") in new stack
-- Executing [100403@from-trunk:2] Gosub("SIP/g4s04-0000212c", "app-blacklist-check,s,1()") in new stack
-- Executing [s@app-blacklist-check:1] GotoIf("SIP/g4s04-0000212c", "0?blacklisted") in new stack
-- Executing [s@app-blacklist-check:2] Set("SIP/g4s04-0000212c", "CALLED_BLACKLIST=1") in new stack
-- Executing [s@app-blacklist-check:3] Return("SIP/g4s04-0000212c", "") in new stack
-- Executing [100403@from-trunk:3] Set("SIP/g4s04-0000212c", "__FROM_DID=100403") in new stack
-- Executing [100403@from-trunk:4] Set("SIP/g4s04-0000212c", "CDR(did)=100403") in new stack
-- Executing [100403@from-trunk:5] ExecIf("SIP/g4s04-0000212c", "0 ?Set(CALLERID(name)=+375291234567)") in new stack
-- Executing [100403@from-trunk:6] Set("SIP/g4s04-0000212c", "__MOHCLASS=") in new stack
-- Executing [100403@from-trunk:7] Set("SIP/g4s04-0000212c", "__REVERSAL_REJECT=FALSE") in new stack
-- Executing [100403@from-trunk:8] GotoIf("SIP/g4s04-0000212c", "1?post-reverse-charge") in new stack
-- Goto (from-trunk,100403,10)
-- Executing [100403@from-trunk:10] NoOp("SIP/g4s04-0000212c", "") in new stack
-- Executing [100403@from-trunk:11] Set("SIP/g4s04-0000212c", "__CALLINGNAMEPRES_SV=allowed_not_screened") in new stack
-- Executing [100403@from-trunk:12] Set("SIP/g4s04-0000212c", "__CALLINGNUMPRES_SV=allowed_not_screened") in new stack
-- Executing [100403@from-trunk:13] Set("SIP/g4s04-0000212c", "CALLERID(name-pres)=allowed_not_screened") in new stack
-- Executing [100403@from-trunk:14] Set("SIP/g4s04-0000212c", "CALLERID(num-pres)=allowed_not_screened") in new stack
-- Executing [100403@from-trunk:15] NoOp("SIP/g4s04-0000212c", "CallerID Entry Point") in new stack
-- Executing [100403@from-trunk:16] Goto("SIP/g4s04-0000212c", "timeconditions,1,1") in new stack
-- Goto (timeconditions,1,1)
-- Executing [1@timeconditions:1] Set("SIP/g4s04-0000212c", "DB(TC/1/INUSESTATE)=INUSE") in new stack
-- Executing [1@timeconditions:2] Set("SIP/g4s04-0000212c", "DB(TC/1/NOT_INUSESTATE)=NOT_INUSE") in new stack
-- Executing [1@timeconditions:3] GotoIfTime("SIP/g4s04-0000212c", "08:00-20:00,mon-fri,*,*,Europe/Minsk?truestate") in new stack
-- Goto (timeconditions,1,14)
-- Executing [1@timeconditions:14] GotoIf("SIP/g4s04-0000212c", "0?falsegoto") in new stack
-- Executing [1@timeconditions:15] ExecIf("SIP/g4s04-0000212c", "0?Set(DB(TC/1)=)") in new stack
-- Executing [1@timeconditions:16] Set("SIP/g4s04-0000212c", "DEVICE_STATE(Custom:TC1)=NOT_INUSE") in new stack
-- Executing [1@timeconditions:17] ExecIf("SIP/g4s04-0000212c", "0?Set(DEVICE_STATE(Custom:TCSTICKY)=INUSE)") in new stack
-- Executing [1@timeconditions:18] GotoIf("SIP/g4s04-0000212c", "1?app-announcement-2,s,1") in new stack
-- Goto (app-announcement-2,s,1)
-- Executing [s@app-announcement-2:1] GotoIf("SIP/g4s04-0000212c", "0?begin") in new stack
-- Executing [s@app-announcement-2:2] Answer("SIP/g4s04-0000212c", "") in new stack
-- Executing [s@app-announcement-2:3] Wait("SIP/g4s04-0000212c", "1") in new stack
-- SIP/g3s02-0000212b is making progress passing it to SIP/206-0000212a