Greetings,
In my SBC i usually have to do operations on P-Asserted-Identity and Contact header.
For those operations i usually have to get the user part, domain, etc. For that i'm using the URI Transformations provided by Kamailio. However, in order to do this i have to trim the header value by hand in order to remove brackets, display infos, etc.
Does Kamailio have a method for extracting the URI from those kinds of headers?
Best Regards,
Duarte Rocha
Hi Duarte,
Please see the documentation about URI transformations in https://www.kamailio.org/wiki/cookbooks/5.2.x/transformations#uri_transforma... - this will work to extract all or part of the URI from the applicable pseudo-variables such as $ai or $ct,
Jeff
On Mon, Mar 25, 2019 at 2:15 PM Duarte Rocha duarterocha91@gmail.com wrote:
Greetings,
In my SBC i usually have to do operations on P-Asserted-Identity and Contact header.
For those operations i usually have to get the user part, domain, etc. For that i'm using the URI Transformations provided by Kamailio. However, in order to do this i have to trim the header value by hand in order to remove brackets, display infos, etc.
Does Kamailio have a method for extracting the URI from those kinds of headers?
Best Regards,
Duarte Rocha _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hello,
you just need to use tobody transformations:
* https://www.kamailio.org/wiki/cookbooks/5.2.x/transformations#to-body_transf...
Cheers, Daniel
On 25.03.19 19:13, Duarte Rocha wrote:
Greetings,
In my SBC i usually have to do operations on P-Asserted-Identity and Contact header.
For those operations i usually have to get the user part, domain, etc. For that i'm using the URI Transformations provided by Kamailio. However, in order to do this i have to trim the header value by hand in order to remove brackets, display infos, etc.
Does Kamailio have a method for extracting the URI from those kinds of headers?
Best Regards,
Duarte Rocha
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Greetings Daniel,
Thank you for your answer. I've tried and everything works fine, except for the tobody.params transformation that fails to retrieve the parameters.
Thank you for your help, this saved me a lot of work :)
Cheers
A segunda, 25/03/2019, 19:47, Daniel-Constantin Mierla miconda@gmail.com escreveu:
Hello,
you just need to use tobody transformations:
https://www.kamailio.org/wiki/cookbooks/5.2.x/transformations#to-body_transf...
Cheers, Daniel On 25.03.19 19:13, Duarte Rocha wrote:
Greetings,
In my SBC i usually have to do operations on P-Asserted-Identity and Contact header.
For those operations i usually have to get the user part, domain, etc. For that i'm using the URI Transformations provided by Kamailio. However, in order to do this i have to trim the header value by hand in order to remove brackets, display infos, etc.
Does Kamailio have a method for extracting the URI from those kinds of headers?
Best Regards,
Duarte Rocha
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- www.asipto.com