Look at this:
U 84.203.148.146:5060 -> 157.190.74.151:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP 157.190.74.151;rport=5060;branch=z9hG4bKcd
17ddd1b59ead49..From: "2092"
<sip:2092@84.203.148.146>;tag=aedc22bd5a3b510c
..To: <sip:2093@84.203.148.146>;tag=acd725e00242a605..Call-ID: 8ffc2d18b218
70b3@157.190.74.151..CSeq: 64735 INVITE..User-Agent: Grandstream BT100 1.0.
5.18..Contact: <sip:2093@172.16.3.31>..Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,
REFER,OPTIONS,INFO,SUBSCRIBE..Content-Type: application/sdp..Supported: rep
laces..Content-Length: 174....v=0..o=2093 8000 0 IN IP4 172.16.3.31..s=SIP
Call..c=IN IP4 84.203.148.146..t=0 0..m=audio 35016 RTP/AVP 0..a=sendrecv..
a=rtpmap:0 PCMU/8000/3..a=ptime:20..a=nortpproxy:yes..
I assume this is where you get an error message. You haven't called
fix_nated_contact() for this message, and in fact I believe there may be an error in the
example where a line has been lost.
192. onreply_route[1] {
193.
194. if (isflagset(6) && status=~"(180)|(183)|2[0-9][0-9]") {
195. if (!search("^Content-Length:\ 0")) {
196. force_rtp_proxy();
197. };
198. } else if (nat_uac_test("1")) {
199. fix_nated_contact();
200. };
201. }
fix_nated_contact() should go in between line 194 and 195.
Could you please confirm that this works? I will look at the config file.
g-(
---- Original Message ----
From: Vivienne Curran
To: serusers(a)lists.iptel.org ; greger(a)teigre.com
Sent: Wednesday, April 06, 2005 04:12 PM
Subject: Re: RTPProxy fails only for Private to Public communication
Just as an extra : I have a sniff of the message for
when a public
client (2092)rings a private client (2093)included at the bottom of
this email. I cant see anything wrong with them but maybe it will
shed more light on the matter.
Vivienne Curran <vivcurran(a)yahoo.co.uk> wrote:
I changed the line modparam("nathelper", "rtpproxy_sock",
"/var/run/rtpproxy.sock") to modparam("nathelper",
"rtpproxy_sock",
"udp:localhost:22222") and started the rtpproxy as ./rtpproxy -s udp
from the relevant directory and this resulted in a series of
"rtpp_command: no response from rtpproxy" and rtpproxy temporarily
disabled" errors. If I return to the original modparam and start it
as ./rtpproxy then it works but like I said when the private client
rings the public client, I get "ERROR: send_rtpp_command: cant read
reply from a RTP Proxy".
Any further ideas? Has anyone on the mailing list experienced this? I
am using the script given in the onsip getting started doc for 0.9.0.
but am using ser 0.8.14.
BR,
Vivienne
"Greger V. Teigre" <greger(a)teigre.com> wrote:
See inline.
Thank you for that Greger. I have altered my
script so that it
exactly mimics the one in the onsip document besides the has_totag
and fix_nated register. All is good when I ring from a private phone
to a public phone i.e. the audio is very clear and the following
messages are in /var/log.
ERROR: extract_body: message body has length zero
ERROR: force_rtp_proxy2: cant extract body from the message.
I assume this is because of the 200 OK to a register message where
theres no sdp?? Is this correct?
That's correct. You will find code in the example configs where we
test for an empty body before calling force_rtp_proxy.
However when I try to phone from public into
private I get:
ERROR: send_rtpp_command: cant read reply from a RTP Proxy.
I find this confusing because I know the rtpproxy is working.
This means that rtpproxy is not responding to a particular message. I
have heard some people have had problems with the socket based
communication. I only use UDP. This is what you do to set up udp
(22222 is default port):
modparam("nathelper", "rtpproxy_sock",
"udp:localhost:22222")
rtpproxy must be started with -s udp:*
g-)
BR
Vivienne.
"Greger V. Teigre" <greger(a)teigre.com> wrote:
Yes, you can use fix_nated_contact instead. It is not entirely
RFC-compliant, but that's what you have in 0.8.14.
The has_totag() only tests to see if the INVITE has a To header,
which means that it is in-dialog and thus is a re-INVITE. An INVITE
will normally not have loose routing unless you have another SIP
proxy forwarding an INVITE to you (in which case you should assume
that the other proxy handles NAT and thus not trigger NAT-related
code). You can safely remove the has_totag() if you use
force_rtp_proxy("l")
g-)
---- Original Message ----
From: Vivienne Curran
To: Greger V. Teigre ; serusers(a)lists.iptel.org
Sent: Tuesday, April 05, 2005 02:25 PM
Subject: Re: [Serusers] Contact Header and SDP not rewritten
> Greger,
>
> Since fix_nated_register does not exist with 0.8.14, will
> fix_nated_contact do instead? Also if I am leaving out the
> has_totag() at the start of the script, will this greatly effect its
> functionality?
>
> Thank you,
> Vivienne
Send instant messages to your online friends
http://uk.messenger.yahoo.com
U 157.190.74.151:5060 -> 84.203.148.146:5060
INVITE sip:2093@84.203.148.146 SIP/2.0..Via: SIP/2.0/UDP
157.190.74.151;bra
nch=z9hG4bKcd17ddd1b59ead49..From: "2092"
<sip:2092@84.203.148.146>;tag=aed
c22bd5a3b510c..To: <sip:2093@84.203.148.146>..Contact:
<sip:2092@157.190.74
.151>..Supported: replaces..Call-ID:
8ffc2d18b21870b3@157.190.74.151..CSeq:
64735 INVITE..User-Agent: Grandstream BT100
1.0.5.18..Max-Forwards: 70..Al
low:
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE..Content-Typ
e: application/sdp..Content-Length: 426....v=0..o=2092 8000 0 IN
IP4 157.19
0.74.151..s=SIP Call..c=IN IP4 157.190.74.151..t=0 0..m=audio 5004
RTP/AVP
0 8 4 18 2 15 99 9 101..a=sendrecv..a=rtpmap:0
PCMU/8000/3..a=rtpmap:8 PCMA
/8000/3..a=rtpmap:4 G723/8000/3..a=rtpmap:18
G729/8000/3..a=rtpmap:2 G726-3
2/8000/3..a=rtpmap:15 G728/8000/3..a=rtpmap:99
iLBC/8000/3..a=fmtp:99 mode=
20..a=rtpmap:9 G722/8000/3..a=ptime:20..a=rtpmap:101
telephone-event/8000/3
..a=fmtp:101 0-11..
U 84.203.148.146:5060 -> 157.190.74.151:5060
SIP/2.0 100 trying -- your call is important to us..Via:
SIP/2.0/UDP 157.19
0.74.151;branch=z9hG4bKcd17ddd1b59ead49;rport=5060..From: "2092"
<sip:2092@
84.203.148.146>;tag=aedc22bd5a3b510c..To:
<sip:2093@84.203.148.146>..Call-I
D: 8ffc2d18b21870b3@157.190.74.151..CSeq: 64735 INVITE..Server: Sip
EXpress
router (0.8.14 (i386/linux))..Content-Length: 0..Warning: 392
84.203.148.1
46:5060 "Noisy feedback tells: pid=8990 req_src_ip=157.190.74.151
req_src_
port=5060 in_uri=sip:2093@84.203.148.146
out_uri=sip:2093@84.203.148.14:506
0 via_cnt==1"....
U 84.203.148.146:5060 -> 84.203.148.14:5060
INVITE sip:2093@84.203.148.14:5060 SIP/2.0..Via: SIP/2.0/UDP
84.203.148.146
;branch=z9hG4bKf51e.b169be72.0..Via: SIP/2.0/UDP
157.190.74.151;rport=5060;
branch=z9hG4bKcd17ddd1b59ead49..From: "2092"
<sip:2092@84.203.148.146>;tag=
aedc22bd5a3b510c..To: <sip:2093@84.203.148.146>..Contact:
<sip:2092@157.190
.74.151:5060>..Supported: replaces..Call-ID:
8ffc2d18b21870b3(a)157.190.74.15
1..CSeq: 64735 INVITE..User-Agent: Grandstream BT100
1.0.5.18..Max-Forwards
: 69..Allow:
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE..Con
tent-Type: application/sdp..Content-Length: 445....v=0..o=2092 8000
0 IN IP
4 157.190.74.151..s=SIP Call..c=IN IP4 84.203.148.146..t=0
0..m=audio 35014
RTP/AVP 0 8 4 18 2 15 99 9 101..a=sendrecv..a=rtpmap:0
PCMU/8000/3..a=rtpm
ap:8 PCMA/8000/3..a=rtpmap:4 G723/8000/3..a=rtpmap:18
G729/8000/3..a=rtpmap
:2 G726-32/8000/3..a=rtpmap:15 G728/8000/3..a=rtpmap:99
iLBC/8000/3..a=fmtp
:99 mode=20..a=rtpmap:9 G722/8000/3..a=ptime:20..a=rtpmap:101
telephone-eve
nt/8000/3..a=fmtp:101 0-11..a=nortpproxy:yes..
U 84.203.148.14:5060 -> 84.203.148.146:5060
SIP/2.0 100 Trying..Via: SIP/2.0/UDP
84.203.148.146;branch=z9hG4bKf51e.b169
be72.0..Via: SIP/2.0/UDP
157.190.74.151;rport=5060;branch=z9hG4bKcd17ddd1b5
9ead49..From: "2092"
<sip:2092@84.203.148.146>;tag=aedc22bd5a3b510c..To: <s
ip:2093@84.203.148.146>..Call-ID:
8ffc2d18b21870b3@157.190.74.151..CSeq: 64
735 INVITE..User-Agent: Grandstream BT100 1.0.5.18..Content-Length:
0....
U 84.203.148.14:5060 -> 84.203.148.146:5060
SIP/2.0 180 Ringing..Via: SIP/2.0/UDP
84.203.148.146;branch=z9hG4bKf51e.b16
9be72.0..Via: SIP/2.0/UDP
157.190.74.151;rport=5060;branch=z9hG4bKcd17ddd1b
59ead49..From: "2092"
<sip:2092@84.203.148.146>;tag=aedc22bd5a3b510c..To: <
sip:2093@84.203.148.146>;tag=acd725e00242a605..Call-ID:
8ffc2d18b21870b3@15
7.190.74.151..CSeq: 64735 INVITE..User-Agent: Grandstream BT100
1.0.5.18..C
ontent-Length: 0....
U 84.203.148.146:5060 -> 157.190.74.151:5060
SIP/2.0 180 Ringing..Via: SIP/2.0/UDP
157.190.74.151;rport=5060;branch=z9hG
4bKcd17ddd1b59ead49..From: "2092"
<sip:2092@84.203.148.146>;tag=aedc22bd5a3
b510c..To: <sip:2093@84.203.148.146>;tag=acd725e00242a605..Call-ID:
8ffc2d1
8b21870b3@157.190.74.151..CSeq: 64735 INVITE..User-Agent:
Grandstream BT100
1.0.5.18..Content-Length: 0....
U 84.203.148.14:5060 -> 84.203.148.146:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
84.203.148.146;branch=z9hG4bKf51e.b169be72
.0..Via: SIP/2.0/UDP
157.190.74.151;rport=5060;branch=z9hG4bKcd17ddd1b59ead
49..From: "2092"
<sip:2092@84.203.148.146>;tag=aedc22bd5a3b510c..To: <sip:2
093@84.203.148.146>;tag=acd725e00242a605..Call-ID:
8ffc2d18b21870b3(a)157.190
.74.151..CSeq: 64735 INVITE..User-Agent: Grandstream BT100
1.0.5.18..Contac
t: <sip:2093@172.16.3.31>..Allow:
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTION
S,INFO,SUBSCRIBE..Content-Type: application/sdp..Supported:
replaces..Conte
nt-Length: 152....v=0..o=2093 8000 0 IN IP4 172.16.3.31..s=SIP
Call..c=IN I
P4 172.16.3.31..t=0 0..m=audio 5004 RTP/AVP
0..a=sendrecv..a=rtpmap:0 PCMU/
8000/3..a=ptime:20..
U 84.203.148.146:5060 -> 157.190.74.151:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
157.190.74.151;rport=5060;branch=z9hG4bKcd
17ddd1b59ead49..From: "2092"
<sip:2092@84.203.148.146>;tag=aedc22bd5a3b510c
..To: <sip:2093@84.203.148.146>;tag=acd725e00242a605..Call-ID:
8ffc2d18b218
70b3@157.190.74.151..CSeq: 64735 INVITE..User-Agent: Grandstream
BT100 1.0.
5.18..Contact: <sip:2093@172.16.3.31>..Allow:
INVITE,ACK,CANCEL,BYE,NOTIFY,
REFER,OPTIONS,INFO,SUBSCRIBE..Content-Type:
application/sdp..Supported: rep
laces..Content-Length: 174....v=0..o=2093 8000 0 IN IP4
172.16.3.31..s=SIP
Call..c=IN IP4 84.203.148.146..t=0 0..m=audio 35016 RTP/AVP
0..a=sendrecv..
a=rtpmap:0 PCMU/8000/3..a=ptime:20..a=nortpproxy:yes..
U 84.203.148.14:5060 -> 84.203.148.146:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
84.203.148.146;branch=z9hG4bKf51e.b169be72
.0..Via: SIP/2.0/UDP
157.190.74.151;rport=5060;branch=z9hG4bKcd17ddd1b59ead
49..From: "2092"
<sip:2092@84.203.148.146>;tag=aedc22bd5a3b510c..To: <sip:2
093@84.203.148.146>;tag=acd725e00242a605..Call-ID:
8ffc2d18b21870b3(a)157.190
.74.151..CSeq: 64735 INVITE..User-Agent: Grandstream BT100
1.0.5.18..Contac
t: <sip:2093@172.16.3.31>..Allow:
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTION
S,INFO,SUBSCRIBE..Content-Type: application/sdp..Supported:
replaces..Conte
nt-Length: 152....v=0..o=2093 8000 1 IN IP4 172.16.3.31..s=SIP
Call..c=IN I
P4 172.16.3.31..t=0 0..m=audio 5004 RTP/AVP
0..a=sendrecv..a=rtpmap:0 PCMU/
8000/3..a=ptime:20..
U 84.203.148.146:5060 -> 157.190.74.151:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
157.190.74.151;rport=5060;branch=z9hG4bKcd
17ddd1b59ead49..From: "2092"
<sip:2092@84.203.148.146>;tag=aedc22bd5a3b510c
..To: <sip:2093@84.203.148.146>;tag=acd725e00242a605..Call-ID:
8ffc2d18b218
70b3@157.190.74.151..CSeq: 64735 INVITE..User-Agent: Grandstream
BT100 1.0.
5.18..Contact: <sip:2093@172.16.3.31>..Allow:
INVITE,ACK,CANCEL,BYE,NOTIFY,
REFER,OPTIONS,INFO,SUBSCRIBE..Content-Type:
application/sdp..Supported: rep
laces..Content-Length: 174....v=0..o=2093 8000 1 IN IP4
172.16.3.31..s=SIP
Call..c=IN IP4 84.203.148.146..t=0 0..m=audio 35016 RTP/AVP
0..a=sendrecv..
a=rtpmap:0 PCMU/8000/3..a=ptime:20..a=nortpproxy:yes..
U 84.203.148.14:5060 -> 84.203.148.146:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
84.203.148.146;branch=z9hG4bKf51e.b169be72
.0..Via: SIP/2.0/UDP
157.190.74.151;rport=5060;branch=z9hG4bKcd17ddd1b59ead
49..From: "2092"
<sip:2092@84.203.148.146>;tag=aedc22bd5a3b510c..To: <sip:2
093@84.203.148.146>;tag=acd725e00242a605..Call-ID:
8ffc2d18b21870b3(a)157.190
.74.151..CSeq: 64735 INVITE..User-Agent: Grandstream BT100
1.0.5.18..Contac
t: <sip:2093@172.16.3.31>..Allow:
INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTION
S,INFO,SUBSCRIBE..Content-Type: application/sdp..Supported:
replaces..Conte
nt-Length: 152....v=0..o=2093 8000 2 IN IP4 172.16.3.31..s=SIP
Call..c=IN I
P4 172.16.3.31..t=0 0..m=audio 5004 RTP/AVP
0..a=sendrecv..a=rtpmap:0 PCMU/
8000/3..a=ptime:20..
U 84.203.148.146:5060 -> 157.190.74.151:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
157.190.74.151;rport=5060;branch=z9hG4bKcd
17ddd1b59ead49..From: "2092"
<sip:2092@84.203.148.146>;tag=aedc22bd5a3b510c
..To: <sip:2093@84.203.148.146>;tag=acd725e00242a605..Call-ID:
8ffc2d18b218
70b3@157.190.74.151..CSeq: 64735 INVITE..User-Agent: Grandstream
BT100 1.0.
5.18..Contact: <sip:2093@172.16.3.31>..Allow:
INVITE,ACK,CANCEL,BYE,NOTIFY,
REFER,OPTIONS,INFO,SUBSCRIBE..Content-Type:
application/sdp..Supported: rep
laces..Content-Length: 174....v=0..o=2093 8000 2 IN IP4
172.16.3.31..s=SIP
Call..c=IN IP4 84.203.148.146..t=0 0..m=audio 35016 RTP/AVP
0..a=sendrecv..
a=rtpmap:0 PCMU/8000/3..a=ptime:20..a=nortpproxy:yes..
Send instant messages to your online friends
http://uk.messenger.yahoo.com