Hi,
How can I extract the URIs in "P-Asserted-Identity" when there are multiple "P-Asserted-Identity" headers. Variable $ai return the URI in the first "P-Asserted-Identity" header.
Thanks, Alex
_________________________________________________________________ Windows Live™: Keep your life in sync. http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_allup_howitworks_0120...
El Jueves, 15 de Enero de 2009, Alex R.S.M escribió:
Hi,
How can I extract the URIs in "P-Asserted-Identity" when there are multiple "P-Asserted-Identity" headers. Variable $ai return the URI in the first "P-Asserted-Identity" header.
You should play with URI transformations, something like (not tested):
$(hdr(P-Asserted-Identity)[1]){uri.transport} $(hdr(P-Asserted-Identity)[1]){uri.user} $(hdr(P-Asserted-Identity)[1]){uri.host}
$(hdr(P-Asserted-Identity)[1]) returns the second uri header. However, $(hdr(P-Asserted-Identity)[1]){uri.host} didn't return the host portion of the second uri header.
thanks
From: ibc@aliax.net To: users@lists.kamailio.org Date: Thu, 15 Jan 2009 22:12:33 +0100 Subject: Re: [Kamailio-Users] URIs in "P-Asserted-Identity" headers
El Jueves, 15 de Enero de 2009, Alex R.S.M escribió:
Hi,
How can I extract the URIs in "P-Asserted-Identity" when there are multiple "P-Asserted-Identity" headers. Variable $ai return the URI in the first "P-Asserted-Identity" header.
You should play with URI transformations, something like (not tested):
$(hdr(P-Asserted-Identity)[1]){uri.transport} $(hdr(P-Asserted-Identity)[1]){uri.user} $(hdr(P-Asserted-Identity)[1]){uri.host}
-- Iñaki Baz Castillo
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
_________________________________________________________________ Windows Live™ Hotmail®: Chat. Store. Share. Do more with mail. http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_hm_justgotbetter_howi...
El Jueves, 15 de Enero de 2009, Alex R.S.M escribió:
$(hdr(P-Asserted-Identity)[1]) returns the second uri header. However, $(hdr(P-Asserted-Identity)[1]){uri.host} didn't return the host portion of the second uri header.
Probably {uri.host} requires a real URI, this is: sip:user@domain.org...
But $hdr(P-Asserted-Identity) is: "Name" sip:user@domain.org
You should do some replacements using AVP module.
On Thursday 15 January 2009, Alex R.S.M wrote:
$(hdr(P-Asserted-Identity)[1]) returns the second uri header. However, $(hdr(P-Asserted-Identity)[1]){uri.host} didn't return the host portion of the second uri header.
The transformation should be within the parentheses. You could try $(hdr(P-Asserted-Identity)[1]{uri.host})
Alex.
On 01/15/2009 11:45 PM, Alex R.S.M wrote:
$(hdr(P-Asserted-Identity)[1]) returns the second uri header. However, $(hdr(P-Asserted-Identity)[1]){uri.host} didn't return the host portion of the second uri header.
proably you need to use nameaddr.uri transformation first. $(hdr(P-Asserted-Identity)[1]{nameaddr.uri}{uri.host})
Cheers, Daniel
thanks
From: ibc@aliax.net To: users@lists.kamailio.org Date: Thu, 15 Jan 2009 22:12:33 +0100 Subject: Re: [Kamailio-Users] URIs in "P-Asserted-Identity" headers
El Jueves, 15 de Enero de 2009, Alex R.S.M escribió:
Hi,
How can I extract the URIs in "P-Asserted-Identity" when there are
multiple
"P-Asserted-Identity" headers. Variable $ai return the URI in the
first
"P-Asserted-Identity" header.
You should play with URI transformations, something like (not tested):
$(hdr(P-Asserted-Identity)[1]){uri.transport} $(hdr(P-Asserted-Identity)[1]){uri.user} $(hdr(P-Asserted-Identity)[1]){uri.host}
-- Iñaki Baz Castillo
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Windows Live™ Hotmail®: Chat. Store. Share. Do more with mail. See how it works. http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_hm_justgotbetter_howitworks_012009
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
On 01/17/2009 11:35 PM, Daniel-Constantin Mierla wrote:
On 01/15/2009 11:45 PM, Alex R.S.M wrote:
$(hdr(P-Asserted-Identity)[1]) returns the second uri header. However, $(hdr(P-Asserted-Identity)[1]){uri.host} didn't return the host portion of the second uri header.
proably you need to use nameaddr.uri transformation first. $(hdr(P-Asserted-Identity)[1]{nameaddr.uri}{uri.host})
for 1.5.0, I have just introduced a new transformation class - tobody, which can be used directly with PAI headers: http://www.kamailio.org/dokuwiki/doku.php/transformations:devel#to-body_tran...
$(hdr(P-Asserted-Identity)[1]{tobody.host})
Cheers, Daniel
From: ibc@aliax.net To: users@lists.kamailio.org Date: Thu, 15 Jan 2009 22:12:33 +0100 Subject: Re: [Kamailio-Users] URIs in "P-Asserted-Identity" headers
El Jueves, 15 de Enero de 2009, Alex R.S.M escribió:
Hi,
How can I extract the URIs in "P-Asserted-Identity" when there are
multiple
"P-Asserted-Identity" headers. Variable $ai return the URI in the
first
"P-Asserted-Identity" header.
You should play with URI transformations, something like (not tested):
$(hdr(P-Asserted-Identity)[1]){uri.transport} $(hdr(P-Asserted-Identity)[1]){uri.user} $(hdr(P-Asserted-Identity)[1]){uri.host}
-- Iñaki Baz Castillo
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Windows Live™ Hotmail®: Chat. Store. Share. Do more with mail. See how it works. http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_hm_justgotbetter_howitworks_012009
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
2009/1/20 Daniel-Constantin Mierla miconda@gmail.com:
for 1.5.0, I have just introduced a new transformation class - tobody, which can be used directly with PAI headers: http://www.kamailio.org/dokuwiki/doku.php/transformations:devel#to-body_tran...
$(hdr(P-Asserted-Identity)[1]{tobody.host})
Hi Daniel, can I ask why the transformation name is "tobody"? How looks the ToBody structure?
Thanks.
Hello Inaki,
On 01/20/2009 11:49 AM, Iñaki Baz Castillo wrote:
2009/1/20 Daniel-Constantin Mierla miconda@gmail.com:
for 1.5.0, I have just introduced a new transformation class - tobody, which can be used directly with PAI headers: http://www.kamailio.org/dokuwiki/doku.php/transformations:devel#to-body_tran...
$(hdr(P-Asserted-Identity)[1]{tobody.host})
Hi Daniel, can I ask why the transformation name is "tobody"? How looks the ToBody structure?
it applies for strings that follow the grammar defining the body of To header (or similar - From, PAI, ...). Inside kamailio, the structure is defined in parser/parse_to.h.
Cheers, Daniel
2009/1/20 Daniel-Constantin Mierla miconda@gmail.com:
Hi Daniel, can I ask why the transformation name is "tobody"? How looks the ToBody structure?
it applies for strings that follow the grammar defining the body of To header (or similar - From, PAI, ...). Inside kamailio, the structure is defined in parser/parse_to.h.
ah, ok, I didn't understandt that "ToBody" means "body of To" instead of "to body" XD Thanks.
Daniel-Constantin Mierla wrote:
Hello Inaki,
On 01/20/2009 11:49 AM, Iñaki Baz Castillo wrote:
2009/1/20 Daniel-Constantin Mierla miconda@gmail.com:
for 1.5.0, I have just introduced a new transformation class - tobody, which can be used directly with PAI headers: http://www.kamailio.org/dokuwiki/doku.php/transformations:devel#to-body_tran...
$(hdr(P-Asserted-Identity)[1]{tobody.host})
Hi Daniel, can I ask why the transformation name is "tobody"? How looks the ToBody structure?
it applies for strings that follow the grammar defining the body of To header (or similar - From, PAI, ...). Inside kamailio, the structure is defined in parser/parse_to.h.
That's cool. I like that!
On 01/20/2009 12:14 PM, Alex Balashov wrote:
Daniel-Constantin Mierla wrote:
Hello Inaki,
On 01/20/2009 11:49 AM, Iñaki Baz Castillo wrote:
2009/1/20 Daniel-Constantin Mierla miconda@gmail.com:
for 1.5.0, I have just introduced a new transformation class - tobody, which can be used directly with PAI headers: http://www.kamailio.org/dokuwiki/doku.php/transformations:devel#to-body_tran...
$(hdr(P-Asserted-Identity)[1]{tobody.host})
Hi Daniel, can I ask why the transformation name is "tobody"? How looks the ToBody structure?
it applies for strings that follow the grammar defining the body of To header (or similar - From, PAI, ...). Inside kamailio, the structure is defined in parser/parse_to.h.
That's cool. I like that!
great, I will send a detailed announcement later.
Daniel