[OpenSIPS-Users] Retrieve callee auth username and realm

Jeff Pyle jpyle at fidelityvoice.com
Tue Mar 10 12:55:29 CET 2009


Andreas,

Instead of using the To URI, I think you'll need to relate the dialed number
back to the authorization user to be able to use the same profile values to
get your counts.  The uri table may help with this, as part of the uri_db
module and use_uri_table parameter.  This is a probably a lot of reworking
and rethinking your lookup logic.  But, this also adds the possibility of
using the check_from() function to restrict your customers' From users to be
their PSTN numbers.  I think.  I'd have to work through that one completely.

Another way may be to use AVP user preferences to relate both the
authorization user (for outbound calls) and PSTN numbers (for inbound calls)
back to the same SIP "account".  Then, use the uuid of the user preference
to key your profile values.

Hopefully something in here is helpful for you.


- Jeff



On 3/10/09 7:45 AM, "Andreas Westermaier" <andreas.westermaier at gmx.de>
wrote:

> Hi,
> 
> in one of our setups we want to have one authorization username per customer,
> which in turn got different sip accounts (user names). For each of its
> accounts the customer uses the same authorization user name and the same
> password, just the user name differs.
> 
> We want to enforce a inbound _and_ outbound channel limitations on a per
> customer basis, this means on the authorization user. A customer should just
> be able to receive/make two (the sum of incoming and outgoing) calls, where it
> doesn't matter which of its sip accounts the customer uses.
> 
> For outgoing channel limitation I currently achieve this by setting
> set_dialog_profile("xyz", "$au@$ar"), where I bind the profile to the auth
> user and realm. But for incoming calls, especially from our pstn gateway, I
> currently have only access to the "to-uri" and I'm not able to get the current
> amount of calls the callee currently has.
> 
> Is there a way to retrieve the corresponding auth-user and realm for a local
> callee from the "to-uri", already?
> 
> If not, where is the best place to start integrating this function? I thought
> of adding it to the uri_db module where the functions then could be called
> just like 
> 
> - get_uri_authuser("$tu", "$avp(s:tu_au)") and
> - get_uri_authrealm("$tu", "$avp(s:tu_ar)")
> 
> Auth user/realm will be returned in the given avp and the function returns
> success or no success (if no local user fort he given to-uri exists).
> 
> Please tell me if there's already such a possibility so I can start
> implementing it if it's not. I think such functions are essential in enforcing
> channel limits which affect inbound and outbound channels at the same time for
> one user with multiple sip accounts.
> 
> Comments appreciated. :-)
> 
> 
> Regards,
> Andreas




More information about the Users mailing list