VIDEOCHAT  ::   FAQ  ::   Поиск  ::   Регистрация  ::   Вход

Проблема при установке переадресации.

Проблемы Asterisk без вэб-оболочек и их решения

Модераторы: april22, Zavr2008

Ответить
nickolay
Сообщения: 9
Зарегистрирован: 20 сен 2010, 21:57
Откуда: Москва

Проблема при установке переадресации.

Сообщение nickolay »

Добрый вечер!
Прошу помощи в решении следующего вопроса. Возникла необходимость установки переадресаций на абонентах.
Схема следующая: абонент получает номер телефона в коде 84991234567. Этот номер приходит на EWSD, а далее по PRI пробрасывается на asterisk.
На asterisk'е он попадает в контекст incoming_pri, в котором проверяется, есть ли у абонента переадресация или нет. Если есть,то переадресация выполняется, если нет, то номер по SIP пробрасывается на SoftSwitch и уходит на абонента.
Проблема собственно в следующем: когда выполняется переадресация должно приходить 3 поля (номер с которого звонили, номер с которого произошла переадресация и номер куда произошла переадресация)
В итоге вызов проходит, но на EWSD не видно номера КУДА ПРОИЗОШЛА ПЕРЕАДРЕСАЦИЯ.
В ответ приходит:

< Cause (len= 6) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Public network serving the local user (2)
< Ext: 1 Cause: Info. element nonexist or not implemented (99), class = Protocol Error (e.g. unknown message) (6) ]
< Cause data 1: 98 (152, Non-Locking Shift To Codeset 0 IE)
< Cause data 2: 74 (116, Redirecting Number IE)

Как я понимаю, это говорит о том, что сообщение не поддерживается EWSD. Может быть, кто-нибудь сталкивался с данной проблемой.

Дебаг PRI:

Входящий по PRI:

< Protocol Discriminator: Q.931 (8) len=48
< TEI=0 Call Ref: len= 2 (reference 150/0x96) (Sent from originator)
< Message Type: SETUP (5)
< [04 03 80 90 a3]
< Bearer Capability (len= 5) [ Ext: 1 Q.931 Std: 0 Info transfer capability: Speech (0)
< Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
< User information layer 1: A-Law (35)
< [18 03 a9 83 83]
< Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Exclusive Dchan: 0
< ChanSel: As indicated in following octets
< Ext: 1 Coding: 0 Number Specified Channel Type: 3
< Ext: 1 Channel: 3 Type: CPE]
< [6c 0d 00 81 38 34 39 39 34 31 38 30 30 32 31]
< Calling Number (len=15) [ Ext: 0 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0)
< Presentation: Presentation permitted, user number passed network screening (1) '84991234567' ]
< [70 0c 81 38 34 39 39 34 31 38 30 32 30 32]
< Called Number (len=14) [ Ext: 1 TON: Unknown Number Type (0) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1) '84990000000' ]
< [7d 02 91 81]
< IE: High-layer Compatibility (len = 4)
-- Making new call for cref 150
Received message for call 0x92f9c90 on 0x9591bd0 TEI/SAPI 0/0, call->pri is 0x9591bd0 TEI/SAPI 0/0
-- Processing Q.931 Call Setup
-- Processing IE 4 (cs0, Bearer Capability)
-- Processing IE 24 (cs0, Channel Identification)
-- Processing IE 108 (cs0, Calling Party Number)
-- Processing IE 112 (cs0, Called Party Number)
-- Processing IE 125 (cs0, High-layer Compatibility)
q931.c:6871 post_handle_q931_message: Call 150 enters state 6 (Call Present). Hold state: Unknown
q931.c:4524 q931_call_proceeding: Call 150 enters state 9 (Incoming Call Proceeding). Hold state: Unknown

> DL-DATA request
> Protocol Discriminator: Q.931 (8) len=10
> TEI=0 Call Ref: len= 2 (reference 150/0x96) (Sent to originator)
> Message Type: CALL PROCEEDING (2)
TEI=0 Transmitting N(S)=44, window is open V(A)=44 K=7

> Protocol Discriminator: Q.931 (8) len=10
> TEI=0 Call Ref: len= 2 (reference 150/0x96) (Sent to originator)
> Message Type: CALL PROCEEDING (2)
> [18 03 a9 83 83]
> Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Exclusive Dchan: 0
> ChanSel: As indicated in following octets
> Ext: 1 Coding: 0 Number Specified Channel Type: 3
> Ext: 1 Channel: 3 Type: CPE]
-- Accepting call from '84991234567' to '84990000000' on channel 0/3, span 1

Звонок ложится на dialplan:

