Thanks,
Now that I understand what the received avp is for in the registrar
module, that seems to make a lot more sense. I was unaware at the time
how to go about doing that, and with the small number of replies I got,
the only logical conclusion was to modify some functions that performed
similarly that I knew worked 100% (all this because of a deadline). The
information is helpful, since I will likely have to use it in a future
implementation.
Justin Pearce
Information Technology/Programming
Price Video Productions
JustinP(a)PriceVideo.com
361-572-3810
800-733-3810
Fax: 361-572-3894
www.PriceVideo.com
-----Original Message-----
From: Bogdan-Andrei Iancu [mailto:bogdan@voice-system.ro]
Sent: Monday, August 21, 2006 9:04 AM
To: Justin Pearce
Cc: users(a)openser.org
Subject: Re: [Users] Rewriting Contact HF port
Justin,
just as an idea, you could upload the contact into an AVP (via pseudo
variables) and then use a regexp to change the port part....so, you can
do it only via script functions.
regards,
bogdan
Justin Pearce wrote:
Hi Bogdan,
I knew that Nathelper did some rewriting, but the circumstances
required
that the thing record the private IP and a certain
known port instead
of
the public IP as a contact address (using
fix_nated_register() to save
the other address). I wound up borrowing the code from the Nathelper
module and modifying it to accept a port argument and made it a
separate
module. This way, it only rewrote the port and not left
everything else
untouched.
Thanks.
Justin Pearce
Information Technology/Programming
Price Video Productions
JustinP(a)PriceVideo.com
361-572-3810
800-733-3810
Fax: 361-572-3894
www.PriceVideo.com
-----Original Message-----
From: Bogdan-Andrei Iancu [mailto:bogdan@voice-system.ro]
Sent: Monday, August 21, 2006 6:19 AM
To: Justin Pearce
Cc: Klaus Darilion; users(a)openser.org
Subject: Re: [Users] Rewriting Contact HF port
Hi Justin,
if you need save(location) to save as "received" a custom uri, you just
need to set an avp with the uri you need to be saved.
See:
http://openser.org/docs/modules/1.1.x/registrar.html#AEN211
It's exactly what nathelper does.
regards,
bogdan
Justin Pearce wrote:
>Thanks, Klaus
>
>It looks like I'll have to make something similar to the nathelper
>module to do what I need.
>
>Justin Pearce
>
>-----Original Message-----
>From: Klaus Darilion [mailto:klaus.mailinglists@pernau.at]
>Sent: Monday, August 07, 2006 1:43 AM
>To: Justin Pearce
>Cc: users(a)openser.org
>Subject: Re: [Users] Rewriting Contact HF port
>
>Justin Pearce wrote:
>
>
>
>
>>I am wondering if there is a good way to rewrite the port in the
>>
>>
>>
>>
>contact
>
>
>
>
>>header in OpenSER 1.0.1
>>
>>
>>
>>
>1. Why do you want to rewrite the port to fixed port? NAT problems?
>
>
>
>
>
>>before it is stored in the location table?(I'm using the MySQL
>>
>>
>>
>>
>database
>
>
>
>
>>backend).
>>
>>Thus far, I am using "subst(/^(Contact.+):[0-9]+(.+)$/\1:5060\2/ig);"
just before I do
"save("location");", but that does not seem to be working.
subst will be applied before the message is forwarded. Thus, save()
sees
the original Contact header. You either loop the
modified message to
the
>SIP proxy again or you write your own function (similar to the
function
>in nathelper module)
>
>regards
>klaus
>
>
>
>>Suggestions?
>>
>>
>>
>>Justin Pearce
>>
>>Information Technology/Programming
>>
>>Price Video Productions
>>
>>JustinP(a)PriceVideo.com <mailto:JustinP@PriceVideo.com>
>>
>>361-572-3810
>>
>>800-733-3810
>>
>>Fax: 361-572-3894
>>
>>www.PriceVideo.com
>>
>>
>>
>>
>>
>>
>>
>>
>>
>----------------------------------------------------------------------
-
-
>
>
>>_______________________________________________
>>Users mailing list
>>Users(a)openser.org
>>http://openser.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>>
>_______________________________________________
>Users mailing list
>Users(a)openser.org
>http://openser.org/cgi-bin/mailman/listinfo/users
>
>
>