On Wednesday 16 January 2008 16:19:34 Bogdan-Andrei Iancu wrote:
Hi Iñaki,
all the transformation should work with avps and script variables
also..See the examples:
http://www.openser.org/dokuwiki/doku.php/transformations:1.3.x#examples
why do you say it doesn't? do you get some errors ?
Yes, I've realized that it fails if the variable/AVP stores a SIP URI with
"<"
and ">":
$var(kk) = "<sip:ibc@domain.com>";
xlog("L_INFO", " var(kk){uri.host} = $(var(kk){uri.host}) \n\n");
$avp(s:kk) = "<sip:ibc@domain.com>";
xlog("L_INFO", " avp(s:kk){uri.host} = $(avp(s:kk){uri.host})
\n\n");
And the log says:
--------------------------------------------------------
ERROR:core:parse_uri: bad uri, state 0 parsed: <<sip> (4) /
<<sip:ibc@domain.com>> (20)
ERROR:core:tr_eval_uri: invalid uri [<sip:ibc@domain.com>]
var(kk){uri.host} =
ERROR:core:parse_uri: bad uri, state 0 parsed: <<sip> (4) /
<<sip:ibc@domain.com>> (20)
ERROR:core:tr_eval_uri: invalid uri [<sip:ibc@domain.com>]
avp(s:kk){uri.host} =
--------------------------------------------------------
It doesn't fails if SIP URI doesn't contain "<" and
">".
So I assume that, in my case, it will fail if a UAC generates a "Refer-To"
with "<" and ">", while it's perfectly valid according to
RFC 3515:
Refer-To: <sip:carol@cleveland.example.org;method=SUBSCRIBE>
--
Iñaki Baz Castillo
ibc(a)in.ilimit.es