Вход | Регистрация
Вы здесь: Главная / Форум / Главный форум по Asterisk / AstPbx / Криво работает редирект с лоадбалансингом провайдера...

Криво работает редирект с лоадбалансингом провайдера...

Сообщений: 31

Криво работает редирект с лоадбалансингом провайдера...

Имеет быть провайдер, у него стоит Мера. Перед Мерой хитрый провайдер держит лоадбалансер, делающий редирект на адрес:порт наименее загруженного движка.

При этом провайдер клянется, что через "302 "Moved Temporarily" выдает новую урлу с номером порта 5062. Со стороны * этого не видно, а видно, что просто подают тот-же номер.

server*CLI>
-- Executing [7495XXXXXXX@ogogon:1] Dial("SIP/freeset0-08792000", "SIP/prov/7495XXXXXXX|120") in new stack
-- Called iconn/7495XXXXXXX
-- Got SIP response 302 "Moved Temporarily" back from xx.yy.jjj.zzz
-- Now forwarding SIP/freeset0-08792000 to 'Local/7495XXXXXXX@default' (thanks to SIP/prov-0879f000)
-- Executing [7495XXXXXXX@default:1] Dial("Local/7495XXXXXXX@default-e5da,2", "SIP/prov/7495XXXXXXX|120") in new stack
[Nov 27 16:54:49] WARNING[56905]: app_dial.c:1239 dial_exec_full: Skipping dialing interface 'SIP/prov/7495XXXXXXX' again since it has already been dialed
== Spawn extension (default, 7495XXXXXXX, 1) exited non-zero on 'Local/7495XXXXXXX@default-e5da,2'
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [7495XXXXXXX@ogogon:2] Hangup("SIP/freeset0-08792000", "") in new stack
== Spawn extension (ogogon, 7495XXXXXXX, 2) exited non-zero on 'SIP/freeset0-08792000'
server*CLI>


Провайдер описан через users.conf вот так:
[prov]
username=ogogon
secret=XXXXXXXX
trunkname=prov
callerid=Ogogon <7499XXXXXXX>
hasexten=yes
hassip=yes
hasiax=no
registeriax=no
registersip=yes
host=xx.yyy.jjj.zz
insecure=invite
contact=
disallow=all
allow=alaw
;allow=ulaw
allow=g729
nat=yes
canreinvite=update
dtmfmode=info


Провайдер прислал дамп из кот. видно, что и вправду он подает редирект с другим портом.

No. Time Source Destination Protocol Info
1 0.000000 80.73.xxx.yyy 80.239.xxx.yyy SIP/SDP Request: INVITE sip:7495XXXXXXX@80.239.xxx.yyy, with session description

