AF
Asterisk Forum
обсуждения телефонии, VoIP и IP-PBX
12разделов
5 423тем
34 385сообщений
← К списку тем

по pri приходит connect если абонент получивший звонок через sip транк моментально сбрасывает его

Newbies/FAQ Forum 8 сообщений 18.11.2010 09:02 - 23.11.2010 20:28
#1 18.11.2010 09:02

по pri приходит connect если абонент получивший звонок через sip транк моментально сбрасывает его


Asterisk 1.6.2.5-0ubuntu1
libpri version: 1.4.10.2

звоню с атс по e1 в sip транк на мобильный телефон
если абонент моментально сбрасывает звонок
по сип приходит 487 busy
если же через пол секунды сбрасывает
по сип приходит bye
эти события я обрабатываю макросом
[macro-m_incom]
exten => s,1,Dial(${ARG1},60)
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Hangup
exten => s-BUSY,1,Hangup
exten => s-BYE,1,Hangup

в случае если абонент моментально сбрасывает звонок
по pri приходит событие Connect
потом через секунду Disconnect
Можно ли в таком случае сделать, чтобы Connect не приходил до тех пор пока соединение не произойдет?
#2 18.11.2010 12:08

Quote:
если же через пол секунды сбрасывает по сип приходит bye


а между invite и bye в этом случае нет OK? Если нету - то это косячит та сторона, т.к. для отмены INVITE не законченного по "200 OK", должно
посылаться сообщение с кодом 4xx. Например, "SIP/2.0 487 Request Terminated"

_________________
ys
http://voip.rus.net/
#3 18.11.2010 12:32

Походу вы меня не правильно поняли.

проблема как раз возникает когда трубку бросают моментально
в этом случае в логах нет OK в другом случае когда трубку бросают не сразу после вызова, сигнализация отрабатывает корректно (между ivite и bну присутсвует ОК )
вот сиповый лог когда трубу боросают моментально.

Audio is at XXXXXXXXXXXXX port 13608
Adding codec 0x8 (alaw) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to XXXXXXXXXXXXX:5060:
INVITE sip:0479265897436@XXXXXXXXXXXXX SIP/2.0
Via: SIP/2.0/UDP XXXXXXXXXXXXX:5060;branch=z9hG4bK61ac742a;rport
Max-Forwards: 70
From: "Anonymous" ;tag=as5c7736f4
To:
Contact:
Call-ID: 1245f3d77f2c16086ca0b0124b604a0e@XXXXXXXXXXXXX
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.5-0ubuntu1
Date: Tue, 16 Nov 2010 10:49:11 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 296

v=0
o=root 1931335234 1931335234 IN IP4 XXXXXXXXXXXXX
s=Asterisk PBX 1.6.2.5-0ubuntu1
c=IN IP4 XXXXXXXXXXXXX
t=0 0
m=audio 13608 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=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

---
asterisk*CLI>

SIP/2.0 100 Trying
Via: SIP/2.0/UDP XXXXXXXXXXXXX:5060;branch=z9hG4bK61ac742a;received=XXXXXXXXXXXXX;rport=5060
From: "Anonymous" ;tag=as5c7736f4
To: ;tag=157051728-10126-32560
Call-ID: 1245f3d77f2c16086ca0b0124b604a0e@XXXXXXXXXXXXX
CSeq: 102 INVITE
Content-Length: 0



--- (7 headers 0 lines) ---
asterisk*CLI>

SIP/2.0 183 Call Proceeding
Via: SIP/2.0/UDP XXXXXXXXXXXXX:5060;branch=z9hG4bK61ac742a;received=XXXXXXXXXXXXX;rport=5060
From: "Anonymous" ;tag=as5c7736f4
To: ;tag=157051728-10126-32560
Call-ID: 1245f3d77f2c16086ca0b0124b604a0e@XXXXXXXXXXXXX
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, INFO, BYE
Content-Type: application/sdp
Content-Length: 235

v=0
o=XXXXXXXXXXXXX 1289904554 1289904554 IN IP4 XXXXXXXXXXXXX
s=AlterProxySoftSwitch
c=IN IP4 195.239.254.165
t=0 0
m=audio 17784 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15


