Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-03-05 Thread Bogdan-Andrei Iancu
Hello Rudy, Be sure you use t_relay() when forwarding the REGISTER request (and not forward() function). Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 23.02.2014 20:32, Rudy Eschauzier wrote: Ok, I think I am getting there. I am able to

Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-02-23 Thread Rudy Eschauzier
Alright. Maybe I am getting the hang of it then ;) Thanks for your help! Rudy. On Sat, 2/22/14, Bogdan-Andrei Iancu bog...@opensips.org wrote: Subject: Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT To: Rudy Eschauzier

Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-02-23 Thread Rudy Eschauzier
Ok, I think I am getting there. I am able to forward the client registration to Asterisk, and Twinkle reports registration succeeded (YES!). I am having some trouble saving the location, however. This is what I have: onreply_route {         xlog(incoming reply\n); xlog(L_INFO,\n\n$C(bc)[ 

Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-02-22 Thread Rudy Eschauzier
Bogdan, One more question about logging. I want to check if the sip message is properly mangled by fix_nated_register() and fix_nated_contact(). I've tried it like this: fix_nated_register(); xlog(L_INFO,$avp(rcv)); fix_nated_contact(); xlog(L_INFO,\n\n$ct, $(ct[1])\n);

Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-02-22 Thread Bogdan-Andrei Iancu
Hello Rudy, fix_nated_contact() changes the URI in the contact HDR - as any change (in OpenSIPS) over the message is not done in realtime (updating the message buffer). The changes are recorded (as lumps) and applied to the message only when the message is sent out on the network. So you

Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-02-22 Thread Rudy Eschauzier
Hi Bogdan, So you cannot see your own changes in the script, but you can see them in the outbound message. You mean using WireShark, right? Is there any way to have OpenSips itself report on the message it sends out? Other than that, is the use of fix_nated_register() and

Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-02-22 Thread Bogdan-Andrei Iancu
Rudy, Yes, you can see the messages sent out by OpenSIPS with any network capturing tool like wireshark, ngrep , tcpdump. OpenSIPS does not print the outgoing messages in order to avoid flooding the logs (keep in mind an OpenSIPS instance can do more than 10K cps!). If you simply forward

Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-02-22 Thread Rudy Eschauzier
If you simply forward the REGISTERs (without localing handling them with registrar module), makes no sense to use fix_nated_registrar() - use only fix_nated_contact(). Don't I need to fix the registration and save to usrloc to allow keepalive through the nat? I thought that is what

Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-02-22 Thread Bogdan-Andrei Iancu
I was just explaining the scenarios for using the 2 functions :). In your case, saving the REGISTER local and forwarding it also, you will need to use both functions in the same time. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 22.02.2014

Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-02-20 Thread Bogdan-Andrei Iancu
Yes, it work for it, but for TCP based protocols you need (aside the pinging) to take care of keeping the connection up (opensips may close it if not used) - but using registrar (via save()) will take care of this automatically. Also look into tcp_no_new_conn_bflag:

Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-02-20 Thread Rudy Eschauzier
This is extremely helpful. I think I have enough to get started. Thanks so much! Rudy. On Thu, 2/20/14, Bogdan-Andrei Iancu bog...@opensips.org wrote: Subject: Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT To: Rudy

Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-02-19 Thread Rudy Eschauzier
Hi Bogdan, Thanks for your response. I did investigate both nathelper and nat_traversal. My conclusion was that nathelper doesn't qualify per the requirements below, because it requires rtpproxy to do the nat keepalive. I probably missed something there. With nat_traversal being the better

Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-02-19 Thread Nick Cameo
You will need RTPProxy to manage the media and proxy that over to asterisk in order not to get `retransmission timeouts`. RTP Proxy is very versatile, perfect for far-end NAT setups. We use it in our deployment. You can hit me up if you require a working config. OpenSIPS does not manage media

Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-02-19 Thread Bogdan-Andrei Iancu
Hello, Nathelper does not require rtpproxy for nat keepalive - the nat keepalive is at signaling level, while rtpproxy is exclusively for media pinning. Nathelper is using the usrloc (registration based) for doing the nat pinging (to remember which destinations need to be pinged).

Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-02-19 Thread Rudy Eschauzier
Hello, Nathelper does not require rtpproxy for nat keepalive - the nat keepalive is at signaling level, while rtpproxy is exclusively for media pinning. Ah, ok. Nathelper is using the usrloc (registration based) for doing the nat pinging (to remember which destinations need to be

Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-02-19 Thread Bogdan-Andrei Iancu
On 19.02.2014 20:29, Rudy Eschauzier wrote: Nathelper is using the usrloc (registration based) for doing the nat pinging (to remember which destinations need to be pinged). I see, but doesn't that mean that the uac will need to register with OpenSips, instead of what I am trying to

[OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-02-18 Thread Rudy Eschauzier
My Asterisk appliance works poorly with NATed clients. Now I'd like to run OpenSips on my internet-facing router to help the NAT performance. Although I understand that OpenSips is the preferred choice for registrating clients, the fact that the Asterisk appliance is a closed box forces me to

Re: [OpenSIPS-Users] OpenSips as simple frontend to Asterisk to deal with NAT

2014-02-18 Thread Bogdan-Andrei Iancu
Hello, yes, you can do all of those with OpenSIPS - it is just a matter of scripting logic and using the one of the nat handling modules: nathelper - http://www.opensips.org/html/docs/modules/1.10.x/nathelper.html nat_traversal -