modparam("usrloc", "nat_bflag", 6) # or any other free flag ... if(lookup("location")) { if(isbflagset(6)) { # use mediaproxy if not already done # (make sure to not call it twice)
} ... }
Sergio Gutierrez wrote:
Hi Andreas.
Thanks for your answer. I that case, as you say, how should I setup the configuration?
After doing lookup("location"), how could I check nat-flag?
Thanks a lot. / Sergio Armando Gutiérrez Betancur/ /S//ubdirección //A//plicaciones //de //S//ervicios //C//onvergentes// EPM TUNE / /Tel: 054 3802956/ /Email: sergio.gutierrez@une.com.co mailto:sergio.gutierrez@une.com.co/ / /
On 8/8/07, *Andreas Granig* <agranig@sipwise.com mailto:agranig@sipwise.com> wrote:
Hi, Maybe the request of this reply hasn't been passed to mediaproxy? If the callee is registered from behind NAT, you know that already in the request because the nat-flag should have been set during registration. So after lookup("location") the nat-flag should be set, and if so, you have to use_media_proxy() also for the request. Andreas Sergio Gutierrez wrote: > Hello all. > > We are facing some problems in our deployment of OpenSER, related to NAT > Traversal solution using MediaProxy. > > In our scenario, using the the sample configuration NAT detection works > right for REGISTER method, and for INVITE's sent from clients behind > NAT, but, incoming calls originated from transparent clients, directed > to clients behind NAT do not work, and do not pass through MediaProxy. > Services based on re-INVITES do not work either. > > To solve that issue, we tried to intercept the 200 OK answer coming from > NAT client, so that we could call use_media_proxy(), but, we get the > error: "Empty Response from media_proxy()" > > Our configuration is more or less like this: > > # In the beginning of the main route > > if(client_nat_test("7")) > { > setflag(2); > fix_contact(); > }; > > ..... > > if(is_method("INVITE")) > { > if(isflagset(2)) > { > use_media_proxy(); > }; > > t_on_reply("1"); > > } > > .... > > on_reply_route[1] > { > if (status =~ "(18[0-3])|(2[0-9][0-9])|(1[0-9][0-9])") > { > if (client_nat_test("3")) > { > fix_contact(); > use_media_proxy(); > } > > } > } > > > That is a very brief configuration fragment, but it is more or less the > schema of configuration we are using. So far, our solution to be able to > have the whole services working is marking all the calls so that they > pass through the mediaproxy, but we are not sure if that is a good > solution. > > Thanks in advance for every hint or suggestion. > > Kind regards > > /Sergio Armando Gutiérrez Betancur/ > /S//ubdirección //A//plicaciones //de //S//ervicios //C//onvergentes// > UNE - EPM Telecomunicaciones > / /Tel: 054 3802956/ > /Email: saguti@gmail.com <mailto:saguti@gmail.com> <mailto: saguti@gmail.com <mailto:saguti@gmail.com>>/ > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Users mailing list > Users@openser.org <mailto:Users@openser.org> > http://openser.org/cgi-bin/mailman/listinfo/users