DumpChan не показал нужной переменной. Пробовал присваивать и с одним "_" и с двумя.
Код: Выделить всё
Dumping Info For Channel: Local/s@autodial_caller-000001b1;1:
================================================================================
Info:
Name= Local/s@autodial_caller-000001b1;1
Type= Local
UniqueID= 1428394318.1536
LinkedID= 1428394318.1536
CallerIDNum= 2008195
CallerIDName= XXX
ConnectedLineIDNum= 2008XXX
ConnectedLineIDName=XXX
DNIDDigits= (N/A)
RDNIS= (N/A)
Parkinglot=
Language= ru
State= Up (6)
Rings= 0
NativeFormat= (slin)
WriteFormat= slin
ReadFormat= slin
RawWriteFormat= slin
RawReadFormat= slin
WriteTranscode= No
ReadTranscode= No
1stFileDescriptor= -1
Framesin= 104
Framesout= 0
TimetoHangup= 0
ElapsedTime= 0h0m7s
DirectBridge= <none>
IndirectBridge= <none>
Context= autodial_voicer
Extension= s
Priority= 2
CallGroup=
PickupGroup=
Application= DumpChan
Data= (Empty)
Blocking_in= (Not Blocking)
Variables:
MEETTIME=18:00
PHONE2=NO
PHONE1=8905970XXXX
RECID=111
если делать как показал уважаемый virus_net, то имеет вот такое
Код: Выделить всё
-- Executing [s@autodial_caller:1] GotoIfTime("Local/s@autodial_caller-000001af;2", "8:59-18:01,*,*,*?valid_time:invalid_time") in new stack
-- Goto (autodial_caller,s,2)
-- Executing [s@autodial_caller:2] GotoIf("Local/s@autodial_caller-000001af;2", "1?start_dial:check_phone2") in new stack
-- Goto (autodial_caller,s,3)
-- Executing [s@autodial_caller:3] Set("Local/s@autodial_caller-000001af;2", [b]"__DIALEDNUMB=8905970XXXX[/b]") in new stack
-- Executing [s@autodial_caller:4] Dial("Local/s@autodial_caller-000001af;2", "SIP/4line_trunk/8905970XXXX,20,U(autodial_voicer)") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/4line_trunk/89059709897
> 0x92b2330 -- Probation passed - setting RTP source address to 80.91.XX.XX:17950
-- SIP/4line_trunk-00000294 is making progress passing it to Local/s@autodial_caller-000001af;2
> 0x92b2330 -- Probation passed - setting RTP source address to 80.91.XX.XX:17950
-- SIP/4line_trunk-00000294 is ringing
-- SIP/4line_trunk-00000294 answered Local/s@autodial_caller-000001af;2
-- SIP/4line_trunk-00000294 Internal Gosub(autodial_voicer,s,1) start
-- Executing [s@autodial_voicer:1] Answer("SIP/4line_trunk-00000294", "") in new stack
-- Executing [s@autodial_voicer:2] NoOp("SIP/4line_trunk-00000294", "") in new stack
-- Executing [s@autodial_voicer:3] NoOp("SIP/4line_trunk-00000294", "") in new stack
-- Executing [s@autodial_voicer:4] NoOp("SIP/4line_trunk-00000294", "DIALEDNUMB = 8905970XXXX") in new stack
-- Executing [s@autodial_voicer:5] Monitor("SIP/4line_trunk-00000294", "wav,/var/www/autodial.site.ru/recs/autodial/20150407/,m") in new stack
-- Executing [s@autodial_voicer:6] Set("SIP/4line_trunk-00000294", "DSTAT=ANSWERED-ABORTED") in new stack
-- Executing [s@autodial_voicer:7] Set("SIP/4line_trunk-00000294", "result=3") in new stack
-- Executing [s@autodial_voicer:8] Set("SIP/4line_trunk-00000294", "start_communication=13:23:44") in new stack
-- Executing [s@autodial_voicer:9] Wait("SIP/4line_trunk-00000294", "1") in new stack
> 0x92b2330 -- Probation passed - setting RTP source address to 80.91.XX.XX:17950
-- Executing [s@autodial_voicer:10] Playback("SIP/4line_trunk-00000294", "hello") in new stack
-- <SIP/4line_trunk-00000294> Playing 'hello.slin' (language 'ru')
-- Executing [s@autodial_voicer:11] Playback("SIP/4line_trunk-00000294", "vi_zapisani_na_priem") in new stack
-- <SIP/4line_trunk-00000294> Playing 'vi_zapisani_na_priem.slin' (language 'ru')
-- Executing [s@autodial_voicer:12] Playback("SIP/4line_trunk-00000294", "data_i_vremya_priema") in new stack
-- <SIP/4line_trunk-00000294> Playing 'data_i_vremya_priema.slin' (language 'ru')
-- Executing [s@autodial_voicer:13] Playback("SIP/4line_trunk-00000294", "dayofmonth:,say") in new stack
-- Executing [s@autodial_voicer:14] Playback("SIP/4line_trunk-00000294", "month:,say") in new stack
-- Executing [s@autodial_voicer:15] Playback("SIP/4line_trunk-00000294", "chas:,say") in new stack
-- Executing [s@autodial_voicer:16] Playback("SIP/4line_trunk-00000294", "minuta:,say") in new stack
-- Executing [s@autodial_voicer:17] BackGround("SIP/4line_trunk-00000294", "1_ili_2") in new stack
-- <SIP/4line_trunk-00000294> Playing '1_ili_2.slin' (language 'ru')
-- Executing [s@autodial_voicer:18] Set("SIP/4line_trunk-00000294", "result=4") in new stack
-- Executing [s@autodial_voicer:19] Set("SIP/4line_trunk-00000294", "DSTAT=ANSWERED") in new stack
-- Executing [s@autodial_voicer:20] WaitExten("SIP/4line_trunk-00000294", "2") in new stack
-- Timeout on SIP/4line_trunk-00000294, continuing...
-- Executing [s@autodial_voicer:21] BackGround("SIP/4line_trunk-00000294", "activatsiya_tonovogo") in new stack
-- <SIP/4line_trunk-00000294> Playing 'activatsiya_tonovogo.slin' (language 'ru')
-- Executing [s@autodial_voicer:22] WaitExten("SIP/4line_trunk-00000294", "8") in new stack
-- Timeout on SIP/4line_trunk-00000294, continuing...
-- Executing [s@autodial_voicer:23] BackGround("SIP/4line_trunk-00000294", "input_over") in new stack
-- <SIP/4line_trunk-00000294> Playing 'input_over.slin' (language 'ru')
-- Executing [s@autodial_voicer:24] BackGround("SIP/4line_trunk-00000294", "see_you") in new stack
-- <SIP/4line_trunk-00000294> Playing 'see_you.slin' (language 'ru')
-- Executing [s@autodial_voicer:25] Hangup("SIP/4line_trunk-00000294", "") in new stack
== Spawn extension (autodial_voicer, s, 25) exited non-zero on 'SIP/4line_trunk-00000294'
> Channel Local/s@autodial_caller-000001af;1 was answered
-- Executing [s@autodial_voicer:1] Answer("Local/s@autodial_caller-000001af;1", "") in new stack
-- Executing [s@autodial_voicer:2] NoOp("Local/s@autodial_caller-000001af;1", "[b]8905970XXXX[/b]") in new stack
-- Executing [s@autodial_voicer:3] NoOp("Local/s@autodial_caller-000001af;1", "NO") in new stack
-- Executing [s@autodial_voicer:4] NoOp("Local/s@autodial_caller-000001af;1", "DIALEDNUMB = """) in new stack
-- Executing [s@autodial_voicer:5] Monitor("Local/s@autodial_caller-000001af;1", "wav,/var/www/autodial.site.ru/recs/autodial/20150407/111,m") in new stack
-- Executing [s@autodial_voicer:6] Set("Local/s@autodial_caller-000001af;1", "DSTAT=ANSWERED-ABORTED") in new stack
-- Executing [s@autodial_voicer:7] Set("Local/s@autodial_caller-000001af;1", "result=3") in new stack
-- Executing [s@autodial_voicer:8] Set("Local/s@autodial_caller-000001af;1", "start_communication=13:24:17") in new stack
-- Executing [s@autodial_voicer:9] Wait("Local/s@autodial_caller-000001af;1", "1") in new stack
== Spawn extension (autodial_caller, s, 4) exited non-zero on 'Local/s@autodial_caller-000001af;2'
== Spawn extension (autodial_voicer, s, 9) exited non-zero on 'Local/s@autodial_caller-000001af;1'
-- Executing [h@autodial_voicer:1] Set("Local/s@autodial_caller-000001af;1", "end_communication=13:24:17") in new stack
-- Executing [h@autodial_voicer:2] Set("Local/s@autodial_caller-000001af;1", "ODBC_autodial_resultat1()=111,3,13:24:17,13:24:17,0,ANSWERED-ABORTED") in new stack
опция U я так понимаю значит типо GoSub когда случился Answer? то есть эта строчка отрабатывает exten=>s,n,Dial(SIP/4line_trunk/${PHONE1},20,U(autodial_voicer)), при этом переменная DIALEDNUMB передается, но теряются переменный заданные в колфайле. Потом происходит Return и так как в колфайле прописан контекст autodial_voicer то снова происходит переход в него и там уже нет переменной DIALEDNUMB, но есть переменные установленные в колфайле .