Hello Kamailio-Users
I'm using kamailio 5.1 with Alias_DB module. My subscribers register with a username like 0000001, 0000002 etc... Every user has a list of multiple aliases which they can use on their SIP-Trunk. I want to avoid that the user can use any alias for outgoing calls, only the aliases which are boud to his username in the aliases-db. So, if the user uses an alias which does not belong to him, i want to overwrite it to the first alias for his username in the aliases-db. At the moment, the function alias_db_find returns me the last alias found in the db.
Is there any way to do it? Or is there a way to extend the dbaliases with a new column marking the "primary" alias for an account?|||| This would be the perfect solution.
Regards Stefan
On Tue, Feb 20, 2018 at 09:04:14AM +0100, Stefan R??etschli wrote:
So, if the user uses an alias which does not belong to him, i want to overwrite it to the first alias for his username in the aliases-db. At the moment, the function alias_db_find returns me the last alias found in the db.
You can use for example sqlops or avp_db_query to implement any custom query for dbaliases.
Is there any way to do it? Or is there a way to extend the dbaliases with a new column marking the "primary" alias for an account?|||| This would be the perfect solution.
usr_preferences might be a more logical place to store this.
Hey, thanks for the hint with usr_preferences! this is definitively the way to go.
Am 20.02.18 um 11:03 schrieb Daniel Tryba:
On Tue, Feb 20, 2018 at 09:04:14AM +0100, Stefan R??etschli wrote:
So, if the user uses an alias which does not belong to him, i want to overwrite it to the first alias for his username in the aliases-db. At the moment, the function alias_db_find returns me the last alias found in the db.
You can use for example sqlops or avp_db_query to implement any custom query for dbaliases.
Is there any way to do it? Or is there a way to extend the dbaliases with a new column marking the "primary" alias for an account?|||| This would be the perfect solution.
usr_preferences might be a more logical place to store this.