Woops meant to send this to list
-----Original Message-----
This is working now, I had my t_relay/forward's below the t_on_reply but
they didn't work. I went back to the default nathelper.cfg and it seems
to work. Also to note, for some reason asterisk, sipura's, and
grandstream's don't seem to work with any uri==myself statements. Even
if you debug sip it'll show it's going to the proper address.
Thanks.
-----Original Message-----
From: Greger V. Teigre [mailto:greger@teigre.com]
Hi Matt,
When a non-NATed incoming call to a NATed client is processed (INVITE),
you must make sure that you have a t_on_reply("1"); before you call
t_relay (or forward). The INVITE will not be detected as behind a NAT,
but the destination is (flag is set), and the reply will take care of
the rewrite.
In your config, it looks like you call t_relay before setting
t_on_reply("1"); further down. A forward will only forward the SIP
INVITE to another SIP proxy for processing.
Paul (Java Rockx) just recently posted his config file with a
working NAThelper/RTPproxy setup. I suggest you look at the call logic
found there. His config is also easy to read with a lot of nice headers
I haven't tested RTP proxy between a client behind NAT and Asterisk,
but I believe that as long as you record-route the INVITE (as you do)
and handle the replies properly, it should work.
g-)
I'm having a strange problem with getting SER+RTPProxy to work when the
UA is behind NAT
Setup is as follows
UA --> NAT1 --> SER+RTPProxy --> NAT2 --> Asterisk
I've got RTPProxy running in "bridge" mode, gatewaying 'tween Asterisk
and the Public Internet
SIP traffic all routes perfectly. STUN enabled clients work perfectly.
The problem is that if the outbound port on NAT1 for the RTP stream is
*different* from the outbound port from the UA, then RTPProxy persists
in sending the packets to the UA port, *not* the NAT1 port.
e.g.
if the SDP payload from the UA contains
c=IN IP4 192.168.5.100
m=audio 16396 RTP/AVP....
but NAT1 sends the RTP stream out on port 64003, then rtpproxy sends the
media from Asterisk back to port 16393 at NAT1, instead of to port 64003
at NAT1!
Is it supposed to do this? Am I missing something really obvious?
The relevant section from ser.cfg is as follows
if (nat_uac_test("3")) {
if (method == "REGISTER" || ! search("^Record-Route:")) {
fix_nated_contact(); # Rewrite contact with source IP of signalling
if (method == "INVITE") {
fix_nated_sdp("1"); # Add direction=active to SDP
};
setflag(6); # Mark as NATed
};
};
rewritehostport("........");
if (force_rtp_proxy("FEI")) {
t_on_reply("4");
};
.
.
.
onreply_route[4] {
if (!(status=~"183" || status=~"200")) {
break;
};
fix_nated_contact();
force_rtp_proxy("F");
break;
}
folks, i think i am having a nat problem. my client is timing out while
trying to contact the ser server. i am using stun which appears to be
working ok. i am including the output from my kphone client as well
as the ser server, hoping someone on the lilst can help me decipher what
is going on here. i dont know if the "No Route headers found" is
the problem or what...
tia,
daryl
kphone client:
% kphone
Found 2 interfaces.
SipClient: Listening UDP on port: 5062
SipClient: Our address: 192.168.52.150
SipClient: STUN request
SipClient: Receiving message...
SipClient: STUN response
address_port: 60192
address: 64.175.61.138
SipRegister: Auth is '(null)'
SipRegister: Proxy Auth is '(null)'
SipClient: Sending: 16:10:04.906
--------------------------------
REGISTER sip:weblane.com SIP/2.0
Via: SIP/2.0/UDP 64.175.61.138:60192
CSeq: 4765 REGISTER
To: "Daryl Williams" <sip:daryl@weblane.com>
Expires: 900
From: "Daryl Williams" <sip:daryl@weblane.com>
Call-ID: 1134872665(a)192.168.52.150
Content-Length: 0
User-Agent: kphone/4.0.3
Event: registration
Allow-Events: presence
Contact: "Daryl Williams"
<sip:daryl@64.175.61.138:60192;transport=udp>;methods="INVITE, MESSAGE,
INFO, SUBSCRIBE, OPTIONS, BYE, CANCEL, NOTIFY, ACK, REFER"
ser server:
0(99885) SIP Request:
0(99885) method: <REGISTER>
0(99885) uri: <sip:weblane.com>
0(99885) version: <SIP/2.0>
0(99885) parse_headers: flags=1
0(99885) end of header reached, state=5
0(99885) parse_headers: Via found, flags=1
0(99885) parse_headers: this is the first via
0(99885) After parse_msg...
0(99885) preparing to run routing scripts...
0(99885) DEBUG : is_maxfwd_present: searching for max_forwards header
0(99885) parse_headers: flags=128
0(99885) get_hdr_field: cseq <CSeq>: <4044> <REGISTER>
0(99885) end of header reached, state=9
0(99885) DEBUG: get_hdr_field: <To> [42]; uri=[sip:daryl@weblane.com]
0(99885) DEBUG: to body ["Daryl Williams" <sip:daryl@weblane.com>
]
0(99885) DEBUG: get_hdr_body : content_length=0
0(99885) found end of header
0(99885) DEBUG: is_maxfwd_present: max_forwards header not found!
0(99885) end of header reached, state=9
0(99885) parse_headers: flags=256
0(99885) find_first_route(): No Route headers found
0(99885) loose_route(): There is no Route HF
0(99885) parse_headers: flags=-1
0(99885) parse_headers: flags=-1
0(99885) check_via_address(64.175.61.138, 64.175.61.138, 0)
0(99885) lookup(): '' Not found in usrloc
0(99885) parse_headers: flags=-1
0(99885) check_via_address(64.175.61.138, 64.175.61.138, 0)
0(99885) receive_msg: cleaning up
0(99885) SIP Request:
0(99885) method: <REGISTER>
0(99885) uri: <sip:weblane.com>
0(99885) version: <SIP/2.0>
0(99885) parse_headers: flags=1
0(99885) end of header reached, state=5
0(99885) parse_headers: Via found, flags=1
0(99885) parse_headers: this is the first via
0(99885) After parse_msg...
0(99885) preparing to run routing scripts...
0(99885) DEBUG : is_maxfwd_present: searching for max_forwards header
0(99885) parse_headers: flags=128
0(99885) get_hdr_field: cseq <CSeq>: <4044> <REGISTER>
0(99885) end of header reached, state=9
0(99885) DEBUG: get_hdr_field: <To> [42]; uri=[sip:daryl@weblane.com]
0(99885) DEBUG: to body ["Daryl Williams" <sip:daryl@weblane.com>
]
0(99885) DEBUG: get_hdr_body : content_length=0
0(99885) found end of header
0(99885) DEBUG: is_maxfwd_present: max_forwards header not found!
0(99885) end of header reached, state=9
0(99885) parse_headers: flags=256
0(99885) find_first_route(): No Route headers found
0(99885) loose_route(): There is no Route HF
0(99885) parse_headers: flags=-1
0(99885) parse_headers: flags=-1
0(99885) check_via_address(64.175.61.138, 64.175.61.138, 0)
0(99885) lookup(): '' Not found in usrloc
0(99885) parse_headers: flags=-1
0(99885) check_via_address(64.175.61.138, 64.175.61.138, 0)
0(99885) receive_msg: cleaning up
I'm trying to compile ser 0.8.14 in a Fedora Core 2 with the following line
make modules="mysql dbtext ext extcmd xlog" profile=-pg all
and i receive this errors:
make: *** mysql: No such file or directory. Stop.
make: *** dbtext: No such file or directory. Stop.
make: *** ext: No such file or directory. Stop.
make: *** extcmd: No such file or directory. Stop.
make: *** xlog: No such file or directory. Stop.
When i compile without option everything works fine. And it compiles me the
xlog module, but not the mysql module or the others ones.
I have installed this mysql packages:
mysql-3.23.58-9
freeradius-mysql-0.9.3-4
mysql-server-3.23.58-9
php-mysql-4.3.8-2.1
mod_auth_mysql-20030510-4.1
mysql-devel-3.23.58-9
What can be the problem?
Thank you very much.
JESUS
My ser server is utilizing nathelper and rtp proxy. I have user agents on
two different networks, and each behind their own nat, communicating
successfully.
I'm having difficulty however having two user agents on the same network
behind the same nat communicating with each other. Both user agents register
on the SER server. When I call one user agent from the other, a connection
is made, but voice cannot be heard. I think rtp proxy is confused. Has
anyone implemented this successfully?
Thanks in advance.
Hello,
i try to test a leadtech ATA with SER.
when i try to register this agent to the SER with nathelper the ATA always
send the same request, i think that he drop the response from the server.
What is false in the response ?
thanks
Laurent
The script I posted will not work with ser-0.8.14
You **must** check out ser-0.8.99-dev17 from Berlios CVS because this ser.cfg uses many features
of ser that are only available in the unstable version.
Regards,
Paul
--- S Shah <shah(a)zynergy.com> wrote:
> Paul,
> I wanted to try your ser.cfg file but I'm getting a lot of errors when I try
> to run SER using that ser.cfg file. I have version 8.14 installed on redhat
> 9.
> I don't have the modules: uri_db.so, speeddial.so, options.so. The function
> fix_nated_register also cannot be found.
>
> What am I missing?
> Thanks.
> Sher
>
> -----Original Message-----
> From: Java Rockx [mailto:javarockx@yahoo.com]
> Sent: Saturday, November 20, 2004 4:06 PM
> To: Greger V. Teigre; ser users
> Subject: Re: [Serusers] Revisted Error: force_rtp_proxy2:
> can'textractbodyfrom the message
>
> Greger,
>
> I finally got everything working without STUN and without an Outbound Proxy.
> I an only using
> rtpproxy/nathelper.
>
> I've tested these settings with the following SIP Phones/ATAs
>
> Sipura
> UTstarcom iAN-02EX
> Grandstream ATA486
> Grandstream BT100
> Cisco ATA186
> Cisco 7960G
> WorldAccxx ATA
> X-Ten Pro
> X-Ten Lite
>
> We are very happy with everything now. The only piece of the puzzle that I
> don't have working yet
> is sems/sipums for voicemail - but I'm working on that.
>
> Attached is my complete ser.cfg file that is working. Please note that I'm
> using ser-0.8.99-dev17
> for this rather than ser-0.8.14
>
> If anyone finds problems in this ser.cfg then please let me know - but like
> I said before, things
> seem very stable right now with -dev17.
>
> Regards,
> Paul
>
>
>
> --- "Greger V. Teigre" <greger(a)teigre.com> wrote:
>
> > Good to get an authoriative answer on this. I think I should allocate
> some
> > time to read the RFC thoroughly.
> > This leads back to my guess that it could be Paul's outbound proxy setting
> > that fixed the problem. I would think that are some Grandstream people
> this
> > list, but anyway a bug report should be submitted to Grandstream. This
> was
> > a hard bug to track. Paul?
> > g-)
> >
> > Jan Janak wrote:
> > > No, ser does not change Record-Route to Route header field, user
> > > agents are supposed to do it. SER does only two things:
> > >
> > > 1) Adds Record-Route header fields with its own IP address (this is
> > > what record_route function does)
> > > 2) Removes the topmost Route header field if it contains its own IP
> > > address (according to the IP) and forwards the message to the IP in
> > > the next Route header field if any. If there is no other Route
> > > header field then the Request-URI would be used.
> > >
> > > If there are some Route header fields missing in ACK then this is a
> > > bug in the calling user agent, not SER.
> > >
> > > Jan.
> > >
> > > On 18-11 21:16, Greger V. Teigre wrote:
> > >> I believe the changes are done in the rr module, in the loose.c file.
> > >> RFC3261 defines this (as mentioned by the Sonus guys).
> > >> I remember vaguely reading something about equivalence between
> > >> defining outbund proxy on the client and a Route header, but I'm way
> > >> off stable ground here... However, if I remember correctly, it is
> > >> probably the outbound proxy and not the stun settings that does the
> > >> trick. I have seen some discussions on loose routing earlier this
> > >> fall, maybe a search on loose routing in the archives can turn up
> > >> some new approaches?
> > >>
> > >> I'm afraid I don't have anything more to contribute here. From all I
> > >> can see, ser should change the Record-Routes to Route, but doesn't,
> > >> and I don't understand why. I think we need somebody with a more
> > >> in-depth understanding of the ser inner workings.
> > >> g-)
> > >>
> > >>
> > >> ----- Original Message -----
> > >> From: "Java Rockx" <javarockx(a)yahoo.com>
> > >> To: "Greger V. Teigre" <greger(a)teigre.com>; "ser users"
> > >> <serusers(a)lists.iptel.org> Sent: Thursday, November 18, 2004 08:21 PM
> > >> Subject: Re: [Serusers] Revisted Error: force_rtp_proxy2: can't
> > >> extract bodyfrom the message
> > >>
> > >>
> > >>> Greger,
> > >>>
> > >>> Do you have any idea how SER decides to include a "Route:" versus a
> > >>> "Record-Route:" header? If so,
> > >>> which piece of code in ser would write the second ACK below?
> > >>>
> > >>> Here is a "200 OK" and two ACKs - The first ACK is good and the
> > >>> second ACK is bad because it
> > >>> should have a "Route:" header referring to the Sonus box.
> > >>>
> > >>> 100.99.99.99.99 is my SER proxy
> > >>> 100.10.10.10 is the public side of my firewall
> > >>> 216.50.50.50 is the ip of the Sonus box
> > >>>
> > >>> So the ACK from SER to Sonus is incorrect.
> > >>>
> > >>> Do you think this is worth posing to Jiri, Andrei, and company? All
> > >>> I know is that this ACK is bad
> > >>> when STUN is not used and it is good when STUN is used. I did
> > >>> upgrade my Grandstream, but that
> > >>> didn't help, and I've modified my nat_uac_test to use mode==19
> > >>> rather than mode==3, but still get
> > >>> the same results.
> > >>>
> > >>> Regards,
> > >>> Paul
> > >>>
> > >>> U 2004/11/18 14:13:08.419098 100.99.99.99:5060 -> 100.10.10.10:5060
> > >>> SIP/2.0 200 OK.
> > >>> Via: SIP/2.0/UDP
> > >>>
> 192.168.0.83;rport=5060;received=100.10.10.10;branch=z9hG4bKa70081ccdd52daf0
> .
> > >>> To: <sip:14075551212@sip.mycompany.com;user=phone>;tag=069c9797.
> > >>> From: "Paul (1002)"
> > >>> <sip:9990010001@sip.mycompany.com;user=phone>;tag=92691bb29380c100.
> > >>> Call-ID: e37c04be3e50ea72(a)192.168.0.83.
> > >>> CSeq: 21752 INVITE.
> > >>> Contact: sip:4075551212@216.50.50.50:5060.
> > >>> Record-Route: <sip:216.50.50.50:5060;lr>.
> > >>> Record-Route: <sip:100.99.99.99;ftag=92691bb29380c100;lr=on>.
> > >>> Accept: multipart/mixed, application/sdp, application/isup,
> > >>> application/dtmf,
> > >>> application/dtmf-relay.
> > >>> Allow: OPTIONS, INVITE, CANCEL, ACK, BYE, PRACK, INFO.
> > >>> Supported: timer.
> > >>> Content-Disposition: session;handling=required.
> > >>> Content-Type: application/sdp.
> > >>> Session-Expires: 240;refresher=uas.
> > >>> .
> > >>> v=0.
> > >>> o=Sonus_UAC 18748 26881 IN IP4 216.229.118.76.
> > >>> s=SIP Media Capabilities.
> > >>> c=IN IP4 100.99.99.99.
> > >>> t=0 0.
> > >>> m=audio 35552 RTP/AVP 18 101.
> > >>> a=rtpmap:18 G729/8000.
> > >>> a=rtpmap:101 telephone-event/8000.
> > >>> a=fmtp:101 0-15.
> > >>> a=sendrecv.
> > >>> a=nortpproxy:yes.
> > >>>
> > >>> #
> > >>> U 2004/11/18 14:13:08.428394 100.10.10.10:5060 -> 100.99.99.99:5060
> > >>> ACK sip:4075551212@216.50.50.50:5060 SIP/2.0.
> > >>> Via: SIP/2.0/UDP 192.168.0.83;branch=z9hG4bKf4bb608e498ec61d.
> > >>> Route: <sip:100.99.99.99;ftag=92691bb29380c100;lr=on>.
> > >>> Route: <sip:216.50.50.50:5060;lr>.
> > >>> From: "Paul (1002)"
> > >>> <sip:9990010001@sip.mycompany.com;user=phone>;tag=92691bb29380c100.
> > >>> To: <sip:14075551212@sip.mycompany.com;user=phone>;tag=069c9797.
> > >>> Contact: <sip:9990010001@192.168.0.83;user=phone>.
> > >>> Call-ID: e37c04be3e50ea72(a)192.168.0.83.
> > >>> CSeq: 21752 ACK.
> > >>> User-Agent: Grandstream BT100 1.0.5.16.
> > >>> Max-Forwards: 70.
> > >>> Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE.
> > >>> .
> > >>>
> > >>> #
> > >>> U 2004/11/18 14:13:08.429879 100.99.99.99:5060 -> 216.50.50.50:5060
> > >>> ACK sip:216.50.50.50:5060;lr SIP/2.0.
> > >>> Via: SIP/2.0/UDP
> > >>> 100.99.99.99;branch=z9hG4bK2b35.552edb80cbf475b9be9ae3f9db23f960.0.
> > >>> Via: SIP/2.0/UDP
> > >>>
> 192.168.0.83;rport=5060;received=100.10.10.10;branch=z9hG4bKf4bb608e498ec61d
> .
> > >>> From: "Paul (1002)"
> > >>> <sip:9990010001@sip.mycompany.com;user=phone>;tag=92691bb29380c100.
> > >>> To: <sip:14075551212@sip.mycompany.com;user=phone>;tag=069c9797.
> > >>> Contact: <sip:9990010001@100.10.10.10:5060;user=phone>.
> > >>> Call-ID: e37c04be3e50ea72(a)192.168.0.83.
>
=== message truncated ===
__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com
I'm having trouble understanding the way i connect a
third-party gateway to my SIP Server.
Should the GW Register to my server or should my
server register to the GW?? or Both?
The third-party GW people provided me an account
number, a password, a gateway number and a
server name. I'm not sure how to use this information,
if anyone can help me i'll be grateful.
Regards
Andr�s Parra L.
Ipsofactum LTD
www.ipsofactum.com
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - Get yours free!
http://my.yahoo.com