--- (9 headers 10 lines) ---
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - 0x10c (ulaw|alaw|g729), peer - audio=0x8 (alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 195.239.254.165:17784
asterisk*CLI>

SIP/2.0 183 Progress
Via: SIP/2.0/UDP XXXXXXXXXXXXX:5060;branch=z9hG4bK61ac742a;received=XXXXXXXXXXXXX;rport=5060
From: "Anonymous" ;tag=as5c7736f4
To: ;tag=157051728-10126-32560
Call-ID: 1245f3d77f2c16086ca0b0124b604a0e@XXXXXXXXXXXXX
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, INFO, BYE
Content-Type: application/sdp
Content-Length: 235

v=0
o=XXXXXXXXXXXXX 1289904554 1289904555 IN IP4 XXXXXXXXXXXXX
s=AlterProxySoftSwitch
c=IN IP4 195.239.254.165
t=0 0
m=audio 17784 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15


--- (9 headers 10 lines) ---
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - 0x10c (ulaw|alaw|g729), peer - audio=0x8 (alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 195.239.254.165:17784
asterisk*CLI>

SIP/2.0 486 Busy Here
Via: SIP/2.0/UDP XXXXXXXXXXXXX:5060;branch=z9hG4bK61ac742a;received=XXXXXXXXXXXXX;rport=5060
From: "Anonymous" ;tag=as5c7736f4
To: ;tag=157051728-10126-32560
Call-ID: 1245f3d77f2c16086ca0b0124b604a0e@XXXXXXXXXXXXX
CSeq: 102 INVITE
Content-Length: 0



--- (7 headers 0 lines) ---
Transmitting (no NAT) to XXXXXXXXXXXXX:5060:
ACK sip:0479265897436@XXXXXXXXXXXXX SIP/2.0
Via: SIP/2.0/UDP XXXXXXXXXXXXX:5060;branch=z9hG4bK61ac742a;rport
Max-Forwards: 70
From: "Anonymous" ;tag=as5c7736f4
To: ;tag=157051728-10126-32560
Contact:
Call-ID: 1245f3d77f2c16086ca0b0124b604a0e@XXXXXXXXXXXXX
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.2.5-0ubuntu1
Content-Length: 0


---
Really destroying SIP dialog '1245f3d77f2c16086ca0b0124b604a0e@XXXXXXXXXXXXX' Method: INVITE
#4 18.11.2010 14:09

Странно, что нету атрибута a=sendonly с AlterProxySoftSwitch в "SIP/2.0 183 Progress" может поэтому в PRI канал переходит не в EARLY, а в CONNECT
_________________
ys
http://voip.rus.net/
#5 18.11.2010 15:44

В другом случае когда бросаем трубку не сразу такого тоже нет

Audio is at xxxxxxxx port 12602
Adding codec 0x8 (alaw) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to xxxxxxxx:5060:
INVITE sip:0479265897436@xxxxxxxx SIP/2.0
Via: SIP/2.0/UDP xxxxxxxx:5060;branch=z9hG4bK15366c64;rport
Max-Forwards: 70
From: "Anonymous" ;tag=as35f0aa73
To:
Contact:
Call-ID: 48700d695b564fd922475fa63edbd151@xxxxxxxx
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.5-0ubuntu1
Date: Tue, 16 Nov 2010 10:45:30 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 296

v=0
o=root 1537533559 1537533559 IN IP4 xxxxxxxx
s=Asterisk PBX 1.6.2.5-0ubuntu1
c=IN IP4 xxxxxxxx
t=0 0
m=audio 12602 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=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

---
asterisk*CLI>

SIP/2.0 100 Trying
Via: SIP/2.0/UDP xxxxxxxx:5060;branch=z9hG4bK15366c64;received=xxxxxxxx;rport=5060
From: "Anonymous" ;tag=as35f0aa73
To: ;tag=50944984-12168-27207
Call-ID: 48700d695b564fd922475fa63edbd151@xxxxxxxx
CSeq: 102 INVITE
Content-Length: 0



--- (7 headers 0 lines) ---
asterisk*CLI>

SIP/2.0 183 Call Proceeding
Via: SIP/2.0/UDP xxxxxxxx:5060;branch=z9hG4bK15366c64;received=xxxxxxxx;rport=5060
From: "Anonymous" ;tag=as35f0aa73
To: ;tag=50944984-12168-27207
Call-ID: 48700d695b564fd922475fa63edbd151@xxxxxxxx
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, INFO, BYE
Content-Type: application/sdp
Content-Length: 232

v=0
o=xxxxxxxx 1289904333 1289904333 IN IP4 xxxxxxxx
s=AlterProxySoftSwitch
c=IN IP4 xxxxxxxx
t=0 0
m=audio 16416 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15


--- (9 headers 10 lines) ---
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - 0x10c (ulaw|alaw|g729), peer - audio=0x8 (alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port xxxxxxxx:16416
asterisk*CLI>

SIP/2.0 183 Progress
Via: SIP/2.0/UDP xxxxxxxx:5060;branch=z9hG4bK15366c64;received=xxxxxxxx;rport=5060
From: "Anonymous" ;tag=as35f0aa73
To: ;tag=50944984-12168-27207
Call-ID: 48700d695b564fd922475fa63edbd151@xxxxxxxx
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, INFO, BYE
Content-Type: application/sdp
Content-Length: 232

v=0
o=xxxxxxxx 1289904333 1289904334 IN IP4 xxxxxxxx
s=AlterProxySoftSwitch
c=IN IP4 xxxxxxxx
t=0 0
m=audio 16416 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15


--- (9 headers 10 lines) ---
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - 0x10c (ulaw|alaw|g729), peer - audio=0x8 (alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port xxxxxxxx:16416
asterisk*CLI>

SIP/2.0 180 Ringing
Via: SIP/2.0/UDP xxxxxxxx:5060;branch=z9hG4bK15366c64;received=xxxxxxxx;rport=5060
From: "Anonymous" ;tag=as35f0aa73
To: ;tag=50944984-12168-27207
Call-ID: 48700d695b564fd922475fa63edbd151@xxxxxxxx
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, INFO, BYE
Content-Type: application/sdp
Content-Length: 232

v=0
o=xxxxxxxx 1289904333 1289904335 IN IP4 xxxxxxxx
s=AlterProxySoftSwitch
c=IN IP4 xxxxxxxx
t=0 0
m=audio 16416 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15


--- (9 headers 10 lines) ---
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - 0x10c (ulaw|alaw|g729), peer - audio=0x8 (alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port xxxxxxxx:16416
asterisk*CLI>

SIP/2.0 200 OK
Via: SIP/2.0/UDP xxxxxxxx:5060;branch=z9hG4bK15366c64;received=xxxxxxxx;rport=5060
Contact:
From: "Anonymous" ;tag=as35f0aa73
To: ;tag=50944984-12168-27207
Call-ID: 48700d695b564fd922475fa63edbd151@xxxxxxxx
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, INFO, BYE
Content-Type: application/sdp
Content-Length: 232

v=0
o=xxxxxxxx 1289904333 1289904336 IN IP4 xxxxxxxx
s=AlterProxySoftSwitch
c=IN IP4 xxxxxxxx
t=0 0
m=audio 16416 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15


--- (10 headers 10 lines) ---
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - 0x10c (ulaw|alaw|g729), peer - audio=0x8 (alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port xxxxxxxx:16416
list_route: hop:
set_destination: Parsing for address/port to send to
set_destination: set destination to xxxxxxxx, port 5060
Transmitting (no NAT) to xxxxxxxx:5060:
ACK sip:0479265897436@xxxxxxxx SIP/2.0
Via: SIP/2.0/UDP xxxxxxxx:5060;branch=z9hG4bK6fb15585;rport
Max-Forwards: 70
From: "Anonymous" ;tag=as35f0aa73
To: ;tag=50944984-12168-27207
Contact:
Call-ID: 48700d695b564fd922475fa63edbd151@xxxxxxxx
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.2.5-0ubuntu1
Content-Length: 0


---
asterisk*CLI>

BYE sip:Anonymous@anonymous.invalid SIP/2.0
Via: SIP/2.0/UDP xxxxxxxx:5060;branch=z9hG4bK3095bd82397744f97b71
From: "AlterPSS" ;tag=50944984-12168-27207
To: "Anonymous" ;tag=as35f0aa73
Call-ID: 48700d695b564fd922475fa63edbd151@xxxxxxxx
CSeq: 23977 BYE
Content-Length: 0
Date: Tue, 16 Nov 2010 10:45:38 GMT



--- (8 headers 0 lines) ---
Sending to xxxxxxxx : 5060 (no NAT)


SIP/2.0 200 OK
Via: SIP/2.0/UDP xxxxxxxx:5060;branch=z9hG4bK3095bd82397744f97b71;received=xxxxxxxx
From: "AlterPSS" ;tag=50944984-12168-27207
To: "Anonymous" ;tag=as35f0aa73
Call-ID: 48700d695b564fd922475fa63edbd151@xxxxxxxx
CSeq: 23977 BYE
Server: Asterisk PBX 1.6.2.5-0ubuntu1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0



Really destroying SIP dialog '48700d695b564fd922475fa63edbd151@xxxxxxxx' Method: BYE
#6 22.11.2010 15:53

не ужели ни кто ответа не знает?

может тему перенести в другую ветку?
#7 23.11.2010 11:14

Может это поможет.

The Asterisk Development Team has announced the release of libpri 1.4.11.5.
This release is available for immediate download at
http://downloads.asterisk.org/pub/telephony/libpri/


The following are some of the issues resolved in this release:

* Prevent a CONNECT message from sending a CONNECT ACKNOWLEDGE in the wrong state.
(issue #17360. Reported by: shawkris. Patched by rmudgett)

......

_________________
ys
http://voip.rus.net/
#8 23.11.2010 20:28

для того чтобы это проверить надо компилировать libpri
а для этого нужны исходники asterisk. в итоге придется все пакеты самому компилировать. на это надо время. к сожалению это смогу проверить только в далеком будущем.