originate->SIP or h.323 -> Aster ->IAX2-> Aster+chan_datacard
Проблема заключается в том, что мы уже и продавливаем те коды на Hangup, что хотим видеть, но идёт все равно только 34-ый согласно спецификации Q.931
Сломал весь моцк уже...
Оплачу платный саппорт за нахождение решения и указания на собств. ошибки (в соотвеств. теме тоже объявление разместил)
отвалю деньжыщчь немерянно... выручайте други!!!
Можно и в паблик, вдруг и еще кому решение такое понадобится....
extensions.conf (чисто для примера)
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
exten => _x.,1,Hangup(18) ;тут мы ставим любой код, но отбивается только лишь с 34-м
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
[terminate]
;;;;;;;----------- CHECKING ----------------- ;
exten => _992XXXXXXXXX,1,Verbose(Dial--${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)}-(( ${SYSINFO(numcalls)} ))- ${EXTEN})
;exten => _992XXXXXXXXX,1,Dial(( ${SYSINFO(numcalls)} ))- ${EXTEN})
exten => _992XXXXXXXXX,n,GotoIf($[${SYSINFO(numcalls)} > ${allcall}]?outs)
exten => _992XXXXXXXXX,n,Set(tocall=${EXTEN})
;;;;;;;----------- 1 - SERVER -----------------
exten => _992XXXXXXXXX,n,GotoIf($[ ${GROUP_COUNT(${serv1})} > ${col1} ]?next)
exten => _992XXXXXXXXX,n,Set(GROUP()=${serv1})
exten => _992XXXXXXXXX,n,Dial(IAX2/${serv1}/${EXTEN},30,t)
exten => _992XXXXXXXXX,n,NoOp(-----------${serv1}---DS-(-${DIALSTATUS})----HungCa-(${HANGUPCAUSE})---${CDR(Disposition)}-${EXTEN:8})
exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?next)
exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?next)
exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?next)
exten => _992XXXXXXXXX,n,Set(CDR(callerid)=${HANGUPCAUSE}-${DIALSTATUS})
exten => _992XXXXXXXXX,n,Hangup
;;;;;;;----------- 2 - SERVER -----------------
exten => _992XXXXXXXXX,n(next),GotoIf($[ ${GROUP_COUNT(${serv2})} > ${col2} ]?nextc)
exten => _992XXXXXXXXX,n,Set(GROUP()=${serv2})
exten => _992XXXXXXXXX,n,Set(CALLERID(num)=222-${EXTEN})
exten => _992XXXXXXXXX,n,Dial(IAX2/${serv2}/${tocall},30,t)
exten => _992XXXXXXXXX,n,NoOp(-----------${serv2}---DS-(-${DIALSTATUS})----HungCa-(${HANGUPCAUSE})---${CDR(Disposition)}-${tocall:8})
exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?nextc)
exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?nextc)
exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?nextc)
exten => _992XXXXXXXXX,n,Set(CDR(callerid)=${HANGUPCAUSE}-${DIALSTATUS})
exten => _992XXXXXXXXX,n,Hangup
;;;;;;;----------- 3 - SERVER -----------------
exten => _992XXXXXXXXX,n(nextc),GotoIf($[ ${GROUP_COUNT(${serv3})} > ${col3} ]?nextd)
exten => _992XXXXXXXXX,n,Set(GROUP()=${serv3})
exten => _992XXXXXXXXX,n,Set(CALLERID(num)=333-${EXTEN})
exten => _992XXXXXXXXX,n,Dial(IAX2/${serv3}/${tocall},30,t)
exten => _992XXXXXXXXX,n,NoOp(-----------${serv3}---DS-(-${DIALSTATUS})----HungCa-(${HANGUPCAUSE})---${CDR(Disposition)}-${tocall:8})
;exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?nextd)
;exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?nextd)
;exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?nextd)
exten => _992XXXXXXXXX,n,Set(CDR(callerid)=${HANGUPCAUSE}-${DIALSTATUS})
exten => _992XXXXXXXXX,n,Hangup
;;;;;;;----------- 4 - SERVER -----------------
exten => _992XXXXXXXXX,n(nextd),GotoIf($[ ${GROUP_COUNT(${serv4})} > ${col4} ]?outt)
exten => _992XXXXXXXXX,n,Set(GROUP()=${serv4})
exten => _992XXXXXXXXX,n,Set(CDR(callerid)=444-${EXTEN})
;exten => _992XXXXXXXXX,n,ChanIsAvail(IAX2/${serv4}/1)
;exten => _992XXXXXXXXX,n,GotoIf($[${AVAILSTATUS} != 0 ]?outs)
exten => _992XXXXXXXXX,n,Dial(IAX2/${serv4}/${tocall},30,t)
exten => _992XXXXXXXXX,n,NoOp(-----------${serv4}---DS-(-${DIALSTATUS})----HungCa-(${HANGUPCAUSE})---${CDR(Disposition)}-${tocall:8})
;exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?outs)
;exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?outs)
exten => _992XXXXXXXXX,n,Set(CALLERID(num)=${HANGUPCAUSE}-${DIALSTATUS})
exten => _992XXXXXXXXX,n,Hangup
exten => _992XXXXXXXXX,n(outt),GotoIf($["${HANGUPCAUSE}" = "34"]?outs)
exten => _992XXXXXXXXX,n,Hangup
exten => _992XXXXXXXXX,n(outs),Congestion(0)
exten => i,1,Hangup(28)
exten => t,1,Hangup(19)
И к нему файл с переменными для диалплана vars.conf
allcall=39
serv1=ter1
serv2=ter2
serv3=ter3
serv4=ter4
col1=10
col2=10
col3=10
col4=10
;;;;;;;----------- CHECKING ----------------- ;
exten => _992XXXXXXXXX,1,Verbose(Dial--${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)}-(( ${SYSINFO(numcalls)} ))- ${EXTEN})
;exten => _992XXXXXXXXX,1,Dial(( ${SYSINFO(numcalls)} ))- ${EXTEN})
exten => _992XXXXXXXXX,n,GotoIf($[${SYSINFO(numcalls)} > ${allcall}]?outs)
exten => _992XXXXXXXXX,n,Set(tocall=${EXTEN})
;;;;;;;----------- 1 - SERVER -----------------
exten => _992XXXXXXXXX,n,GotoIf($[ ${GROUP_COUNT(${serv1})} > ${col1} ]?next)
exten => _992XXXXXXXXX,n,Set(GROUP()=${serv1})
exten => _992XXXXXXXXX,n,Dial(IAX2/${serv1}/${EXTEN},30,t)
exten => _992XXXXXXXXX,n,NoOp(-----------${serv1}---DS-(-${DIALSTATUS})----HungCa-(${HANGUPCAUSE})---${CDR(Disposition)}-${EXTEN:8})
exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?next)
exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?next)
exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?next)
exten => _992XXXXXXXXX,n,Set(CDR(callerid)=${HANGUPCAUSE}-${DIALSTATUS})
exten => _992XXXXXXXXX,n,Hangup
;;;;;;;----------- 2 - SERVER -----------------
exten => _992XXXXXXXXX,n(next),GotoIf($[ ${GROUP_COUNT(${serv2})} > ${col2} ]?nextc)
exten => _992XXXXXXXXX,n,Set(GROUP()=${serv2})
exten => _992XXXXXXXXX,n,Set(CALLERID(num)=222-${EXTEN})
exten => _992XXXXXXXXX,n,Dial(IAX2/${serv2}/${tocall},30,t)
exten => _992XXXXXXXXX,n,NoOp(-----------${serv2}---DS-(-${DIALSTATUS})----HungCa-(${HANGUPCAUSE})---${CDR(Disposition)}-${tocall:8})
exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?nextc)
exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?nextc)
exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?nextc)
exten => _992XXXXXXXXX,n,Set(CDR(callerid)=${HANGUPCAUSE}-${DIALSTATUS})
exten => _992XXXXXXXXX,n,Hangup
;;;;;;;----------- 3 - SERVER -----------------
exten => _992XXXXXXXXX,n(nextc),GotoIf($[ ${GROUP_COUNT(${serv3})} > ${col3} ]?nextd)
exten => _992XXXXXXXXX,n,Set(GROUP()=${serv3})
exten => _992XXXXXXXXX,n,Set(CALLERID(num)=333-${EXTEN})
exten => _992XXXXXXXXX,n,Dial(IAX2/${serv3}/${tocall},30,t)
exten => _992XXXXXXXXX,n,NoOp(-----------${serv3}---DS-(-${DIALSTATUS})----HungCa-(${HANGUPCAUSE})---${CDR(Disposition)}-${tocall:8})
;exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?nextd)
;exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?nextd)
;exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?nextd)
exten => _992XXXXXXXXX,n,Set(CDR(callerid)=${HANGUPCAUSE}-${DIALSTATUS})
exten => _992XXXXXXXXX,n,Hangup
;;;;;;;----------- 4 - SERVER -----------------
exten => _992XXXXXXXXX,n(nextd),GotoIf($[ ${GROUP_COUNT(${serv4})} > ${col4} ]?outt)
exten => _992XXXXXXXXX,n,Set(GROUP()=${serv4})
exten => _992XXXXXXXXX,n,Set(CDR(callerid)=444-${EXTEN})
;exten => _992XXXXXXXXX,n,ChanIsAvail(IAX2/${serv4}/1)
;exten => _992XXXXXXXXX,n,GotoIf($[${AVAILSTATUS} != 0 ]?outs)
exten => _992XXXXXXXXX,n,Dial(IAX2/${serv4}/${tocall},30,t)
exten => _992XXXXXXXXX,n,NoOp(-----------${serv4}---DS-(-${DIALSTATUS})----HungCa-(${HANGUPCAUSE})---${CDR(Disposition)}-${tocall:8})
;exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?outs)
;exten => _992XXXXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?outs)
exten => _992XXXXXXXXX,n,Set(CALLERID(num)=${HANGUPCAUSE}-${DIALSTATUS})
exten => _992XXXXXXXXX,n,Hangup
exten => _992XXXXXXXXX,n(outt),GotoIf($["${HANGUPCAUSE}" = "34"]?outs)
exten => _992XXXXXXXXX,n,Hangup
exten => _992XXXXXXXXX,n(outs),Congestion(0)
exten => i,1,Hangup(28)
exten => t,1,Hangup(19)
И к нему файл с переменными для диалплана vars.conf
allcall=39
serv1=ter1
serv2=ter2
serv3=ter3
serv4=ter4
col1=10
col2=10
col3=10
col4=10
ooh323.conf
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
[general]
port=1720
bindaddr=X.X.X.X
;gateway=no
faststart=yes
;h245tunneling=no
;mediawaitforconnect=yes
h323id=ObjSysAsterisk
e164=100
callerid=asterisk
context=default
tos=lowdelay
amaflags = default
disallow=all ;Note order of disallow/allow is important.
allow=gsm
allow=ulaw
[user1]
type=user
host=user1
context=from_user
incominglimit=80
h245Tunneling=no
disallow=all
allow=g729
accountcode=orig1
e164=100
port=1720
bindaddr=X.X.X.X
;gateway=no
faststart=yes
;h245tunneling=no
;mediawaitforconnect=yes
h323id=ObjSysAsterisk
e164=100
callerid=asterisk
context=default
tos=lowdelay
amaflags = default
disallow=all ;Note order of disallow/allow is important.
allow=gsm
allow=ulaw
[user1]
type=user
host=user1
context=from_user
incominglimit=80
h245Tunneling=no
disallow=all
allow=g729
accountcode=orig1
e164=100
iax.conf
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
[general]
bindport=2710
bindaddr=0.0.0.0
iaxcompat=no
nochecksums=no
delayreject=yes
srvlookup=no
language=en
bandwidth=low
disallow=all
allow=g729
;allow=g723
;jitterbuffer=no
;forcejitterbuffer=no
;maxjitterbuffer=1000
;maxjitterinterps=10
;resyncthreshold=1000
;jittertargetextra=40
trunkfreq=30
trunktimestamps=yes
trunkmtu=0
encryption=no
;iaxthreadcount = 10
;iaxmaxthreadcount = 100
;authdebug=no
tos=ef
cos=5
autokill=yes
allowfwdownload=no
[peer8]
host=peer8 ;IP прописан в /etc/hosts
port=2710
type=friend
username=***
secret=********
auth=md5
transfer=no
qualify=yes
trunk=yes
context=outcall
disallow=all
allow=g729
bindport=2710
bindaddr=0.0.0.0
iaxcompat=no
nochecksums=no
delayreject=yes
srvlookup=no
language=en
bandwidth=low
disallow=all
allow=g729
;allow=g723
;jitterbuffer=no
;forcejitterbuffer=no
;maxjitterbuffer=1000
;maxjitterinterps=10
;resyncthreshold=1000
;jittertargetextra=40
trunkfreq=30
trunktimestamps=yes
trunkmtu=0
encryption=no
;iaxthreadcount = 10
;iaxmaxthreadcount = 100
;authdebug=no
tos=ef
cos=5
autokill=yes
allowfwdownload=no
[peer8]
host=peer8 ;IP прописан в /etc/hosts
port=2710
type=friend
username=***
secret=********
auth=md5
transfer=no
qualify=yes
trunk=yes
context=outcall
disallow=all
allow=g729
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
---
Reliably Transmitting (no NAT) to 89.107.128.2:5060:
OPTIONS sip:89.107.128.2 SIP/2.0
Via: SIP/2.0/UDP 46.4.36.86:5060;branch=z9hG4bK12627b00;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@46.4.36.86>;tag=as301591d1
To: <sip:89.107.128.2>
Contact: <sip:asterisk@46.4.36.86>
Call-ID: 08a4645e611a4f4f37965b8a6a52ea20@46.4.36.86
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.22
Date: Mon, 16 Jan 2012 14:16:16 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
---
<--- SIP read from UDP:89.107.128.2:5060 --->
SIP/2.0 501 Not Implemented
Via: SIP/2.0/UDP 46.4.36.86:5060;branch=z9hG4bK12627b00;rport
From: "asterisk" <sip:asterisk@46.4.36.86>;tag=as301591d1
To: <sip:89.107.128.2>
Call-ID: 08a4645e611a4f4f37965b8a6a52ea20@46.4.36.86
CSeq: 102 OPTIONS
Server: MERA MSIP v.1.0.2
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
Really destroying SIP dialog '08a4645e611a4f4f37965b8a6a52ea20@46.4.36.86' Method: OPTIONS
Retransmitting #2 (no NAT) to 89.107.128.2:5061:
OPTIONS sip:89.107.128.2 SIP/2.0
Via: SIP/2.0/UDP 46.4.36.86:5060;branch=z9hG4bK7b09c06b;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@46.4.36.86>;tag=as60824de5
To: <sip:89.107.128.2>
Contact: <sip:asterisk@46.4.36.86>
Call-ID: 1d3d657701b31f8d68466f9b016eaa47@46.4.36.86
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.22
Date: Mon, 16 Jan 2012 14:16:15 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
Reliably Transmitting (no NAT) to 89.107.128.2:5060:
OPTIONS sip:89.107.128.2 SIP/2.0
Via: SIP/2.0/UDP 46.4.36.86:5060;branch=z9hG4bK12627b00;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@46.4.36.86>;tag=as301591d1
To: <sip:89.107.128.2>
Contact: <sip:asterisk@46.4.36.86>
Call-ID: 08a4645e611a4f4f37965b8a6a52ea20@46.4.36.86
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.22
Date: Mon, 16 Jan 2012 14:16:16 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
---
<--- SIP read from UDP:89.107.128.2:5060 --->
SIP/2.0 501 Not Implemented
Via: SIP/2.0/UDP 46.4.36.86:5060;branch=z9hG4bK12627b00;rport
From: "asterisk" <sip:asterisk@46.4.36.86>;tag=as301591d1
To: <sip:89.107.128.2>
Call-ID: 08a4645e611a4f4f37965b8a6a52ea20@46.4.36.86
CSeq: 102 OPTIONS
Server: MERA MSIP v.1.0.2
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
Really destroying SIP dialog '08a4645e611a4f4f37965b8a6a52ea20@46.4.36.86' Method: OPTIONS
Retransmitting #2 (no NAT) to 89.107.128.2:5061:
OPTIONS sip:89.107.128.2 SIP/2.0
Via: SIP/2.0/UDP 46.4.36.86:5060;branch=z9hG4bK7b09c06b;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@46.4.36.86>;tag=as60824de5
To: <sip:89.107.128.2>
Contact: <sip:asterisk@46.4.36.86>
Call-ID: 1d3d657701b31f8d68466f9b016eaa47@46.4.36.86
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.22
Date: Mon, 16 Jan 2012 14:16:15 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0