Подумалось, что этого будет достаточно. Похоже, ошибся. Вот расширенный вариант:
Код: Выделить всё
Connected to Asterisk 1.6.0.26-FONCORE-r78 currently running on trixbox (pid = 2645)
Verbosity is at least 6
-- Registered SIP '101' at 192.168.0.42 port 59905
> Saved useragent "3CXPhone 5.0.14900.0" for peer 101
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Using SIP VRTP TOS bits 136
== Using SIP VRTP CoS mark 6
-- Executing [502000@from-sip-external:1] NoOp("SIP/502001-000002d0", "Received incoming SIP connection from unknown peer to 502000") in new stack
-- Executing [502000@from-sip-external:2] Set("SIP/502001-000002d0", "DID=502000") in new stack
-- Executing [502000@from-sip-external:3] Goto("SIP/502001-000002d0", "s,1") in new stack
-- Goto (from-sip-external,s,1)
-- Executing [s@from-sip-external:1] GotoIf("SIP/502001-000002d0", "1?from-trunk,502000,1") in new stack
-- Goto (from-trunk,502000,1)
-- Executing [502000@from-trunk:1] NoOp("SIP/502001-000002d0", "Catch-All DID Match - Found 502000 - You probably want a DID for this.") in new stack
-- Executing [502000@from-trunk:2] Goto("SIP/502001-000002d0", "ext-did,s,1") in new stack
-- Goto (ext-did,s,1)
-- Executing [s@ext-did:1] Set("SIP/502001-000002d0", "__FROM_DID=s") in new stack
-- Executing [s@ext-did:2] Gosub("SIP/502001-000002d0", "app-blacklist-check,s,1") in new stack
-- Executing [s@app-blacklist-check:1] GotoIf("SIP/502001-000002d0", "0?blacklisted") in new stack
-- Executing [s@app-blacklist-check:2] Return("SIP/502001-000002d0", "") in new stack
-- Executing [s@ext-did:3] ExecIf("SIP/502001-000002d0", "1 ?Set(CALLERID(name)=87152465820)") in new stack
-- Executing [s@ext-did:4] Set("SIP/502001-000002d0", "__CALLINGPRES_SV=allowed_not_screened") in new stack
-- Executing [s@ext-did:5] Set("SIP/502001-000002d0", "CALLERPRES()=allowed_not_screened") in new stack
-- Executing [s@ext-did:6] Goto("SIP/502001-000002d0", "ext-group,603,1") in new stack
-- Goto (ext-group,603,1)
-- Executing [603@ext-group:1] Macro("SIP/502001-000002d0", "user-callerid,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/502001-000002d0", "AMPUSER=87152465820") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("SIP/502001-000002d0", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("SIP/502001-000002d0", "1?Set(REALCALLERIDNUM=87152465820)") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/502001-000002d0", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/502001-000002d0", "AMPUSERCIDNAME=") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/502001-000002d0", "1?report") in new stack
-- Goto (macro-user-callerid,s,10)
-- Executing [s@macro-user-callerid:10] GotoIf("SIP/502001-000002d0", "0?continue") in new stack
-- Executing [s@macro-user-callerid:11] Set("SIP/502001-000002d0", "__TTL=64") in new stack
-- Executing [s@macro-user-callerid:12] GotoIf("SIP/502001-000002d0", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] NoOp("SIP/502001-000002d0", "Using CallerID "87152465820" <87152465820>") in new stack
-- Executing [603@ext-group:2] GotoIf("SIP/502001-000002d0", "1?skipdb") in new stack
-- Goto (ext-group,603,4)
-- Executing [603@ext-group:4] Set("SIP/502001-000002d0", "__NODEST=") in new stack
-- Executing [603@ext-group:5] Set("SIP/502001-000002d0", "__BLKVM_OVERRIDE=BLKVM/603/SIP/502001-000002d0") in new stack
-- Executing [603@ext-group:6] Set("SIP/502001-000002d0", "__BLKVM_BASE=603") in new stack
-- Executing [603@ext-group:7] Set("SIP/502001-000002d0", "DB(BLKVM/603/SIP/502001-000002d0)=TRUE") in new stack
-- Executing [603@ext-group:8] Set("SIP/502001-000002d0", "RRNODEST=") in new stack
-- Executing [603@ext-group:9] Set("SIP/502001-000002d0", "__NODEST=603") in new stack
-- Executing [603@ext-group:10] Set("SIP/502001-000002d0", "RecordMethod=Group") in new stack
-- Executing [603@ext-group:11] Macro("SIP/502001-000002d0", "record-enable,90000101-90007102,Group") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("SIP/502001-000002d0", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] AGI("SIP/502001-000002d0", "recordingcheck,20120409-233748,1333993068.1813") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck,20120409-233748,1333993068.1813: No DB Entry AMPUSER/90000101/recording - Not Recording for 90000101, checking for others
recordingcheck,20120409-233748,1333993068.1813: No DB Entry AMPUSER/90007102/recording - Not Recording for 90007102, checking for others
-- <SIP/502001-000002d0>AGI Script recordingcheck completed, returning 0
-- Executing [s@macro-record-enable:5] MacroExit("SIP/502001-000002d0", "") in new stack
-- Executing [603@ext-group:12] Set("SIP/502001-000002d0", "RingGroupMethod=ringall") in new stack
-- Executing [603@ext-group:13] Macro("SIP/502001-000002d0", "dial,60,tTrwW,90000101-90007102") in new stack
-- Executing [s@macro-dial:1] GotoIf("SIP/502001-000002d0", "1?dial") in new stack
-- Goto (macro-dial,s,3)
-- Executing [s@macro-dial:3] AGI("SIP/502001-000002d0", "dialparties.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
dialparties.agi: Starting New Dialparties.agi
dialparties.agi: Caller ID name is '87152465820' number is '87152465820'
> dialparties.agi: USE_CONFIRMATION: 'FALSE'
> dialparties.agi: RINGGROUP_INDEX: ''
dialparties.agi: Methodology of ring is 'ringall'
-- dialparties.agi: Added extension 90000101 to extension map
-- dialparties.agi: Added extension 90007102 to extension map
-- dialparties.agi: Extension 90000101 cf is disabled
-- dialparties.agi: Extension 90007102 cf is disabled
-- dialparties.agi: Extension 90000101 do not disturb is disabled
-- dialparties.agi: Extension 90007102 do not disturb is disabled
> dialparties.agi: extnum 90000101 has: cw: 0; hascfb: 0 [] hascfu: 0 []
dialparties.agi: EXTENSION_STATE: 4 (UNKNOWN)
dialparties.agi: Extension 90000101 has ExtensionState: 4
-- dialparties.agi: Checking CW and CFB status for extension 90000101
-- dialparties.agi: dbset CALLTRACE/90000101 to 87152465820
> dialparties.agi: extnum 90007102 has: cw: 0; hascfb: 0 [] hascfu: 0 []
dialparties.agi: EXTENSION_STATE: 4 (UNKNOWN)
dialparties.agi: Extension 90007102 has ExtensionState: 4
-- dialparties.agi: Checking CW and CFB status for extension 90007102
-- dialparties.agi: dbset CALLTRACE/90007102 to 87152465820
-- dialparties.agi: Filtered ARG3: 90000101-90007102
> dialparties.agi: NODEST: 603 adding M(auto-blkvm) to dialopts: tTrwWM(auto-blkvm)
> dialparties.agi: NODEST: 603 blkvm enabled macro already in dialopts: tTrwWM(auto-blkvm)
dialparties.agi: Setting default NOANSWER DIALSTATUS since no extensions available
-- <SIP/502001-000002d0>AGI Script dialparties.agi completed, returning 0
-- Executing [s@macro-dial:4] NoOp("SIP/502001-000002d0", "Returned from dialparties with no extensions to call and DIALSTATUS: NOANSWER") in new stack
-- Executing [603@ext-group:14] Set("SIP/502001-000002d0", "RingGroupMethod=") in new stack
-- Executing [603@ext-group:15] GotoIf("SIP/502001-000002d0", "0?nodest") in new stack
-- Executing [603@ext-group:16] Set("SIP/502001-000002d0", "__NODEST=") in new stack
-- Executing [603@ext-group:17] DBdel("SIP/502001-000002d0", "BLKVM/603/SIP/502001-000002d0") in new stack
-- DBdel: family=BLKVM, key=603/SIP/502001-000002d0
-- Executing [603@ext-group:18] Goto("SIP/502001-000002d0", "ext-group,603,1") in new stack
-- Goto (ext-group,603,1)
-- Executing [603@ext-group:1] Macro("SIP/502001-000002d0", "user-callerid,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/502001-000002d0", "AMPUSER=87152465820") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("SIP/502001-000002d0", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("SIP/502001-000002d0", "0?Set(REALCALLERIDNUM=87152465820)") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/502001-000002d0", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/502001-000002d0", "AMPUSERCIDNAME=") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/502001-000002d0", "1?report") in new stack
-- Goto (macro-user-callerid,s,10)
-- Executing [s@macro-user-callerid:10] GotoIf("SIP/502001-000002d0", "0?continue") in new stack
-- Executing [s@macro-user-callerid:11] Set("SIP/502001-000002d0", "__TTL=63") in new stack
-- Executing [s@macro-user-callerid:12] GotoIf("SIP/502001-000002d0", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] NoOp("SIP/502001-000002d0", "Using CallerID "87152465820" <87152465820>") in new stack
-- Executing [603@ext-group:2] GotoIf("SIP/502001-000002d0", "0?skipdb") in new stack
-- Executing [603@ext-group:3] GotoIf("SIP/502001-000002d0", "0?skipov") in new stack
-- Executing [603@ext-group:4] Set("SIP/502001-000002d0", "__NODEST=") in new stack
-- Executing [603@ext-group:5] Set("SIP/502001-000002d0", "__BLKVM_OVERRIDE=BLKVM/603/SIP/502001-000002d0") in new stack
-- Executing [603@ext-group:6] Set("SIP/502001-000002d0", "__BLKVM_BASE=603") in new stack
-- Executing [603@ext-group:7] Set("SIP/502001-000002d0", "DB(BLKVM/603/SIP/502001-000002d0)=TRUE") in new stack
-- Executing [603@ext-group:8] Set("SIP/502001-000002d0", "RRNODEST=") in new stack
-- Executing [603@ext-group:9] Set("SIP/502001-000002d0", "__NODEST=603") in new stack
-- Executing [603@ext-group:10] Set("SIP/502001-000002d0", "RecordMethod=Group") in new stack
-- Executing [603@ext-group:11] Macro("SIP/502001-000002d0", "record-enable,90000101-90007102,Group") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("SIP/502001-000002d0", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] AGI("SIP/502001-000002d0", "recordingcheck,20120409-233748,1333993068.1813") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck,20120409-233748,1333993068.1813: No DB Entry AMPUSER/90000101/recording - Not Recording for 90000101, checking for others
recordingcheck,20120409-233748,1333993068.1813: No DB Entry AMPUSER/90007102/recording - Not Recording for 90007102, checking for others
-- <SIP/502001-000002d0>AGI Script recordingcheck completed, returning 0
-- Executing [s@macro-record-enable:5] MacroExit("SIP/502001-000002d0", "") in new stack
-- Executing [603@ext-group:12] Set("SIP/502001-000002d0", "RingGroupMethod=ringall") in new stack
-- Executing [603@ext-group:13] Macro("SIP/502001-000002d0", "dial,60,tTrwW,90000101-90007102") in new stack
-- Executing [s@macro-dial:1] GotoIf("SIP/502001-000002d0", "1?dial") in new stack
-- Goto (macro-dial,s,3)
-- Executing [s@macro-dial:3] AGI("SIP/502001-000002d0", "dialparties.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
dialparties.agi: Starting New Dialparties.agi
dialparties.agi: Caller ID name is '87152465820' number is '87152465820'
> dialparties.agi: USE_CONFIRMATION: 'FALSE'
> dialparties.agi: RINGGROUP_INDEX: ''
dialparties.agi: Methodology of ring is 'ringall'
-- dialparties.agi: Added extension 90000101 to extension map
-- dialparties.agi: Added extension 90007102 to extension map
-- dialparties.agi: Extension 90000101 cf is disabled
-- dialparties.agi: Extension 90007102 cf is disabled
-- dialparties.agi: Extension 90000101 do not disturb is disabled
-- dialparties.agi: Extension 90007102 do not disturb is disabled
> dialparties.agi: extnum 90000101 has: cw: 0; hascfb: 0 [] hascfu: 0 []
dialparties.agi: EXTENSION_STATE: 4 (UNKNOWN)
dialparties.agi: Extension 90000101 has ExtensionState: 4
-- dialparties.agi: Checking CW and CFB status for extension 90000101
-- dialparties.agi: dbset CALLTRACE/90000101 to 87152465820
> dialparties.agi: extnum 90007102 has: cw: 0; hascfb: 0 [] hascfu: 0 []
dialparties.agi: EXTENSION_STATE: 4 (UNKNOWN)
dialparties.agi: Extension 90007102 has ExtensionState: 4
-- dialparties.agi: Checking CW and CFB status for extension 90007102
-- dialparties.agi: dbset CALLTRACE/90007102 to 87152465820
-- dialparties.agi: Filtered ARG3: 90000101-90007102
> dialparties.agi: NODEST: 603 adding M(auto-blkvm) to dialopts: tTrwWM(auto-blkvm)
> dialparties.agi: NODEST: 603 blkvm enabled macro already in dialopts: tTrwWM(auto-blkvm)
-- <SIP/502001-000002d0>AGI Script dialparties.agi completed, returning 0
-- Executing [s@macro-dial:4] NoOp("SIP/502001-000002d0", "Returned from dialparties with no extensions to call and DIALSTATUS: NOANSWER") in new stack
... ну и так далее по кругу, на сколько я понял...
Звонок уходит в группу со стратегией "звонят-все", но пытаюсь добиться того, чтобы первый из телефонов группы звонил сразу, второй присоединился к нему через 7 секунд. Вроде бы этот код должен подождать как раз эти 7 секунд прежде чем начать звонить. Я ошибаюсь?