[OpenSIPS-Users] Extract userid from SIP URI for radius accounting purposes

Iñaki Baz Castillo ibc at aliax.net
Wed Nov 26 03:49:33 CET 2008


El Miércoles, 26 de Noviembre de 2008, Andrew Yager escribió:
> Hi,
>
> Our radius application is having trouble parsing the full SIP URI for
> accounting purposes in the packets being sent to them. A simple
> solution would be to extract the "user" (read phone number) portion of
> the from and to fields, and pass this information to the Radius server.
>
> Is there already an AVP that has this information, or alternatively a
> module we can use to extract this information and insert it into an AVP?

Is really easy, please check:
  http://www.opensips.org/index.php?n=Resources.DocsCoreVar

- $ru = Request URI
- $rU = Request URI username
- $rd = Request URI host
- $fu = From URI
- $fU = From URI username
- $fd = From URI host
- $tu = To URI
- $tU = To URI username
- $td = To URI host

But... why are you interested in the To header? In 99% of cases the 
interesting and important URI is the Request URI, never the To (To header is 
just the **original** destination, but the real destination Request URI could 
change due to redirection and so).


-- 
Iñaki Baz Castillo



More information about the Users mailing list