Thanks a lot it was just what i need it , it worked like a charm.
strip(3);
On Wed, Apr 3, 2013 at 3:39 PM, <sr-users-request(a)lists.sip-router.org>wrote;wrote:
Send sr-users mailing list submissions to
sr-users(a)lists.sip-router.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
or, via email, send a message with subject or body 'help' to
sr-users-request(a)lists.sip-router.org
You can reach the person managing the list at
sr-users-owner(a)lists.sip-router.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of sr-users digest..."
Today's Topics:
1. Re: please help with some transformations. (Alex Balashov)
2. Re: please help with some transformations.
(Daniel-Constantin Mierla)
3. Abort at qm_debug_frag function (Bruno Bresciani)
4. Re: Abort at qm_debug_frag function (Daniel-Constantin Mierla)
----------------------------------------------------------------------
Message: 1
Date: Wed, 03 Apr 2013 14:18:18 -0400
From: Alex Balashov <abalashov(a)evaristesys.com>
Subject: Re: [SR-Users] please help with some transformations.
To: sr-users(a)lists.sip-router.org
Message-ID: <515C726A.10104(a)evaristesys.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hello Julian,
On 04/03/2013 01:54 PM, julian arsanches wrote:
Hi am new to kamilio , but able to make calls, i
need to do something
really simple if someone can give me an example of it i will be
gratefull.
just before the call gets relayed i need to delete a prefix from the sip
uri so it gets transformed to the same uir but less 3 digits.
for example sip:123xxx@domain.com <mailto:sip%3A123xxx@domain.com> >>>
changed to sip:xxxx@dmain.com <mailto:sip%3Axxxx@dmain.com>
i tryed with transformations but still too new and does give me so many
errors that kamailio don't start,
There is a core convenience function that can help with this, as long as
you're manipulating the request URI:
strip(3);
You referred to "the SIP URI", which, of course, is ambiguous since a
SIP request has many SIP URIs.
-- Alex
--
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web:
http://www.evaristesys.com/,
http://www.alexbalashov.com/
------------------------------
Message: 2
Date: Wed, 03 Apr 2013 20:18:44 +0200
From: Daniel-Constantin Mierla <miconda(a)gmail.com>
Subject: Re: [SR-Users] please help with some transformations.
To: "Kamailio (SER) - Users Mailing List"
<sr-users(a)lists.sip-router.org>
Message-ID: <515C7284.5060905(a)gmail.com>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
Hello,
if you just need to remove first 3 digits, use:
strip(3);
If the number of digits to strip is variables, use strip transformation:
-
http://www.kamailio.org/wiki/cookbooks/4.0.x/transformations#sstrip_len
If does not work for you giving errors, paste here what you have in the
config for that part.
Cheers,
Daniel
On 4/3/13 7:54 PM, julian arsanches wrote:
Hi am new to kamilio , but able to make calls, i
need to do something
really simple if someone can give me an example of it i will be
> gratefull.
>
> just before the call gets relayed i need to delete a prefix from the
> sip uri so it gets transformed to the same uir but less 3 digits.
>
> for example sip:123xxx@domain.com
> <mailto:sip%3A123xxx@domain.com> >>> changed to sip:xxxx@dmain.com
> <mailto:sip%3Axxxx@dmain.com>
>
> i tryed with transformations but still too new and does give me so
> many errors that kamailio don't start,
>
> tryed subs_uri but i dont know how to tell it to just take the first
> tree digits, it is usually done for adding prefixes.
>
> please help.
>
> thank you in advance.
>
> on my scenario i am having an asterisk that i dont control sending me
> an invite for with a prefix i need kamailio to forward that uri to
> another server minus the prefix.
>
> thank you.
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users(a)lists.sip-router.org
>
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla -
http://www.asipto.com
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
-
http://conference.kamailio.com -