Сообщений: 57
|
SIP дивайс и CID
Доброго времени суток уважаемые.
Ситуация такая, создал ЕКСТЕНШЕН SIP устройства, при звонке оно передает свое имя "1145", как сделать что бы в место этого в CID подставлялось значение Remote-Party-Id из SIP заголовка?
Делаю так:
[from-remotepartydid]
exten => s,1,Noop(Fixing)
exten => s,n,Set(pseudodid=${SIP_HEADER(Remote-Party-Id)})
exten => s,n,Set(pseudodid=${CUT(pseudodid,@,1)})
exten => s,n,Set(pseudodid=${CUT(pseudodid,:,2)})
exten => s,n,Set(CALLERID(num)=${pseudodid}) exten =>
s,n,Goto(from-internal,${EXTEN},1)
в extensions_custom.conf а в КОНТЕКСТЕ SIP ЭКСТЕНШЕНА прописываю from-remotepartydid в место from-internal.
Но звонок обрывается.
Лог:
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Using SIP VRTP TOS bits 136
== Using SIP VRTP CoS mark 6
тут звонок обрывается.
При использовании контекста from-internal получаю ЛОГ:
== 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 [1001@from-internal:1] Macro("SIP/1145-0000001f", "exten-vm,novm,1001") in new stack
-- Executing [s@macro-exten-vm:1] Macro("SIP/1145-0000001f", "user-callerid") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/1145-0000001f", "AMPUSER=1145") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("SIP/1145-0000001f", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("SIP/1145-0000001f", "1?Set(REALCALLERIDNUM=1145)") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/1145-0000001f", "AMPUSER=1145") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/1145-0000001f", "AMPUSERCIDNAME=GSMTOSIP1") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/1145-0000001f", "0?report") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/1145-0000001f", "AMPUSERCID=1145") in new stack
-- Executing [s@macro-user-callerid:8] Set("SIP/1145-0000001f", "CALLERID(all)="GSMTOSIP1" <1145>") in new stack
-- Executing [s@macro-user-callerid:9] ExecIf("SIP/1145-0000001f", "0?Set(CHANNEL(language)=)") in new stack
-- Executing [s@macro-user-callerid:10] GotoIf("SIP/1145-0000001f", "0?continue") in new stack
-- Executing [s@macro-user-callerid:11] Set("SIP/1145-0000001f", "__TTL=64") in new stack
-- Executing [s@macro-user-callerid:12] GotoIf("SIP/1145-0000001f", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] NoOp("SIP/1145-0000001f", "Using CallerID "GSMTOSIP1" <1145>") in new stack
-- Executing [s@macro-exten-vm:2] Set("SIP/1145-0000001f", "RingGroupMethod=none") in new stack
-- Executing [s@macro-exten-vm:3] Set("SIP/1145-0000001f", "VMBOX=novm") in new stack
-- Executing [s@macro-exten-vm:4] Set("SIP/1145-0000001f", "EXTTOCALL=1001") in new stack
-- Executing [s@macro-exten-vm:5] Set("SIP/1145-0000001f", "CFUEXT=") in new stack
-- Executing [s@macro-exten-vm:6] Set("SIP/1145-0000001f", "CFBEXT=") in new stack
-- Executing [s@macro-exten-vm:7] Set("SIP/1145-0000001f", "RT=""") in new stack
-- Executing [s@macro-exten-vm:8] Macro("SIP/1145-0000001f", "record-enable,1001,IN") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("SIP/1145-0000001f", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] AGI("SIP/1145-0000001f", "recordingcheck,20101228-032552,1293488752.31") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck,20101228-032552,1293488752.31: Inbound recording enabled.
recordingcheck,20101228-032552,1293488752.31: CALLFILENAME=20101228-032552-1293488752.31
-- <SIP/1145-0000001f>AGI Script recordingcheck completed, returning 0
-- Executing [s@macro-record-enable:999] MixMonitor("SIP/1145-0000001f", "20101228-032552-1293488752.31.wav,,") in new stack
-- Executing [s@macro-exten-vm:9] Macro("SIP/1145-0000001f", "dial,"",tr,1001") in new stack
-- Executing [s@macro-dial:1] GotoIf("SIP/1145-0000001f", "1?dial") in new stack
== Begin MixMonitor Recording SIP/1145-0000001f
-- Goto (macro-dial,s,3)
-- Executing [s@macro-dial:3] AGI("SIP/1145-0000001f", "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 'GSMTOSIP1' number is '1145'
dialparties.agi: Methodology of ring is 'none'
-- dialparties.agi: Added extension 1001 to extension map
-- dialparties.agi: Extension 1001 cf is disabled
-- dialparties.agi: Extension 1001 do not disturb is disabled
dialparties.agi: EXTENSION_STATE: 0 (NOT_INUSE)
-- dialparties.agi: dbset CALLTRACE/1001 to 1145
-- dialparties.agi: Filtered ARG3: 1001
-- <SIP/1145-0000001f>AGI Script dialparties.agi completed, returning 0
-- Executing [s@macro-dial:7] Dial("SIP/1145-0000001f", "SIP/1001,"",tr") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Using SIP VRTP TOS bits 136
== Using SIP VRTP CoS mark 6
-- Called 1001
-- SIP/1001-00000020 is ringing
Звонок проходит, CID не получаю...
Прошу помощи уважаемые!
|