[OpenSIPS-Users] Need help to use alias db .

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Apr 30 08:16:04 EST 2020


Just use the domain module for that:
https://opensips.org/html/docs/modules/2.4.x/domain.html#func_is_uri_host_local

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com

On 4/30/20 11:08 AM, Sasmita Panda wrote:
> I have one opensips server , and I have mapped 2 domain into that . In 
> the config file I have added the alias list for that domain .
> for example :
> alias="freeswitch-registrar.xyz.com <http://freeswitch-registrar.xyz.com>"
> alias="freeswitch-cisco.xyz.com <http://freeswitch-cisco.xyz.com>"
>
> route{
>   if (!uri==myself) {
>                                 send_reply("403","Rely forbidden");
>                                 exit;
>                         }
> ......................
> }
> If any request coming to this has the request uri matches with the 
> alias added then that request get processed else it gives Error message .
>
> Now if I am mapping another domain to the server but I dont want to 
> change the config and restart the service again . I want any other way 
> to do dynamically so that whenever I will add any domain opensips will 
> read that and process the request without service restart .
>
>
> How will I achive this ?
>
>
> */Thanks & Regards/*
> /Sasmita Panda/
> /Senior Network Testing and Software Engineer/
> /3CLogic , ph:07827611765/
>
>
> On Thu, Apr 30, 2020 at 12:56 PM Bogdan-Andrei Iancu 
> <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>
>     Hi Sasmita,
>
>     To be honest I do not understand what you want to achieve. Could
>     you provide an example of aliasing you want to have ?
>
>     Regards,
>
>     Bogdan-Andrei Iancu
>
>     OpenSIPS Founder and Developer
>        https://www.opensips-solutions.com
>
>     On 4/30/20 9:33 AM, Sasmita Panda wrote:
>>     Ok . But username cant be fixed . That can be anything .
>>
>>     When I am adding aliase in the config file that only matches the
>>     domain and process the request . Isn't the aliase_db do the same
>>     thing ?
>>
>>
>>     */Thanks & Regards/*
>>     /Sasmita Panda/
>>     /Senior Network Testing and Software Engineer/
>>     /3CLogic , ph:07827611765/
>>
>>
>>     On Wed, Apr 29, 2020 at 6:21 PM Bogdan-Andrei Iancu
>>     <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>>
>>         Hi,
>>
>>         The aliase_db module does full aliasing, user+domain to
>>         another user+domain, not only domains. And you can test the
>>         return code of the lookup function to see if any matching and
>>         translation was done or not.
>>
>>         Regards,
>>
>>         Bogdan-Andrei Iancu
>>
>>         OpenSIPS Founder and Developer
>>            https://www.opensips-solutions.com
>>
>>         On 4/29/20 10:16 AM, Sasmita Panda wrote:
>>>         Hi All ,
>>>
>>>         For the first time I am trying to use alias db . Before
>>>         processing any request I wanted to do alias db lookup , if
>>>         find the corresponding domain in the alias db then process
>>>         the request otherwise not .
>>>
>>>         How will I do this ?
>>>
>>>         */Thanks & Regards/*
>>>         /Sasmita Panda/
>>>         /Senior Network Testing and Software Engineer/
>>>         /3CLogic , ph:07827611765/
>>>
>>>         _______________________________________________
>>>         Users mailing list
>>>         Users at lists.opensips.org  <mailto:Users at lists.opensips.org>
>>>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200430/2553614e/attachment.html>


More information about the Users mailing list