Frame 1 (768 bytes on wire, 768 bytes captured)
Arrival Time: Nov 27, 2009 17:21:36.543512000
[Time delta from previous captured frame: 0.000000000 seconds]
[Time delta from previous displayed frame: 0.000000000 seconds]
[Time since reference or first frame: 0.000000000 seconds]
Frame Number: 1
Frame Length: 768 bytes
Capture Length: 768 bytes
[Frame is marked: False]
[Protocols in frame: eth:ip:udp:sip:sdp]
[Coloring Rule Name: UDP]
[Coloring Rule String: udp]
Ethernet II, Src: Cisco_98:8b:c1 (00:1b:90:98:8b:c1), Dst: Inventec_e2:9d:8a (00:a0:d1:e2:9d:8a)
Destination: Inventec_e2:9d:8a (00:a0:d1:e2:9d:8a)
Address: Inventec_e2:9d:8a (00:a0:d1:e2:9d:8a)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Source: Cisco_98:8b:c1 (00:1b:90:98:8b:c1)
Address: Cisco_98:8b:c1 (00:1b:90:98:8b:c1)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Type: IP (0x0800)
Internet Protocol, Src: 80.73.xxx.yyy (80.73.xxx.yyy), Dst: 80.239.xxx.yyy (80.239.xxx.yyy)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..0. = ECN-Capable Transport (ECT): 0
.... ...0 = ECN-CE: 0
Total Length: 754
Identification: 0xfb8c (64396)
Flags: 0x00
0... = Reserved bit: Not set
.0.. = Don't fragment: Not set
..0. = More fragments: Not set
Fragment offset: 0
Time to live: 51
Protocol: UDP (0x11)
Header checksum: 0xaa72 [correct]
[Good: True]
[Bad : False]
Source: 80.73.xxx.yyy (80.73.xxx.yyy)
Destination: 80.239.xxx.yyy (80.239.xxx.yyy)
User Datagram Protocol, Src Port: iad2 (1031), Dst Port: sip (5060)
Source port: iad2 (1031)
Destination port: sip (5060)
Length: 734
Checksum: 0xa9d4 [validation disabled]
[Good Checksum: False]
[Bad Checksum: False]
Session Initiation Protocol
Request-Line: INVITE sip:7495XXXXXXX@80.239.xxx.yyy SIP/2.0
Method: INVITE
Request-URI: sip:7495XXXXXXX@80.239.xxx.yyy
Request-URI User Part: 7495XXXXXXX
Request-URI Host Part: 80.239.xxx.yyy
[Resent Packet: False]
Message Header
Via: SIP/2.0/UDP 80.73.xxx.yyy:1024;branch=z9hG4bK28b15749;rport
Transport: UDP
Sent-by Address: 80.73.xxx.yyy
Sent-by port: 1024
Branch: z9hG4bK28b15749
RPort: rport
From: "Ogogon" <sip:600@80.73.xxx.yyy:1024>;tag=as5682d03a
SIP Display info: "Ogogon"
SIP from address: sip:600@80.73.xxx.yyy:1024
SIP from address User Part: 600
SIP from address Host Part: 80.73.xxx.yyy
SIP from address Host Port: 1024
SIP tag: as5682d03a
To: <sip:7495XXXXXXX@80.239.xxx.yyy>
SIP to address: sip:7495XXXXXXX@80.239.xxx.yyy
SIP to address User Part: 7495XXXXXXX
SIP to address Host Part: 80.239.xxx.yyy
Contact: <sip:600@80.73.xxx.yyy:1024>
Contact Binding: <sip:600@80.73.xxx.yyy:1024>
URI: <sip:600@80.73.xxx.yyy:1024>
SIP contact address: sip:600@80.73.xxx.yyy:1024
Call-ID: 245f550e26b944fc4d76d4744ae25faf@192.168.1.10
CSeq: 102 INVITE
Sequence Number: 102
Method: INVITE
User-Agent: ATC KBAHT
Max-Forwards: 70
Date: Fri, 27 Nov 2009 12:35:32 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 185
Message Body
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): root 56905 56905 IN IP4 192.168.1.10
Owner Username: root
Session ID: 56905
Session Version: 56905
Owner Network Type: IN
Owner Address Type: IP4
Owner Address: 192.168.1.10
Session Name (s): session
Connection Information (c): IN IP4 80.73.xxx.yyy
Connection Network Type: IN
Connection Address Type: IP4
Connection Address: 80.73.xxx.yyy
Time Description, active time (t): 0 0
Session Start Time: 0
Session Stop Time: 0
Media Description, name and address (m): audio 17860 RTP/AVP 8
Media Type: audio
Media Port: 17860
Media Protocol: RTP/AVP
Media Format: ITU-T G.711 PCMA
Media Attribute (a): rtpmap:8 PCMA/8000
Media Attribute Fieldname: rtpmap
Media Format: 8
MIME Type: PCMA
Sample Rate: 8000
Media Attribute (a): silenceSupp:off - - - -
Media Attribute Fieldname: silenceSupp
Media Attribute Value: off - - - -
Media Attribute (a): ptime:20
Media Attribute Fieldname: ptime
Media Attribute Value: 20
Media Attribute (a): sendrecv
No. Time Source Destination Protocol Info
2 0.000461 80.239.xxx.yyy 80.73.xxx.yyy SIP Status: 100 Trying

