Уже поигрался. При исходящих что надо то и ставит. А вот при переключении подставляет CID звонящего.
Код: Выделить всё
voip*CLI>
-- Started music on hold, class 'default', on SIP/utde-000002a9
voip*CLI>
-- Stopped music on hold on SIP/utde-000002a9
voip*CLI>
== Spawn extension (from-internal-xfer, 9XX5278, 1) exited non-zero on 'SIP/utde-000002a9' in macro 'dial-one'
== Spawn extension (from-internal-xfer, 9XX5278, 1) exited non-zero on 'SIP/utde-000002a9' in macro 'exten-vm'
== Spawn extension (from-internal-xfer, 9XX5278, 1) exited non-zero on 'SIP/utde-000002a9'
-- Executing [9XX5278@from-internal-xfer:1] Macro("SIP/utde-000002a9", "user-callerid,SKIPTTL,") in new stack
voip*CLI>
-- Executing [s@macro-user-callerid:1] Set("SIP/utde-000002a9", "AMPUSER=791490XX192") in new stack
voip*CLI>
-- Executing [s@macro-user-callerid:2] GotoIf("SIP/utde-000002a9", "0?report") in new stack
voip*CLI>
-- Executing [s@macro-user-callerid:3] ExecIf("SIP/utde-000002a9", "0?Set(REALCALLERIDNUM=791490XX192)") in new stack
voip*CLI>
-- Executing [s@macro-user-callerid:4] Set("SIP/utde-000002a9", "AMPUSER=") in new stack
voip*CLI>
-- Executing [s@macro-user-callerid:5] Set("SIP/utde-000002a9", "AMPUSERCIDNAME=") in new stack
voip*CLI>
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/utde-000002a9", "1?report") in new stack
voip*CLI>
-- Goto (macro-user-callerid,s,10)
-- Executing [s@macro-user-callerid:10] GotoIf("SIP/utde-000002a9", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] Set("SIP/utde-000002a9", "CALLERID(number)=791490XX192") in new stack
voip*CLI>
-- Executing [s@macro-user-callerid:20] Set("SIP/utde-000002a9", "CALLERID(name)=") in new stack
-- Executing [s@macro-user-callerid:21] NoOp("SIP/utde-000002a9", "Using CallerID "" <791490XX192>") in new stack
-- Executing [9XX5278@from-internal-xfer:2] NoOp("SIP/utde-000002a9", "Calling Out Route: TDE-E1") in new stack
voip*CLI>
-- Executing [9XX5278@from-internal-xfer:3] Set("SIP/utde-000002a9", "MOHCLASS=default") in new stack
voip*CLI>
-- Executing [9XX5278@from-internal-xfer:4] Set("SIP/utde-000002a9", "_NODEST=") in new stack
voip*CLI>
-- Executing [9XX5278@from-internal-xfer:5] Macro("SIP/utde-000002a9", "record-enable,,OUT,") in new stack
voip*CLI>
-- Executing [s@macro-record-enable:1] GotoIf("SIP/utde-000002a9", "0?check") in new stack
voip*CLI>
-- Executing [s@macro-record-enable:2] ResetCDR("SIP/utde-000002a9", "w") in new stack
voip*CLI>
-- Executing [s@macro-record-enable:3] StopMixMonitor("SIP/utde-000002a9", "") in new stack
voip*CLI>
== MixMonitor close filestream
voip*CLI>
-- Executing [s@macro-record-enable:4] ExecIf("SIP/utde-000002a9", "1?MacroExit()") in new stack
voip*CLI>
-- Executing [9XX5278@from-internal-xfer:6] Macro("SIP/utde-000002a9", "dialout-trunk,3,9XX5278,") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:1] Set("SIP/utde-000002a9", "DIAL_TRUNK=3") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/utde-000002a9", "0?sub-pincheck,s,1") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/utde-000002a9", "0?disabletrunk,1") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:4] Set("SIP/utde-000002a9", "DIAL_NUMBER=9XX5278") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:5] Set("SIP/utde-000002a9", "DIAL_TRUNK_OPTIONS=tr") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:6] Set("SIP/utde-000002a9", "OUTBOUND_GROUP=OUT_3") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/utde-000002a9", "0?nomax") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:8] GotoIf("SIP/utde-000002a9", "0?chanfull") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/utde-000002a9", "0?skipoutcid") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:10] Set("SIP/utde-000002a9", "DIAL_TRUNK_OPTIONS=T") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:11] Macro("SIP/utde-000002a9", "outbound-callerid,3") in new stack
voip*CLI>
-- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/utde-000002a9", "0?Set(CALLERPRES()=)") in new stack
voip*CLI>
-- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/utde-000002a9", "0?Set(REALCALLERIDNUM=791490XX192)") in new stack
-- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/utde-000002a9", "0?normcid") in new stack
-- Executing [s@macro-outbound-callerid:4] Set("SIP/utde-000002a9", "USEROUTCID=791490XX192") in new stack
voip*CLI>
-- Executing [s@macro-outbound-callerid:5] GotoIf("SIP/utde-000002a9", "1?bypass") in new stack
voip*CLI>
-- Goto (macro-outbound-callerid,s,7)
voip*CLI>
-- Executing [s@macro-outbound-callerid:7] Set("SIP/utde-000002a9", "EMERGENCYCID=") in new stack
voip*CLI>
-- Executing [s@macro-outbound-callerid:8] Set("SIP/utde-000002a9", "TRUNKOUTCID=") in new stack
voip*CLI>
-- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/utde-000002a9", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,12)
voip*CLI>
-- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/utde-000002a9", "0?Set(CALLERID(all)=)") in new stack
voip*CLI>
-- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/utde-000002a9", "1?Set(CALLERID(all)=791490XX192)") in new stack
voip*CLI>
-- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/utde-000002a9", "0?Set(CALLERID(all)=)") in new stack
voip*CLI>
-- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/utde-000002a9", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:12] GosubIf("SIP/utde-000002a9", "1?sub-flp-3,s,1") in new stack
voip*CLI>
-- Executing [s@sub-flp-3:1] ExecIf("SIP/utde-000002a9", "1?Return()") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:13] Set("SIP/utde-000002a9", "OUTNUM=9XX5278") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:14] Set("SIP/utde-000002a9", "custom=SIP/utde") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/utde-000002a9", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:16] Macro("SIP/utde-000002a9", "dialout-trunk-predial-hook,") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/utde-000002a9", "") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/utde-000002a9", "0?bypass,1") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/utde-000002a9", "0?customtrunk") in new stack
voip*CLI>
-- Executing [s@macro-dialout-trunk:19] Dial("SIP/utde-000002a9", "SIP/utde/9XX5278,300,T") in new stack
voip*CLI>
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
voip*CLI>
Audio is at 19010
voip*CLI>
Adding codec 0x8 (alaw) to SDP
voip*CLI>
Adding codec 0x4 (ulaw) to SDP
voip*CLI>
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 192.168.100.100:5060:
INVITE sip:9XX5278@192.168.100.100:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.100.165:5060;branch=z9hG4bK587a54ff
Max-Forwards: 70
From: "791490XX192" <sip:791490XX192@192.168.100.165>;tag=as665122b1
To: <sip:9XX5278@192.168.100.100:5060>
Contact: <sip:791490XX192@192.168.100.165:5060>
Call-ID: 1d15f99a47612d596c00c3190fbc2d77@192.168.100.165:5060
CSeq: 102 INVITE
User-Agent: FPBX-2.8.1(1.8.11.0)
Date: Wed, 30 Jan 2013 01:53:26 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 265
v=0
o=root 250520029 250520029 IN IP4 192.168.100.165
s=Asterisk PBX 1.8.11.0
c=IN IP4 192.168.100.165
t=0 0
m=audio 19010 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
-- Called SIP/utde/9XX5278
voip*CLI>
== End MixMonitor Recording SIP/utde-000002a9
voip*CLI>
<--- SIP read from UDP:192.168.100.100:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.100.165:5060;branch=z9hG4bK587a54ff
To: sip:9XX5278@192.168.100.100
From: "791490XX192" <sip:791490XX192@192.168.100.165>;tag=as665122b1
Call-ID: 1d15f99a47612d596c00c3190fbc2d77@192.168.100.165:5060
CSeq: 102 INVITE
Content-Length: 0
<------------->
--- (7 headers 0 lines) ---
voip*CLI>
<--- SIP read from UDP:192.168.100.100:5060 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 192.168.100.165:5060;branch=z9hG4bK587a54ff
To: sip:9XX5278@192.168.100.100;tag=25150
From: "791490XX192" <sip:791490XX192@192.168.100.165>;tag=as665122b1
Call-ID: 1d15f99a47612d596c00c3190fbc2d77@192.168.100.165:5060
CSeq: 102 INVITE
Allow: INVITE,ACK,CANCEL,BYE,PRACK,OPTIONS,REGISTER,INFO,UPDATE
Server: Panasonic-MPR09-V4.1003/VSIPGW-V2.3001
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
set_destination: Parsing <sip:9XX5278@192.168.100.100:5060> for address/port to send to
set_destination: set destination to 192.168.100.100:5060
Transmitting (no NAT) to 192.168.100.100:5060:
ACK sip:9XX5278@192.168.100.100:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.100.165:5060;branch=z9hG4bK587a54ff
Max-Forwards: 70
From: "791490XX192" <sip:791490XX192@192.168.100.165>;tag=as665122b1
To: <sip:9XX5278@192.168.100.100:5060>;tag=25150
Contact: <sip:791490XX192@192.168.100.165:5060>
Call-ID: 1d15f99a47612d596c00c3190fbc2d77@192.168.100.165:5060
CSeq: 102 ACK
User-Agent: FPBX-2.8.1(1.8.11.0)
Content-Length: 0
---
voip*CLI>
Scheduling destruction of SIP dialog '1d15f99a47612d596c00c3190fbc2d77@192.168.100.165:5060' in 6400 ms (Method: INVITE)
voip*CLI>
== Everyone is busy/congested at this time (1:0/1/0)
-- Executing [s@macro-dialout-trunk:20] NoOp("SIP/utde-000002a9", "Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 34") in new stack
-- Executing [s@macro-dialout-trunk:21] Goto("SIP/utde-000002a9", "s-CONGESTION,1") in new stack
-- Goto (macro-dialout-trunk,s-CONGESTION,1)
voip*CLI>
-- Executing [s-CONGESTION@macro-dialout-trunk:1] Set("SIP/utde-000002a9", "RC=34") in new stack
voip*CLI>
-- Executing [s-CONGESTION@macro-dialout-trunk:2] Goto("SIP/utde-000002a9", "34,1") in new stack
voip*CLI>
-- Goto (macro-dialout-trunk,34,1)
voip*CLI>
-- Executing [34@macro-dialout-trunk:1] Goto("SIP/utde-000002a9", "continue,1") in new stack
voip*CLI>
-- Goto (macro-dialout-trunk,continue,1)
voip*CLI>
-- Executing [continue@macro-dialout-trunk:1] GotoIf("SIP/utde-000002a9", "1?noreport") in new stack
voip*CLI>
-- Goto (macro-dialout-trunk,continue,3)
voip*CLI>
-- Executing [continue@macro-dialout-trunk:3] NoOp("SIP/utde-000002a9", "TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 34 - failing through to other trunks") in new stack
voip*CLI>
-- Executing [continue@macro-dialout-trunk:4] Set("SIP/utde-000002a9", "CALLERID(number)=") in new stack
voip*CLI>
-- Executing [9XX5278@from-internal-xfer:7] Macro("SIP/utde-000002a9", "outisbusy,") in new stack
voip*CLI>
-- Executing [s@macro-outisbusy:1] Progress("SIP/utde-000002a9", "") in new stack
voip*CLI>
-- Executing [s@macro-outisbusy:2] GotoIf("SIP/utde-000002a9", "0?emergency,1") in new stack
voip*CLI>
-- Executing [s@macro-outisbusy:3] GotoIf("SIP/utde-000002a9", "0?intracompany,1") in new stack
voip*CLI>
-- Executing [s@macro-outisbusy:4] Playback("SIP/utde-000002a9", "all-circuits-busy-now&pls-try-call-later, noanswer") in new stack
voip*CLI>
-- <SIP/utde-000002a9> Playing 'all-circuits-busy-now.gsm' (language 'ru')
voip*CLI>
-- <SIP/utde-000002a9> Playing 'pls-try-call-later.gsm' (language 'ru')
voip*CLI>
-- Executing [s@macro-outisbusy:5] Congestion("SIP/utde-000002a9", "20") in new stack
voip*CLI>
<--- SIP read from UDP:192.168.100.100:5060 --->
BYE sip:3001@192.168.100.165:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.100.100:5060;branch=z9hG4bK000000a2;rport
Max-Forwards: 70
To: sip:3001@192.168.100.165;tag=as2019842d
From: sip:791490XX192@192.168.100.165;tag=1684
Call-ID: 0000296d-c308f0de1a5b10009f7d0080f0b97554@192.168.100.100
CSeq: 3 BYE
Authorization: Digest realm="asterisk", nonce="6a7dc252", algorithm=MD5, uri="sip:3001@192.168.100.165:5060", username="utde", response="b41a2d27bb26a6142f901ea3fa83099c"
Allow: INVITE,ACK,CANCEL,BYE,PRACK,OPTIONS,REGISTER,INFO,UPDATE
User-Agent: Panasonic-MPR09-V4.1003/VSIPGW-V2.3001
Content-Length: 0