[OpenSER-Users] Obtaining the domain of "Refer-to" URI

Iñaki Baz Castillo ibc at in.ilimit.es
Wed Jan 16 16:34:40 CET 2008


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 at domain.com>";
	xlog("L_INFO", " var(kk){uri.host} = $(var(kk){uri.host}) \n\n");

	$avp(s:kk) = "<sip:ibc at 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 at domain.com>> (20)
ERROR:core:tr_eval_uri: invalid uri [<sip:ibc at domain.com>]
var(kk){uri.host} =  

ERROR:core:parse_uri: bad uri,  state 0 parsed: <<sip> (4) / 
<<sip:ibc at domain.com>> (20)
ERROR:core:tr_eval_uri: invalid uri [<sip:ibc at 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 at cleveland.example.org;method=SUBSCRIBE>




-- 
Iñaki Baz Castillo
ibc at in.ilimit.es




More information about the Users mailing list