Thanks for the reply. I made a mistake in not specifying my problem completely (stupid me :( ). Doing fix_nated_contact() works great for situations where the clients are on separate nats (if they have ports mapped in the firewall for each UA) or even if they don't have a nat at all (for this particular UA). In fact, I use it extensively with great success for those situations.
Where it becomes a problem is where the UAs are behind the same nat with no ports forwarded and the server is outside that nat (this is apparently a feature that my boss promised in our services to a client, but failed to tell our dev team until last week...after the first clients signed on :( ). Because we don't want to point the UAs at the firewall (which has not forwarded ports), I am trying to get one UA to point directly at the other UA. The UAs have no problem being pointed at one another IF they have the CORRECT ports specified. Because the UAs can't seem to send REGISTERs on the correct port, the server points one UA to the wrong signaling port on the other UA and the call fails. This is why I was looking into rewriting the Contact with the know port 5060 instead of the one the client provides. Any other suggestions? Justin Pearce -----Original Message----- From: Atle Samuelsen [mailto:[EMAIL PROTECTED] Sent: Sunday, August 06, 2006 12:51 AM To: Justin Pearce Cc: [email protected] Subject: Re: [Devel] Questions about usrloc module Hi Justin, try this : load the nathelper module. do : if(method=="REGISTER"){ fix_nated_contact(); }; save("location"); iThis should save a "fixed" version of the contact :-) - Atle * Justin Pearce <[EMAIL PROTECTED]> [060805 23:46]: > I have been looking into rewriting the port that the contact record has, > because the UA we are using can't seem to use the right port > when initially registering (no, there is no option to use a different UA > :( ). From what I have read in the users mailing list, it seems that you > can > try to rewrite the Contact header but the rewritten header is not saved > to the location on the server. So, no matter how you rewrite it, > the contact record gets set to the original header. > > The only solution I can see is to write some sort of module to allow > access to the functions in the usrloc module, which brings me to the > topic of this > message. Would you guys have any suggestions on the use of the > ul_update_ucontact function? I figure my best bet is to parse the sip > message to grab the URI and other information, rewrite the URI in my > module > with the provided port and then call the ul_update_ucontact function to > update the record. Does the ul_update_ucontact function effect contacts > already saved in a domain (like "location") and would it also update the > database records? The documentation seems a little confusing to me in > this area. > > Any help or recommendations would be helpful. > > Thanks! > Justin Pearce > > > _______________________________________________ > Devel mailing list > [email protected] > http://openser.org/cgi-bin/mailman/listinfo/devel > _______________________________________________ Devel mailing list [email protected] http://openser.org/cgi-bin/mailman/listinfo/devel