Frame 2 (388 bytes on wire, 388 bytes captured)
Arrival Time: Nov 27, 2009 17:21:36.543973000
[Time delta from previous captured frame: 0.000461000 seconds]
[Time delta from previous displayed frame: 0.000461000 seconds]
[Time since reference or first frame: 0.000461000 seconds]
Frame Number: 2
Frame Length: 388 bytes
Capture Length: 388 bytes
[Frame is marked: False]
[Protocols in frame: eth:ip:udp:sip]
[Coloring Rule Name: UDP]
[Coloring Rule String: udp]
Ethernet II, Src: Inventec_e2:9d:8a (00:a0:d1:e2:9d:8a), Dst: Cisco_98:8b:c1 (00:1b:90:98:8b:c1)
Destination: Cisco_98:8b:c1 (00:1b:90:98:8b:c1)
Address: Cisco_98:8b:c1 (00:1b:90:98:8b:c1)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Source: Inventec_e2:9d:8a (00:a0:d1:e2:9d:8a)
Address: Inventec_e2:9d:8a (00:a0:d1:e2:9d:8a)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Type: IP (0x0800)
Internet Protocol, Src: 80.239.xxx.yyy (80.239.xxx.yyy), Dst: 80.73.xxx.yyy (80.73.xxx.yyy)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..0. = ECN-Capable Transport (ECT): 0
.... ...0 = ECN-CE: 0
Total Length: 374
Identification: 0x0000 (0)
Flags: 0x04 (Don't Fragment)
0... = Reserved bit: Not set
.1.. = Don't fragment: Set
..0. = More fragments: Not set
Fragment offset: 0
Time to live: 64
Protocol: UDP (0x11)
Header checksum: 0x5a7b [correct]
[Good: True]
[Bad : False]
Source: 80.239.xxx.yyy (80.239.xxx.yyy)
Destination: 80.73.xxx.yyy (80.73.xxx.yyy)
User Datagram Protocol, Src Port: sip (5060), Dst Port: 1024 (1024)
Source port: sip (5060)
Destination port: 1024 (1024)
Length: 354
Checksum: 0xe06f [validation disabled]
[Good Checksum: False]
[Bad Checksum: False]
Session Initiation Protocol
Status-Line: SIP/2.0 100 Trying
Status-Code: 100
[Resent Packet: False]
Message Header
Via: SIP/2.0/UDP 80.73.xxx.yyy:1024;branch=z9hG4bK28b15749;rport=1031;received=80.73.xxx.yyy
Transport: UDP
Sent-by Address: 80.73.xxx.yyy
Sent-by port: 1024
Branch: z9hG4bK28b15749
RPort: 1031
Received: 80.73.xxx.yyy
From: "Ogogon" <sip:600@80.73.xxx.yyy:1024>;tag=as5682d03a
SIP Display info: "Ogogon"
SIP from address: sip:600@80.73.xxx.yyy:1024
SIP from address User Part: 600
SIP from address Host Part: 80.73.xxx.yyy
SIP from address Host Port: 1024
SIP tag: as5682d03a
To: <sip:7495XXXXXXX@80.239.xxx.yyy>
SIP to address: sip:7495XXXXXXX@80.239.xxx.yyy
SIP to address User Part: 7495XXXXXXX
SIP to address Host Part: 80.239.xxx.yyy
Call-ID: 245f550e26b944fc4d76d4744ae25faf@192.168.1.10
CSeq: 102 INVITE
Sequence Number: 102
Method: INVITE
Server: MERA MVTS3G v.3.10.4-04-Release
Content-Length: 0
No. Time Source Destination Protocol Info
3 0.000736 80.239.xxx.yyy 80.73.xxx.yyy SIP Status: 302 Moved Temporarily

Frame 3 (489 bytes on wire, 489 bytes captured)
Arrival Time: Nov 27, 2009 17:21:36.544248000
[Time delta from previous captured frame: 0.000275000 seconds]
[Time delta from previous displayed frame: 0.000275000 seconds]
[Time since reference or first frame: 0.000736000 seconds]
Frame Number: 3
Frame Length: 489 bytes
Capture Length: 489 bytes
[Frame is marked: False]
[Protocols in frame: eth:ip:udp:sip]
[Coloring Rule Name: UDP]
[Coloring Rule String: udp]
Ethernet II, Src: Inventec_e2:9d:8a (00:a0:d1:e2:9d:8a), Dst: Cisco_98:8b:c1 (00:1b:90:98:8b:c1)
Destination: Cisco_98:8b:c1 (00:1b:90:98:8b:c1)
Address: Cisco_98:8b:c1 (00:1b:90:98:8b:c1)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Source: Inventec_e2:9d:8a (00:a0:d1:e2:9d:8a)
Address: Inventec_e2:9d:8a (00:a0:d1:e2:9d:8a)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Type: IP (0x0800)
Internet Protocol, Src: 80.239.xxx.yyy (80.239.xxx.yyy), Dst: 80.73.xxx.yyy (80.73.xxx.yyy)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..0. = ECN-Capable Transport (ECT): 0
.... ...0 = ECN-CE: 0
Total Length: 475
Identification: 0x0000 (0)
Flags: 0x04 (Don't Fragment)
0... = Reserved bit: Not set
.1.. = Don't fragment: Set
..0. = More fragments: Not set
Fragment offset: 0
Time to live: 64
Protocol: UDP (0x11)
Header checksum: 0x5a16 [correct]
[Good: True]
[Bad : False]
Source: 80.239.xxx.yyy (80.239.xxx.yyy)
Destination: 80.73.xxx.yyy (80.73.xxx.yyy)
User Datagram Protocol, Src Port: sip (5060), Dst Port: 1024 (1024)
Source port: sip (5060)
Destination port: 1024 (1024)
Length: 455
Checksum: 0xe0d4 [validation disabled]
[Good Checksum: False]
[Bad Checksum: False]
Session Initiation Protocol
Status-Line: SIP/2.0 302 Moved Temporarily
Status-Code: 302
[Resent Packet: False]
Message Header
Via: SIP/2.0/UDP 80.73.xxx.yyy:1024;branch=z9hG4bK28b15749;rport=1031;received=80.73.xxx.yyy
Transport: UDP
Sent-by Address: 80.73.xxx.yyy
Sent-by port: 1024
Branch: z9hG4bK28b15749
RPort: 1031
Received: 80.73.xxx.yyy
From: "Ogogon" <sip:600@80.73.xxx.yyy:1024>;tag=as5682d03a
SIP Display info: "Ogogon"
SIP from address: sip:600@80.73.xxx.yyy:1024
SIP from address User Part: 600
SIP from address Host Part: 80.73.xxx.yyy
SIP from address Host Port: 1024
SIP tag: as5682d03a
To: <sip:7495XXXXXXX@80.239.xxx.yyy>;tag=5438180-269475952-2684354688-2375934673
SIP to address: sip:7495XXXXXXX@80.239.xxx.yyy
SIP to address User Part: 7495XXXXXXX
SIP to address Host Part: 80.239.xxx.yyy
SIP tag: 5438180-269475952-2684354688-2375934673
Call-ID: 245f550e26b944fc4d76d4744ae25faf@192.168.1.10
CSeq: 102 INVITE
Sequence Number: 102
Method: INVITE
Contact: <sip:7495XXXXXXX@80.239.xxx.yyy:5062>
Contact Binding: <sip:7495XXXXXXX@80.239.xxx.yyy:5062>
URI: <sip:7495XXXXXXX@80.239.xxx.yyy:5062>
SIP contact address: sip:7495XXXXXXX@80.239.xxx.yyy:5062
Server: MERA MVTS3G v.3.10.4-04-Release
Content-Length: 0
No. Time Source Destination Protocol Info
4 0.068762 80.73.xxx.yyy 80.239.xxx.yyy SIP Request: ACK sip:7495XXXXXXX@80.239.xxx.yyy

Frame 4 (462 bytes on wire, 462 bytes captured)
Arrival Time: Nov 27, 2009 17:21:36.612274000
[Time delta from previous captured frame: 0.068026000 seconds]
[Time delta from previous displayed frame: 0.068026000 seconds]
[Time since reference or first frame: 0.068762000 seconds]
Frame Number: 4
Frame Length: 462 bytes
Capture Length: 462 bytes
[Frame is marked: False]
[Protocols in frame: eth:ip:udp:sip]
[Coloring Rule Name: UDP]
[Coloring Rule String: udp]
Ethernet II, Src: Cisco_98:8b:c1 (00:1b:90:98:8b:c1), Dst: Inventec_e2:9d:8a (00:a0:d1:e2:9d:8a)
Destination: Inventec_e2:9d:8a (00:a0:d1:e2:9d:8a)
Address: Inventec_e2:9d:8a (00:a0:d1:e2:9d:8a)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Source: Cisco_98:8b:c1 (00:1b:90:98:8b:c1)
Address: Cisco_98:8b:c1 (00:1b:90:98:8b:c1)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Type: IP (0x0800)
Internet Protocol, Src: 80.73.xxx.yyy (80.73.xxx.yyy), Dst: 80.239.xxx.yyy (80.239.xxx.yyy)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..0. = ECN-Capable Transport (ECT): 0
.... ...0 = ECN-CE: 0
Total Length: 448
Identification: 0xfb8f (64399)
Flags: 0x00
0... = Reserved bit: Not set
.0.. = Don't fragment: Not set
..0. = More fragments: Not set
Fragment offset: 0
Time to live: 51
Protocol: UDP (0x11)
Header checksum: 0xaba1 [correct]
[Good: True]
[Bad : False]
Source: 80.73.xxx.yyy (80.73.xxx.yyy)
Destination: 80.239.xxx.yyy (80.239.xxx.yyy)
User Datagram Protocol, Src Port: iad2 (1031), Dst Port: sip (5060)
Source port: iad2 (1031)
Destination port: sip (5060)
Length: 428
Checksum: 0xa653 [validation disabled]
[Good Checksum: False]
[Bad Checksum: False]
Session Initiation Protocol
Request-Line: ACK sip:7495XXXXXXX@80.239.xxx.yyy SIP/2.0
Method: ACK
Request-URI: sip:7495XXXXXXX@80.239.xxx.yyy
Request-URI User Part: 7495XXXXXXX
Request-URI Host Part: 80.239.xxx.yyy
[Resent Packet: False]
[Request Frame: 1]
[Response Time (ms): 68]
Message Header
Via: SIP/2.0/UDP 80.73.xxx.yyy:1024;branch=z9hG4bK28b15749;rport
Transport: UDP
Sent-by Address: 80.73.xxx.yyy
Sent-by port: 1024
Branch: z9hG4bK28b15749
RPort: rport
From: "Ogogon" <sip:600@80.73.xxx.yyy:1024>;tag=as5682d03a
SIP Display info: "Ogogon"
SIP from address: sip:600@80.73.xxx.yyy:1024
SIP from address User Part: 600
SIP from address Host Part: 80.73.xxx.yyy
SIP from address Host Port: 1024
SIP tag: as5682d03a
To: <sip:7495XXXXXXX@80.239.xxx.yyy>;tag=5438180-269475952-2684354688-2375934673
SIP to address: sip:7495XXXXXXX@80.239.xxx.yyy
SIP to address User Part: 7495XXXXXXX
SIP to address Host Part: 80.239.xxx.yyy
SIP tag: 5438180-269475952-2684354688-2375934673
Contact: <sip:600@80.73.xxx.yyy:1024>
Contact Binding: <sip:600@80.73.xxx.yyy:1024>
URI: <sip:600@80.73.xxx.yyy:1024>
SIP contact address: sip:600@80.73.xxx.yyy:1024
Call-ID: 245f550e26b944fc4d76d4744ae25faf@192.168.1.10
CSeq: 102 ACK
Sequence Number: 102
Method: ACK
User-Agent: ATC KBAHT
Max-Forwards: 70
Content-Length: 0


Что делать, чтобы * принимал этот редирект по-людски?

Ogogon.
2009-11-27 20:39

Avatara of zzuz
Откуда: SPb
Сообщений: 1307

Re: Криво работает редирект с лоадбалансингом провайдера...

Мера... РРРРРРРР... опять она!!! злая система.. в Московии на ней помешаны.. мне эти дампы уже сняться... жуть! мне всегда инженеры , обслуживающие это зло , пытались впаривать , что я постоянно неправ.. в итоге - переоформление договора , смена провайдера , переподключение линков на E1 (и то через многа многа времени)
http://линия24.рф - Астериск и прочие бубны!
2009-11-27 22:42

Сообщений: 866

Re: Криво работает редирект с лоадбалансингом провайдера...

я думаю promiscredir это оно
В любом случае лучше приводить sip-дебаг со стороны астериска на астерисковском форуме а не какой-то там меры :)
2009-11-27 23:19

Сообщений: 31

Re: Криво работает редирект с лоадбалансингом провайдера...

dimas:

я думаю promiscredir это оно
Оказалось, и вправду оно. Тханкс...
2009-12-04 07:51

Добавить страницу в закладки:  Delicious Google Slashdot Yahoo Yandex.ru Reddit Digg Technorati Bobrdobr.ru Newsland.ru Smi2.ru Rumarkz.ru Vaau.ru Memori.ru Rucity.com Moemesto.ru News2.ru Mister-Wong.ru Myscoop.ru 100zakladok.ru