-- Executing [84990000000@incoming_pri:1] NoOp("DAHDI/1-1", """ <84991234567>") in new stack
-- Executing [84990000000@incoming_pri:2] Set("DAHDI/1-1", "diviact_84990000000=") in new stack
-- Executing [84990000000@incoming_pri:3] NoOp("DAHDI/1-1", "") in new stack
-- Executing [84990000000@incoming_pri:4] GotoIf("DAHDI/1-1", "1?:okdiviact") in new stack
-- Executing [84990000000@incoming_pri:5] Set("DAHDI/1-1", "diviparact0_84990000000=") in new stack
-- Executing [84990000000@incoming_pri:6] Set("DAHDI/1-1", "diviparact1_84990000000=") in new stack
-- Executing [84990000000@incoming_pri:7] Set("DAHDI/1-1", "diviparact2_84990000000=") in new stack
-- Executing [84990000000@incoming_pri:8] Set("DAHDI/1-1", "diviparact3_84990000000=") in new stack
-- Executing [84990000000@incoming_pri:9] NoOp("DAHDI/1-1", "") in new stack
-- Executing [84990000000@incoming_pri:10] NoOp("DAHDI/1-1", "") in new stack
-- Executing [84990000000@incoming_pri:11] NoOp("DAHDI/1-1", "") in new stack
-- Executing [84990000000@incoming_pri:12] NoOp("DAHDI/1-1", "") in new stack
-- Executing [84990000000@incoming_pri:13] GotoIf("DAHDI/1-1", "1?:okdiviparact0") in new stack
-- Executing [84990000000@incoming_pri:14] Set("DAHDI/1-1", "diviciclact0_84990000000=") in new stack
-- Executing [84990000000@incoming_pri:15] Set("DAHDI/1-1", "diviciclact1_84990000000=") in new stack
-- Executing [84990000000@incoming_pri:16] Set("DAHDI/1-1", "diviciclact2_84990000000=") in new stack
-- Executing [84990000000@incoming_pri:17] Set("DAHDI/1-1", "diviciclact3_84990000000=") in new stack
-- Executing [84990000000@incoming_pri:18] GotoIf("DAHDI/1-1", "1?:okdiviciclact0") in new stack
-- Executing [84990000000@incoming_pri:19] NoOp("DAHDI/1-1", "") in new stack
-- Executing [84990000000@incoming_pri:20] NoOp("DAHDI/1-1", "") in new stack
-- Executing [84990000000@incoming_pri:21] NoOp("DAHDI/1-1", "") in new stack
-- Executing [84990000000@incoming_pri:22] NoOp("DAHDI/1-1", "") in new stack
-- Executing [84990000000@incoming_pri:23] Gosub("DAHDI/1-1", "divipriext|84990000000|1") in new stack
-- Executing [84990000000@divipriext:1] Set("DAHDI/1-1", "CALLERID(num)=4991234567") in new stack
-- Executing [84990000000@divipriext:2] SetCallerPres("DAHDI/1-1", "allowed_not_screened") in new stack
-- Executing [84990000000@divipriext:3] Set("DAHDI/1-1", "CALLERID(RDNIS)=84990000000") in new stack
-- Executing [84990000000@divipriext:4] Dial("DAHDI/1-1", "DAHDI/g1/84991111111") in new stack
-- Making new call for cref 32805
-- Requested transfer capability: 0x00 - SPEECH

> DL-DATA request
> Protocol Discriminator: Q.931 (8) len=60
> TEI=0 Call Ref: len= 2 (reference 37/0x25) (Sent from originator)
> Message Type: SETUP (5)
TEI=0 Transmitting N(S)=37, window is open V(A)=36 K=7

> Protocol Discriminator: Q.931 (8) len=60
> TEI=0 Call Ref: len= 2 (reference 37/0x25) (Sent from originator)
> Message Type: SETUP (5)
> [04 03 80 90 a3]
> Bearer Capability (len= 5) [ Ext: 1 Q.931 Std: 0 Info transfer capability: Speech (0)
> Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
> User information layer 1: A-Law (35)
> [18 03 a1 83 83]
> Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Preferred Dchan: 0
> ChanSel: As indicated in following octets
> Ext: 1 Coding: 0 Number Specified Channel Type: 3
> Ext: 1 Channel: 3 Type: CPE]
> [6c 0c 21 81 34 39 39 34 31 38 30 30 32 31]
> Calling Number (len=14) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
> Presentation: Presentation permitted, user number passed network screening (1) '4991234567' ]
> [70 0c 80 38 39 31 36 36 36 36 33 38 39 38]
> Called Number (len=14) [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0) '84991111111' ]
> [74 0e 21 00 8f 38 34 39 39 34 31 38 30 32 30 32]
> Redirecting Number (len=16) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
> Ext: 0 Presentation: Presentation permitted, user number not screened (0)
> Ext: 1 Reason: Forwarded unconditionally (15) '84990000000' ]
> [a1]
> Sending Complete (len= 1)

Звонок уходит на абонента C:

q931.c:4959 q931_setup: Call 32805 enters state 1 (Call Initiated). Hold state: Unknown
-- Called g1/84991111111

< Protocol Discriminator: Q.931 (8) len=14
< TEI=0 Call Ref: len= 2 (reference 37/0x25) (Sent to originator)
< Message Type: STATUS (125)
< [08 04 82 e3 98 74]
< Cause (len= 6) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Public network serving the local user (2)
< Ext: 1 Cause: Info. element nonexist or not implemented (99), class = Protocol Error (e.g. unknown message) (6) ]
< Cause data 1: 98 (152, Non-Locking Shift To Codeset 0 IE)
< Cause data 2: 74 (116, Redirecting Number IE)
< [14 01 01]
< Call State (len= 3) [ Ext: 0 Coding: CCITT (ITU) standard (0) Call state: Call Initiated (1)
Received message for call 0x9598d30 on 0x9591bd0 TEI/SAPI 0/0, call->pri is 0x9591bd0 TEI/SAPI 0/0
-- Processing IE 8 (cs0, Cause)
-- Processing IE 20 (cs0, Call State)

< Protocol Discriminator: Q.931 (8) len=10
< TEI=0 Call Ref: len= 2 (reference 37/0x25) (Sent to originator)
< Message Type: CALL PROCEEDING (2)
< [18 03 a9 83 83]
< Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Exclusive Dchan: 0
< ChanSel: As indicated in following octets
< Ext: 1 Coding: 0 Number Specified Channel Type: 3
< Ext: 1 Channel: 3 Type: CPE]
Received message for call 0x9598d30 on 0x9591bd0 TEI/SAPI 0/0, call->pri is 0x9591bd0 TEI/SAPI 0/0
-- Processing IE 24 (cs0, Channel Identification)
q931.c:6998 post_handle_q931_message: Call 32805 enters state 3 (Outgoing Call Proceeding). Hold state: Unknown
-- DAHDI/3-1 is proceeding passing it to DAHDI/1-1

< Protocol Discriminator: Q.931 (8) len=5
< TEI=0 Call Ref: len= 2 (reference 37/0x25) (Sent to originator)
< Message Type: ALERTING (1)
Received message for call 0x9598d30 on 0x9591bd0 TEI/SAPI 0/0, call->pri is 0x9591bd0 TEI/SAPI 0/0
q931.c:6888 post_handle_q931_message: Call 32805 enters state 4 (Call Delivered). Hold state: Unknown
-- DAHDI/3-1 is ringing
q931.c:4552 q931_alerting: Call 149 enters state 7 (Call Received). Hold state: Unknown

> DL-DATA request
> Protocol Discriminator: Q.931 (8) len=9
> TEI=0 Call Ref: len= 2 (reference 149/0x95) (Sent to originator)
> Message Type: ALERTING (1)
TEI=0 Transmitting N(S)=38, window is open V(A)=38 K=7

> Protocol Discriminator: Q.931 (8) len=9
> TEI=0 Call Ref: len= 2 (reference 149/0x95) (Sent to originator)
> Message Type: ALERTING (1)
> [1e 02 81 88]
> Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Private network serving the local user (1)
> Ext: 1 Progress Description: Inband information or appropriate pattern now available. (8) ]

< Protocol Discriminator: Q.931 (8) len=30
< TEI=0 Call Ref: len= 2 (reference 37/0x25) (Sent to originator)
< Message Type: CONNECT (7)
< [29 05 0a 09 14 0b 15]
< Time Date (len= 7) [ 10-09-20 11:21 ]
< [4c 10 00 83 38 31 30 37 39 31 36 36 36 36 33 38 39 38]
< Connected Number (len=18) [ Ext: 0 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0)
< Ext: 1 Presentation: Presentation allowed of network provided number (3) '74991111111' ]
Происходит соединение с номером 74991111111.
Received message for call 0x9598d30 on 0x9591bd0 TEI/SAPI 0/0, call->pri is 0x9591bd0 TEI/SAPI 0/0
-- Processing IE 41 (cs0, Date/Time)
-- Processing IE 76 (cs0, Connected Number)
q931.c:6919 post_handle_q931_message: Call 32805 enters state 10 (Active). Hold state: Unknown

> DL-DATA request
> Protocol Discriminator: Q.931 (8) len=5
> TEI=0 Call Ref: len= 2 (reference 37/0x25) (Sent from originator)
> Message Type: CONNECT ACKNOWLEDGE (15)
TEI=0 Transmitting N(S)=39, window is open V(A)=39 K=7

> Protocol Discriminator: Q.931 (8) len=5
> TEI=0 Call Ref: len= 2 (reference 37/0x25) (Sent from originator)
> Message Type: CONNECT ACKNOWLEDGE (15)
-- DAHDI/3-1 answered DAHDI/1-1
q931.c:4683 q931_connect: Call 149 enters state 8 (Connect Request). Hold state: Unknown

> DL-DATA request
> Protocol Discriminator: Q.931 (8) len=14
> TEI=0 Call Ref: len= 2 (reference 149/0x95) (Sent to originator)
> Message Type: CONNECT (7)
TEI=0 Transmitting N(S)=40, window is open V(A)=39 K=7

> Protocol Discriminator: Q.931 (8) len=14
> TEI=0 Call Ref: len= 2 (reference 149/0x95) (Sent to originator)
> Message Type: CONNECT (7)
> [18 03 a9 83 81]
> Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Exclusive Dchan: 0
> ChanSel: As indicated in following octets
> Ext: 1 Coding: 0 Number Specified Channel Type: 3
> Ext: 1 Channel: 1 Type: CPE]
> [1e 02 81 82]
> Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Private network serving the local user (1)
> Ext: 1 Progress Description: Called equipment is non-ISDN. (2) ]
-- Native bridging DAHDI/1-1 and DAHDI/3-1

< Protocol Discriminator: Q.931 (8) len=5
< TEI=0 Call Ref: len= 2 (reference 149/0x95) (Sent from originator)
< Message Type: CONNECT ACKNOWLEDGE (15)
Received message for call 0x92f9c90 on 0x9591bd0 TEI/SAPI 0/0, call->pri is 0x9591bd0 TEI/SAPI 0/0
q931.c:7024 post_handle_q931_message: Call 149 enters state 10 (Active). Hold state: Unknown

< Protocol Discriminator: Q.931 (8) len=13
< TEI=0 Call Ref: len= 2 (reference 37/0x25) (Sent to originator)
< Message Type: DISCONNECT (69)
< [08 02 80 90]
< Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: User (0)
< Ext: 1 Cause: Normal Clearing (16), class = Normal Event (1) ]
< [1e 02 82 88]
< Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Public network serving the local user (2)
< Ext: 1 Progress Description: Inband information or appropriate pattern now available. (8) ]
Received message for call 0x9598d30 on 0x9591bd0 TEI/SAPI 0/0, call->pri is 0x9591bd0 TEI/SAPI 0/0
-- Processing IE 8 (cs0, Cause)
-- Processing IE 30 (cs0, Progress Indicator)
-- Found active call: 0x9598d30 cref:32805
q931.c:7201 post_handle_q931_message: Call 32805 enters state 12 (Disconnect Indication). Hold state: Unknown
-- Channel 0/3, span 1 got hangup request, cause 16
q931_hangup: other hangup
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Disconnect Indication, peerstate Disconnect Request, hold-state Unknown
q931.c:4721 q931_release: Call 32805 enters state 19 (Release Request). Hold state: Unknown

> DL-DATA request
> Protocol Discriminator: Q.931 (8) len=9
> TEI=0 Call Ref: len= 2 (reference 37/0x25) (Sent from originator)
> Message Type: RELEASE (77)
TEI=0 Transmitting N(S)=41, window is open V(A)=41 K=7

> Protocol Discriminator: Q.931 (8) len=9
> TEI=0 Call Ref: len= 2 (reference 37/0x25) (Sent from originator)
> Message Type: RELEASE (77)
> [08 02 81 90]
> Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Private network serving the local user (1)
> Ext: 1 Cause: Normal Clearing (16), class = Normal Event (1) ]
-- Hungup 'DAHDI/3-1'
== Spawn extension (divipriext, 84990000000, 4) exited non-zero on 'DAHDI/1-1'
q931_hangup: other hangup
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Active, peerstate Active, hold-state Unknown
q931.c:4768 q931_disconnect: Call 149 enters state 11 (Disconnect Request). Hold state: Unknown

> DL-DATA request
> Protocol Discriminator: Q.931 (8) len=9
> TEI=0 Call Ref: len= 2 (reference 149/0x95) (Sent to originator)
> Message Type: DISCONNECT (69)
TEI=0 Transmitting N(S)=42, window is open V(A)=41 K=7

> Protocol Discriminator: Q.931 (8) len=9
> TEI=0 Call Ref: len= 2 (reference 149/0x95) (Sent to originator)
> Message Type: DISCONNECT (69)
> [08 02 81 90]
> Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Private network serving the local user (1)
> Ext: 1 Cause: Normal Clearing (16), class = Normal Event (1) ]
-- Hungup 'DAHDI/1-1'

< Protocol Discriminator: Q.931 (8) len=5
< TEI=0 Call Ref: len= 2 (reference 37/0x25) (Sent to originator)
< Message Type: RELEASE COMPLETE (90)
Received message for call 0x9598d30 on 0x9591bd0 TEI/SAPI 0/0, call->pri is 0x9591bd0 TEI/SAPI 0/0
q931.c:7083 post_handle_q931_message: Call 32805 enters state 0 (Null). Hold state: Unknown
q931_hangup: other hangup
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Null, peerstate Null, hold-state Unknown
NEW_HANGUP DEBUG: Destroying the call, ourstate Null, peerstate Null, hold-state Unknown

< Protocol Discriminator: Q.931 (8) len=5
< TEI=0 Call Ref: len= 2 (reference 149/0x95) (Sent from originator)
< Message Type: RELEASE (77)
Received message for call 0x92f9c90 on 0x9591bd0 TEI/SAPI 0/0, call->pri is 0x9591bd0 TEI/SAPI 0/0
q931.c:7123 post_handle_q931_message: Call 149 enters state 0 (Null). Hold state: Unknown
q931_hangup: other hangup
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Null, peerstate Release Request, hold-state Unknown

> DL-DATA request
> Protocol Discriminator: Q.931 (8) len=9
> TEI=0 Call Ref: len= 2 (reference 149/0x95) (Sent to originator)
> Message Type: RELEASE COMPLETE (90)
TEI=0 Transmitting N(S)=43, window is open V(A)=43 K=7

> Protocol Discriminator: Q.931 (8) len=9
> TEI=0 Call Ref: len= 2 (reference 149/0x95) (Sent to originator)
> Message Type: RELEASE COMPLETE (90)
> [08 02 81 90]
> Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Private network serving the local user (1)
> Ext: 1 Cause: Normal Clearing (16), class = Normal Event (1) ]
q931_hangup: other hangup
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Null, peerstate Null, hold-state Unknown
NEW_HANGUP DEBUG: Destroying the call, ourstate Null, peerstate Null, hold-state Unknown
localhost*CLI>

Конфигурация chan_dahdi.conf

[trunkgroups]

[channels]
group=1
context=incoming_pri
signalling=pri_cpe
switchtype=euroisdn
pridialplan => unknown
prilocaldialplan => national
hidecallerid=no
callwaiting=no
callwaitingcallerid=yes
threewaycalling=no
transfer=yes
cancallforward=no
echocancel=no
echocancelwhenbridged=no
pickupgroup=1
callgroup=1
immediate=no
callprogress=no
callerid=asreceived
channel => 1-15,17-30
overlapdial=no
resetinterval=never
relaxdtmf=yes
rxgain=0.3
txgain=0.3
faxdetect=both
faxbuffers=>8,full

Конфигурация extensions_divi.conf.

[incoming_pri] ; входящий звонок приходит из PRI и уходит в PRI, если есть переадресация. Если нет, то в SIP.
exten => _849XXXXXXXX,1,NoOp(${CALLERID(all)})
exten => _849XXXXXXXX,n,Set(diviact_${EXTEN}=${DB(diviact/diviactvar_${EXTEN})})
exten => _849XXXXXXXX,n,NoOp(${diviact_${EXTEN}})
exten => _849XXXXXXXX,n,GotoIf($[${ISNULL(${diviact_${EXTEN}})}]?:okdiviact)
; При параллельном вызове, должен проверяться на существование 0 номер, при удалении его, на его место должен вставать следующий по-списку за ним.
exten => _849XXXXXXXX,n,Set(diviparact0_${EXTEN}=${DB(diviparact/diviparactvar0_${EXTEN})})
exten => _849XXXXXXXX,n,Set(diviparact1_${EXTEN}=${DB(diviparact/diviparactvar1_${EXTEN})})
exten => _849XXXXXXXX,n,Set(diviparact2_${EXTEN}=${DB(diviparact/diviparactvar2_${EXTEN})})
exten => _849XXXXXXXX,n,Set(diviparact3_${EXTEN}=${DB(diviparact/diviparactvar3_${EXTEN})})
; Аналогично с параллельным вызовом. Если нулевого номера нет, то осуществляем сдвиг номеров и переход к соответсвующей метке в диалплане.
exten => _849XXXXXXXX,n,NoOp(${diviparact0_${EXTEN}})
exten => _849XXXXXXXX,n,NoOp(${diviparact1_${EXTEN}})
exten => _849XXXXXXXX,n,NoOp(${diviparact2_${EXTEN}})
exten => _849XXXXXXXX,n,NoOp(${diviparact3_${EXTEN}})
exten => _849XXXXXXXX,n,GotoIf($[${ISNULL(${diviparact0_${EXTEN}})}]?:okdiviparact0)
exten => _849XXXXXXXX,n,Set(diviciclact0_${EXTEN}=${DB(diviciclact/diviciclactvar0_${EXTEN})})
exten => _849XXXXXXXX,n,Set(diviciclact1_${EXTEN}=${DB(diviciclact/diviciclactvar1_${EXTEN})})
exten => _849XXXXXXXX,n,Set(diviciclact2_${EXTEN}=${DB(diviciclact/diviciclactvar2_${EXTEN})})
exten => _849XXXXXXXX,n,Set(diviciclact3_${EXTEN}=${DB(diviciclact/diviciclactvar3_${EXTEN})})
exten => _849XXXXXXXX,n,GotoIf($[${ISNULL(${diviciclact0_${EXTEN}})}]?:okdiviciclact0)
exten => _849XXXXXXXX,n,NoOp(${diviciclact0_${EXTEN}})
exten => _849XXXXXXXX,n,NoOp(${diviciclact1_${EXTEN}})
exten => _849XXXXXXXX,n,NoOp(${diviciclact2_${EXTEN}})
exten => _849XXXXXXXX,n,NoOp(${diviciclact3_${EXTEN}})
exten => _849XXXXXXXX,n,Dial(SIP/TRUNK/${EXTEN})
exten => _849XXXXXXXX,n,Hangup()
exten => _849XXXXXXXX,n(okdiviact),Gosub(divipri,${EXTEN},1)
exten => _849XXXXXXXX,n,Hangup()
exten => _849XXXXXXXX,n(okdiviparact0),Gosub(diviparpri,${EXTEN},1)
exten => _849XXXXXXXX,n,Hangup()
exten => _849XXXXXXXX,n(okdiviciclact0),Gosub(diviciclpri,${EXTEN},1)

; Обычная переадресация на один номер телефона
[divipri]

exten => _849XXXXXXXX,1,Set(diviact_${EXTEN}=${DB(diviact/diviactvar_${EXTEN})})
;exten => _849XXXXXXXX,n,Set(CALLERID(num)=${EXTEN:1})
;exten => _849XXXXXXXX,n,Set(CALLERID(rdnis)=${EXTEN:1})
exten => _849XXXXXXXX,n,Set(CALLERID(num)=${CALLERID(ani):1})
exten => _849XXXXXXXX,n,Set(CALLERID(rdnis)=${CALLERID(ani):1})
exten => _849XXXXXXXX,n,Dial(DAHDI/g1/${diviact_${EXTEN}})
exten => _849XXXXXXXX,n,Hangup()

[divipriext]
exten => _849XXXXXXXX,1,Set(CALLERID(num)=${CALLERID(ani):1})
exten => _849XXXXXXXX,n,SetCallerPres(allowed_not_screened)
exten => _849XXXXXXXX,n,Set(CALLERID(RDNIS)=${EXTEN})
;ПРобовал и RDNIS и DNID
;exten => _849XXXXXXXX,n,Set(CALLERID(DNID)=${EXTEN})
exten => _849XXXXXXXX,n,Dial(DAHDI/g1/${diviact_${EXTEN}})
exten => _849XXXXXXXX,n,Hangup()

; Параллельная переадресация для PRI
[divipripar]
exten => _849XXXXXXXX,1,Set(CALLERID(rdnis)=${EXTEN})
exten => _849XXXXXXXX,n,Dial(dahdi/g2/${diviparact0_${EXTEN}}&dahdi/g2/${diviparact1_${EXTEN}}&dahdi/g2/${diviparact2_${EXTEN}}&dahdi/g2/${diviparact3_${EXTEN}})
exten => _849XXXXXXXX,n,Hangup()

; Цикличная переадресация для PRI
[diviciclpri]
exten => _849XXXXXXXX,1,Set(CALLERID(rdnis)=${EXTEN})
exten => _849XXXXXXXX,n,Dial(dahdi/g2/${diviciclact0_${EXTEN}},10)
exten => _849XXXXXXXX,n,Dial(dahdi/g2/${diviciclact1_${EXTEN}},10)
exten => _849XXXXXXXX,n,Dial(dahdi/g2/${diviciclact2_${EXTEN}},10)
exten => _849XXXXXXXX,n,Dial(dahdi/g2/${diviciclact3_${EXTEN}},10)
exten => _849XXXXXXXX,n,Hangup()

[root@localhost asterisk]#

Пока пробую только безусловную переадресацию. Остальные я не трогал. Работаю с контекстом divipri. Переадресация происходит с номера в коде 84990000000 на номер 84991111111.

84991234567 - номер с которого звоню (А номер)
84990000000 - номер на который я звоню (Б номер)
84991111111 - номер на который происходит переадресация с номера Б (С номер).

Завтра буду пробовать по ОКС7 соединить Asterisk и EWSD.
Также есть вопрос, если сие не получится на *, то есть ли альтернативы.
ded
Сообщения: 15621
Зарегистрирован: 26 авг 2010, 19:00

Re: Проблема при установке переадресации.

Сообщение ded »

Идентификация вызывающей, вызываемой и переадресованной сторон производится на основании данных, содержащихся в информационных элементах Calling Party Number, Called Party Number и Redirecting Number сообщения IAM ISUP (Rec. ETS 300 121 ETSI, или Q.767 ITU-T) или SETUP (ISDN Rec. Q.931 ITU-T)).
Вопробуйте выгрузить при входящем звонке состояние
exten => _849XXXXXXXX,1,NoOp(${CALLERID(rdnis)})
exten => _849XXXXXXXX,1,NoOp(${CALLERID(dnid)})
exten => _849XXXXXXXX,n,NoOp(${DNID})
exten => _849XXXXXXXX,n,NoOp(${RDNIS})
абонент получает номер телефона в коде 84991234567. Этот номер приходит на EWSD, а далее по PRI пробрасывается на asterisk.
Если при этом в поле Redirecting Number генериться ошибка на EWSD, то предложу поменять местами EWSD и Астериск.
То есть принимать номер на Астериск а далее по PRI - на EWSD.
nickolay
Сообщения: 9
Зарегистрирован: 20 сен 2010, 21:57
Откуда: Москва

Re: Проблема при установке переадресации.

Сообщение nickolay »

Добрый день. Прошу прощения за задержку с ответом. После неудачных попыток заставить ходить данное поле, было принято решение попробовать пристыковаться к оператору по ОКС7.
Был установлен asterisk 1.6.2.13 с libss7. В chan_dahdi.conf был создан linkset 2. Прописаны OPC и DPC. Соединение поднялось.
Но возникла следующая проблема. Поле также не приходит, хотя в документации написано, что такая переменная есть.
Ниже, привожу дебаг с asterisk.

[root@ss71 ~]# asterisk -r
Asterisk 1.6.2.13, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
== Parsing '/etc/asterisk/extconfig.conf': == Found
Connected to Asterisk 1.6.2.13 currently running on ss71 (pid = 4056)
Verbosity is at least 9
Входящий звонок.

Len = 61 [ 92 8f 3a c5 00 00 00 00 14 00 01 00 20 01 0a 00 02 0a 08 83 90 94 49 81 20 20 0f 0a 07 03 11 94 49 81 00 12 31 02 00 00 3d 01 1f 03 04 7d 02 91 81 1d 03 80 90 a3 39 04 31 c0 3d c0 00 ]
FSN: 15 FIB 1
BSN: 18 BIB 1
<[0] MSU
[ 92 8f 3a ]
Network Indicator: 3 Priority: 0 User Part: ISUP (5)
[ c5 ]
OPC 000 OPC 111 SLS 4
[ 00 00 00 00 ]
CIC: 20
[ 14 00 ]
Message Type: IAM
[ 01 ]
--FIXED LENGTH PARMS[4]--
Nature of Connection Indicator:
Satellites in connection: 0
Continuity Check: Check not required (0)
Outgoing half echo control device: not included (0)
[ 00 ]
Forward Call Indicators:
Nat/Intl Call Ind: call to be treated as a national call (0)
End to End Method Ind: no end-to-end method(s) available (0)
Interworking Ind: no interworking encountered (0)
End to End Info Ind: no end-to-end information available (0)
ISDN User Part Ind: ISDN user part used all the way (1)
ISDN User Part Pref Ind: ISDN user part preferred all the way (0)
ISDN Access Ind: originating access ISDN (1)
SCCP Method Ind: no indication (0)
[ 20 01 ]
Calling Party's Category:
Category: Ordinary calling subscriber (10)
[ 0a ]
Transmission Medium Requirements:
Speech (0)
[ 00 ]
--VARIABLE LENGTH PARMS[1]--
Called Party Number:
Nature of address: 3
NI: 1
Numbering plan: 1
Address signals: Б-номер#
[ 08 83 90 94 49 81 20 20 0f ]
--OPTIONAL PARMS--
Calling Party Number:
Nature of address: 3
NI: 0
Numbering plan: 1
Presentation: 0
Screening: 1
Address signals: А-номер
[ 0a 07 03 11 94 49 81 00 12 ]
Propagation Delay Counter:
Delay: 0ms
[ 31 02 00 00 ]
Hop Counter:
[ 3d 01 1f ]
Access Transport:
[ 03 04 7d 02 91 81 ]
User Service Information:
[ 1d 03 80 90 a3 ]
Parameter Compatibility Information:
[ 39 04 31 c0 3d c0 ]

Unhandled optional parameter 0x31 'Propagation Delay Counter'
[0x0 0x0 ]
Unhandled optional parameter 0x39 'Parameter Compatibility Information'
[0x31 0xc0 0x3d 0xc0 ]
-- Accepting call to 'Б-номер' on CIC 20
Len = 14 [ 8f 93 0b c5 02 c1 30 40 14 00 06 40 14 00 ]
FSN: 19 FIB 1
BSN: 15 BIB 1
>[0] MSU
[ 8f 93 0b ]
Network Indicator: 3 Priority: 0 User Part: ISUP (5)
[ c5 ]
OPC 000 DPC 111 SLS 4
[ 02 c1 30 40 ]
CIC: 20
[ 14 00 ]
Message Type: ACM
[ 06 ]
--FIXED LENGTH PARMS[1]--
Backward Call Indicator:
Charge indicator: 0
Called party's status indicator: 0
Called party's category indicator: 0
End to End method indicator: 1
Interworking indicator: 0
End to End information indicator: 0
ISDN user part indicator: 1
Holding indicator: 0
ISDN access indicator: 1
Echo control device indicator: 0
SCCP method indicator: 0
[ 40 14 ]

-- Executing [Б-номер@from-pstn:1] NoOp("DAHDI/20-1", "") in new stack
-- Executing [Б-номер@from-pstn:2] NoOp("DAHDI/20-1", "Б-номер#") in new stack
-- Executing [Б-номер@from-pstn:3] Set("DAHDI/20-1", "__SS7_ORIG_CALLED_NUM=А-номер") in new stack
-- Executing [Б-номер@from-pstn:4] Set("DAHDI/20-1", "CALLERID(num)=Б-номер") in new stack
-- Executing [Б-номер@from-pstn:5] Set("DAHDI/20-1", "CHANNEL(transfercapability)=3K1AUDIO") in new stack
-- Executing [Б-номер@from-pstn:6] Set("DAHDI/20-1", "__SS7_LSPI_IDENT=ON") in new stack
-- Executing [Б-номер@from-pstn:7] Set("DAHDI/20-1", "__SS7_RLT_ON=YES") in new stack
-- Executing [Б-номер@from-pstn:8] Set("DAHDI/20-1", "__SS7_REDIRECTING_NUMBER=Б-номер") in new stack
-- Executing [Б-номер@from-pstn:9] Set("DAHDI/20-1", "CALLERID(RDNIS)=Б-номер#") in new stack
-- Executing [Б-номер@from-pstn:10] Set("DAHDI/20-1", "CALLERID(DNID)=Б-номер#") in new stack
-- Executing [Б-номер@from-pstn:11] NoOp("DAHDI/20-1", "Б-номер#") in new stack
-- Executing [Б-номер@from-pstn:12] NoOp("DAHDI/20-1", "Б-номер#") in new stack
-- Executing [Б-номер@from-pstn:13] SetCallerPres("DAHDI/20-1", "allowed_passed_screen") in new stack
-- Executing [Б-номер@from-pstn:14] Dial("DAHDI/20-1", "DAHDI/35/С-номер,,tT") in new stack
-- Called 35/С-номер
Начало выполнениия переадресации.
Len = 37 [ 8f 94 22 c5 02 c1 30 40 24 00 01 00 60 01 0a 00 02 0a 08 83 10 94 25 52 69 30 0f 0a 07 03 11 94 49 81 20 20 00 ]
FSN: 20 FIB 1
BSN: 15 BIB 1
>[0] MSU
[ 8f 94 22 ]
Network Indicator: 3 Priority: 0 User Part: ISUP (5)
[ c5 ]
OPC 000 DPC 111 SLS 4
[ 02 c1 30 40 ]
CIC: 36
[ 24 00 ]
Message Type: IAM
[ 01 ]
--FIXED LENGTH PARMS[4]--
Nature of Connection Indicator:
Satellites in connection: 0
Continuity Check: Check not required (0)
Outgoing half echo control device: not included (0)
[ 00 ]
Forward Call Indicators:
Nat/Intl Call Ind: call to be treated as a national call (0)
End to End Method Ind: no end-to-end method(s) available (0)
Interworking Ind: no interworking encountered (0)
End to End Info Ind: no end-to-end information available (0)
ISDN User Part Ind: ISDN user part used all the way (1)
ISDN User Part Pref Ind: ISDN user part not preferred all the way (1)
ISDN Access Ind: originating access ISDN (1)
SCCP Method Ind: no indication (0)
[ 60 01 ]
Calling Party's Category:
Category: Ordinary calling subscriber (10)
[ 0a ]
Transmission Medium Requirements:
Speech (0)
[ 00 ]
--VARIABLE LENGTH PARMS[1]--
Called Party Number:
Nature of address: 3
NI: 0
Numbering plan: 1
Address signals: С-номер#
[ 08 83 10 94 25 52 69 30 0f ]
--OPTIONAL PARMS--
Calling Party Number:
Nature of address: 3
NI: 0
Numbering plan: 1
Presentation: 0
Screening: 1
Address signals: Б-номер
[ 0a 07 03 11 94 49 81 20 20 ]

Len = 22 [ 94 90 13 c5 00 00 00 00 24 00 06 12 14 01 2e 01 00 39 02 2e c0 00 ]
FSN: 16 FIB 1
BSN: 20 BIB 1
<[0] MSU
[ 94 90 13 ]
Network Indicator: 3 Priority: 0 User Part: ISUP (5)
[ c5 ]
OPC 000 OPC 111 SLS 4
[ 00 00 00 00 ]
CIC: 36
[ 24 00 ]
Message Type: ACM
[ 06 ]
--FIXED LENGTH PARMS[1]--
Backward Call Indicator:
Charge indicator: 2
Called party's status indicator: 0
Called party's category indicator: 1
End to End method indicator: 0
Interworking indicator: 0
End to End information indicator: 0
ISDN user part indicator: 1
Holding indicator: 0
ISDN access indicator: 1
Echo control device indicator: 0
SCCP method indicator: 0
[ 12 14 ]
--OPTIONAL PARMS--
Access Delivery Information:
[ 2e 01 00 ]
Parameter Compatibility Information:
[ 39 02 2e c0 ]

Unhandled optional parameter 0x2e 'Access Delivery Information'
[0x0 ]
Unhandled optional parameter 0x39 'Parameter Compatibility Information'
[0x2e 0xc0 ]
-- DAHDI/35-1 is proceeding passing it to DAHDI/20-1
Len = 20 [ 94 91 11 c5 00 00 00 00 24 00 2c 02 01 03 04 1e 02 80 88 00 ]
FSN: 17 FIB 1
BSN: 20 BIB 1
<[0] MSU
[ 94 91 11 ]
Network Indicator: 3 Priority: 0 User Part: ISUP (5)
[ c5 ]
OPC 000 OPC 111 SLS 4
[ 00 00 00 00 ]
CIC: 36
[ 24 00 ]
Message Type: CPG
[ 2c ]
--FIXED LENGTH PARMS[1]--
Event Information:
PROGRESS
[ 02 ]
--OPTIONAL PARMS--
Access Transport:
[ 03 04 1e 02 80 88 ]

-- DAHDI/35-1 is making progress passing it to DAHDI/20-1
Len = 13 [ 91 95 0a c5 02 c1 30 40 14 00 2c 03 00 ]
FSN: 21 FIB 1
BSN: 17 BIB 1
>[0] MSU
[ 91 95 0a ]
Network Indicator: 3 Priority: 0 User Part: ISUP (5)
[ c5 ]
OPC 000 DPC 111 SLS 4
[ 02 c1 30 40 ]
CIC: 20
[ 14 00 ]
Message Type: CPG
[ 2c ]
--FIXED LENGTH PARMS[1]--
Event Information:
In-band information or an appropriate pattern is now available
[ 03 ]

Len = 21 [ 95 92 12 c5 00 00 00 00 24 00 09 01 2d 02 00 00 39 02 2d c0 00 ]
FSN: 18 FIB 1
BSN: 21 BIB 1
<[0] MSU
[ 95 92 12 ]
Network Indicator: 3 Priority: 0 User Part: ISUP (5)
[ c5 ]
OPC 000 OPC 111 SLS 4
[ 00 00 00 00 ]
CIC: 36
[ 24 00 ]
Message Type: ANM
[ 09 ]
--OPTIONAL PARMS--
Unknown Parameter (0x2d):
[ 00 00 ]
Parameter Compatibility Information:
[ 39 02 2d c0 ]

Unhandled optional parameter 0x2d 'Unknown'
[0x0 0x0 ]
Unhandled optional parameter 0x39 'Parameter Compatibility Information'
[0x2d 0xc0 ]
-- DAHDI/35-1 answered DAHDI/20-1
Len = 12 [ 92 96 09 c5 02 c1 30 40 14 00 09 00 ]
FSN: 22 FIB 1
BSN: 18 BIB 1
>[0] MSU
[ 92 96 09 ]
Network Indicator: 3 Priority: 0 User Part: ISUP (5)
[ c5 ]
OPC 000 DPC 111 SLS 4
[ 02 c1 30 40 ]
CIC: 20
[ 14 00 ]
Message Type: ANM
[ 09 ]

Len = 16 [ 96 93 0d c5 00 00 00 00 14 00 0c 02 00 02 80 90 ]
FSN: 19 FIB 1
BSN: 22 BIB 1
<[0] MSU
[ 96 93 0d ]
Network Indicator: 3 Priority: 0 User Part: ISUP (5)
[ c5 ]
OPC 000 OPC 111 SLS 4
[ 00 00 00 00 ]
CIC: 20
[ 14 00 ]
Message Type: REL
[ 0c ]
--VARIABLE LENGTH PARMS[1]--
Cause Indicator:
Coding Standard: 0
Location: 0
Cause Class: 1
Cause Subclass: 0
Cause: Normal call clearing (16)
[ 02 80 90 ]

Len = 12 [ 93 97 09 c5 02 c1 30 40 14 00 10 00 ]
FSN: 23 FIB 1
BSN: 19 BIB 1
>[0] MSU
[ 93 97 09 ]
Network Indicator: 3 Priority: 0 User Part: ISUP (5)
[ c5 ]
OPC 000 DPC 111 SLS 4
[ 02 c1 30 40 ]
CIC: 20
[ 14 00 ]
Message Type: RLC
[ 10 ]

-- Hungup 'DAHDI/35-1'
== Spawn extension (from-pstn, Б-номер, 14) exited non-zero on 'DAHDI/20-1'
-- Hungup 'DAHDI/20-1'
Len = 16 [ 93 98 0d c5 02 c1 30 40 24 00 0c 02 00 02 81 90 ]
FSN: 24 FIB 1
BSN: 19 BIB 1
>[0] MSU
[ 93 98 0d ]
Network Indicator: 3 Priority: 0 User Part: ISUP (5)
[ c5 ]
OPC 000 DPC 111 SLS 4
[ 02 c1 30 40 ]
CIC: 36
[ 24 00 ]
Message Type: REL
[ 0c ]
--VARIABLE LENGTH PARMS[1]--
Cause Indicator:
Coding Standard: 0
Location: 1
Cause Class: 1
Cause Subclass: 0
Cause: Normal call clearing (16)
[ 02 81 90 ]

Len = 12 [ 98 94 09 c5 00 00 00 00 24 00 10 00 ]
FSN: 20 FIB 1
BSN: 24 BIB 1
<[0] MSU
[ 98 94 09 ]
Network Indicator: 3 Priority: 0 User Part: ISUP (5)
[ c5 ]
OPC 000 OPC 111 SLS 4
[ 00 00 00 00 ]
CIC: 36
[ 24 00 ]
Message Type: RLC
[ 10 ]

Приведена трассировка вызова, в котрой учавствуют 3 номера. Номер А, номер с котрого я звоню. Номер Б, номер на который я звоню. Номер С, номер на котором поставлена "переадресация".
На EWSD я не вижу поле, которое говорит о том, что вызов переадресованный. При этом, * ругается на поля:

Unhandled optional parameter 0x31 'Propagation Delay Counter'
[0x0 0x0 ]
Unhandled optional parameter 0x39 'Parameter Compatibility Information'
[0x31 0xc0 0x3d 0xc0 ]
Unhandled optional parameter 0x2e 'Access Delivery Information'
[0x0 ]

Ниже, приведен контекст, в который попадает звонок и из которого совершается вызов.
s71*CLI> dialplan show from-pstn
[ Context 'from-pstn' created by 'pbx_config' ]
'_X.' => 1. NoOp(${CALLERID(rdnis)}) [pbx_config]
2. NoOp(${CALLERID(dnid)}) [pbx_config]
3. Set(__SS7_ORIG_CALLED_NUM=${CALLERID(ani)}) [pbx_config]
4. Set(CALLERID(num)=${EXTEN}) [pbx_config]
5. Set(CHANNEL(transfercapability)=3K1AUDIO) [pbx_config]
6. Set(__SS7_LSPI_IDENT=ON) [pbx_config]
7. Set(__SS7_RLT_ON=YES) [pbx_config]
8. Set(__SS7_REDIRECTING_NUMBER=${EXTEN}) [pbx_config]
9. Set(CALLERID(RDNIS)=${CALLERID(dnid)}) [pbx_config]
10. Set(CALLERID(DNID)=${CALLERID(dnid)}) [pbx_config]
11. NoOp(${CALLERID(rdnis)}) [pbx_config]
12. NoOp(${CALLERID(dnid)}) [pbx_config]
13. SetCallerPres(allowed_passed_screen) [pbx_config]
14. Dial(DAHDI/35/С-номер,,tT) [pbx_config]

-= 1 extension (14 priorities) in 1 context. =-
ss71*CLI>
Установлена карта OpenVoxD210. С 2-мя портами. На карту подано 2 потока. Один поток для входящих, другой для исходящих.
М.б. кто-нибудь знает, можно ли такое реализовать на Yate или к.л. другом оборудовании.
Ответить
© 2008 — 2024 Asterisk.ru
Digium, Asterisk and AsteriskNOW are registered trademarks of Digium, Inc.
Design and development by PostMet-Netzwerk GmbH