[OpenSIPS-Users] transformation on uri

Podrigal, Aron aronp at guaranteedplus.com
Wed Feb 25 23:11:52 CET 2015


Sounds good. Thank you very much.
On Feb 25, 2015 3:50 PM, "Bogdan-Andrei Iancu" <bogdan at opensips.org> wrote:

>  Hi Aron,
>
> Ionut did a patch for adding uri.schema - see
> https://github.com/OpenSIPS/opensips/commit/2e25e957b592747289720220a2f510d01d7a8fe7
>
> It is only on master, but you can backport it to 1.11 if needed. Let us
> know if does the trick for you.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 24.02.2015 23:13, Podrigal, Aron wrote:
>
> Thanks, the construct_uri() function is very helpful. But how would I
> extract the sip|sips part of an existing uri (specifically from the
> Remote-Party-ID)? also I assume that prefix() or strip() only helps for
> the request uri and not for remote-party-id uri. correct?
>
> On Tue, Feb 24, 2015 at 5:00 AM, Bogdan-Andrei Iancu <bogdan at opensips.org>
> wrote:
>
>>  Hi Aron,
>>
>> You can use the core functions like prefix() or strip() :
>>     http://www.opensips.org/Documentation/Script-CoreFunctions-1-11#toc25
>>     http://www.opensips.org/Documentation/Script-CoreFunctions-1-11#toc52
>>
>> Also take a look at the construct_uri() function:
>>     http://www.opensips.org/Documentation/Script-CoreFunctions-1-11#toc11
>>
>> In regards to the URI transformation , it does not return the schema
>> part, but this can be easily added if needed.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>>  On 24.02.2015 07:44, Podrigal, Aron wrote:
>>
>>  Hi all,
>>
>>  When doing transformations on a uri, how can I efficiently get the type
>> of uri 'sip|sips|tel' ?
>>
>>  usually my transformations involve stripping/prepending digits from/to
>> the user part of the uri. I don't want to rewrite the entire uri. because I
>> want to preserve the sips|sip part as it was originally. As of now I'm
>> using the subst() function, but it gets really messy for some simple tasks.
>> Any suggestions?
>>
>>  Thanks
>> Aron
>>
>>
>>  _______________________________________________
>> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150225/d24e0844/attachment.htm>


More information about the Users mailing list