Hello Everyone,
I am trying to change the URI within the ser.cfg using the replace command. Has anyone done this before? What I need to do is strip some of the info after the "@" and forward the message back out. So, I can't necessarily use the rewritehostport (or rewritehost, rewriteport) commands. Ay help would be greatly appreciated..
Simple Example
INVITE sip:mark@sip.abc.def.com:5060
Want to change to
INVITE sip:mark@sip.def.com:5060
Thanks,
Mark
Can you use sed in the exec_dset() command?
-mark
-----Original Message----- From: serusers-bounces@iptel.org [mailto:serusers-bounces@lists.iptel.org] On Behalf Of Mark Wehberg Sent: Friday, June 25, 2004 10:27 AM To: serusers@lists.iptel.org Subject: [Serusers] Replacing URI
Hello Everyone,
I am trying to change the URI within the ser.cfg using the replace command. Has anyone done this before? What I need to do is strip some of the info after the "@" and forward the message back out. So, I can't necessarily use the rewritehostport (or rewritehost, rewriteport) commands. Ay help would be greatly appreciated..
Simple Example
INVITE sip:mark@sip.abc.def.com:5060
Want to change to
INVITE sip:mark@sip.def.com:5060
Thanks,
Mark
Take a look at the functions from the textops module.
Klaus
Mark Wehberg wrote:
Can you use sed in the exec_dset() command?
-mark
-----Original Message----- *From:* serusers-bounces@iptel.org [mailto:serusers-bounces@lists.iptel.org] *On Behalf Of *Mark Wehberg *Sent:* Friday, June 25, 2004 10:27 AM *To:* serusers@lists.iptel.org *Subject:* [Serusers] Replacing URI
Hello Everyone,
I am trying to change the URI within the ser.cfg using the replace command. Has anyone done this before? What I need to do is strip some of the info after the “@” and forward the message back out. So, I can’t necessarily use the rewritehostport (or rewritehost, rewriteport) commands. Ay help would be greatly appreciated….
Simple Example
INVITE sip:mark@sip.abc.def.com:5060
Want to change to
INVITE sip:mark@sip.def.com:5060
Thanks,
Mark
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
On Jun 25, 2004 at 10:26, Mark Wehberg mark.wehberg@clearviewcatv.net wrote:
Hello Everyone,
I am trying to change the URI within the ser.cfg using the replace command. Has anyone done this before? What I need to do is strip some of the info after the "@" and forward the message back out. So, I can't necessarily use the rewritehostport (or rewritehost, rewriteport) commands. Ay help would be greatly appreciated..
replace does not work on uris (it will ignore the first line).
To change the uri use subst_uri (textops modules).
Example:
subst_uri('/(.*)@foo.bar/\1_foo@bar.com/i');
(where the last i means case insensitive)
Andrei
Andrei,
Thanks for your response.
I tried to use subst_uri and the function was not found even though I loaded text tops. Which version of SER was this introduced in?
-Mark
-----Original Message----- From: Andrei Pelinescu-Onciul [mailto:pelinescu-onciul@fokus.fraunhofer.de] Sent: Sunday, June 27, 2004 5:36 AM To: Mark Wehberg Cc: serusers@lists.iptel.org Subject: Re: [Serusers] Replacing URI
On Jun 25, 2004 at 10:26, Mark Wehberg mark.wehberg@clearviewcatv.net wrote:
Hello Everyone,
I am trying to change the URI within the ser.cfg using the replace command. Has anyone done this before? What I need to do is strip
some
of the info after the "@" and forward the message back out. So, I
can't
necessarily use the rewritehostport (or rewritehost, rewriteport) commands. Ay help would be greatly appreciated..
replace does not work on uris (it will ignore the first line).
To change the uri use subst_uri (textops modules).
Example:
subst_uri('/(.*)@foo.bar/\1_foo@bar.com/i');
(where the last i means case insensitive)
Andrei
On Jun 27, 2004 at 21:38, Mark Wehberg mark.wehberg@clearviewcatv.net wrote:
Andrei,
Thanks for your response.
I tried to use subst_uri and the function was not found even though I loaded text tops. Which version of SER was this introduced in?
It should be in ser 0.8.12. It was introduced before 0.8.12 was released.
What's your modules/textops/textops.c version? If it's > 1.28 then it should be in.
Andrei
Andrei,
I need to check if we are running the RPM, /root/ser-0.8.11-0.i386.rpm, or if we compiled the source code. The source code is 0.8.12 and the textops.c is > 1.28.
When I try to start ser, it is complaining about the module not being loaded. And I have the module loaded, b/c I am using the replace function....
Will let you know.
Thanks again. -Mark
-----Original Message----- From: Andrei Pelinescu-Onciul [mailto:pelinescu-onciul@fokus.fraunhofer.de] Sent: Monday, June 28, 2004 3:37 AM To: Mark Wehberg Cc: serusers@lists.iptel.org Subject: Re: [Serusers] Replacing URI
On Jun 27, 2004 at 21:38, Mark Wehberg mark.wehberg@clearviewcatv.net wrote:
Andrei,
Thanks for your response.
I tried to use subst_uri and the function was not found even though I loaded text tops. Which version of SER was this introduced in?
It should be in ser 0.8.12. It was introduced before 0.8.12 was released.
What's your modules/textops/textops.c version? If it's > 1.28 then it should be in.
Andrei