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

Klaus Darilion klaus.mailinglists at pernau.at
Wed Jan 16 13:42:34 CET 2008


{uri.host}

(same as {uri.domain})

Return the domain part


http://www.openser.org/dokuwiki/doku.php/transformations:1.3.x

klaus

Iñaki Baz Castillo schrieb:
> Hi, in order to match the domain of "Refer-to" header I must do a dirty string 
> substitution:
> 
>   $avp(s:rt) = $rt;
>   avp_subst("$avp(s:rt)", "/(.*@|[;?].*)//gi");
> 
> If for example:
> 
>   Refer-To: <sip:bob at biloxi.example.net?Accept-Contact=sip:bobsdesk.
>        biloxi.example.net&Call-ID%3D55432%40alicepc.atlanta.example.com>
> 
> Then $avp(s:rt) is "biloxi.example.net".
> 
> Couldn't be possible to have generic string transformations to get part of a 
> URI in any header/variable? Is there any other way I don't know to get it 
> easily?
> 
> Thanks.
> 




More information about the Users mailing list