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

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


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.

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




More information about the sr-users mailing list