[OpenSIPS-Users] How to configure two different domain in listen .
Bogdan-Andrei Iancu
bogdan at opensips.org
Tue Nov 22 10:26:05 CET 2016
Hi Sasmita,
You cannot use multiple global advertised_address - it can have only one
value; multiple definitions will simply rewrite the previous ones.
If you want to keep the same file, maybe you should consider using some
defines in combination with text pre-processing. Like have your
common/shared opensips.m4 file and for each server keep a local.m4 where
the domain macro is defined. And before starting opensips, simply do "m4
local.m4 opensips.m4 > opensips.cfg"
Also, what you can do is to use the advertised option in a per interface
manner:
listen=udp:1.2.3.4:5507 as test1.i3clogic.com
see:http://www.opensips.org/Documentation/Script-CoreParameters-2-2#toc65
put in the same file the listeners from multiple servers, and set on
your boxes the option to allow binding to non-existing IPs. This is
ugly, but it may do the trick.
Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 22.11.2016 09:08, Sasmita Panda wrote:
> Hi ,
>
> Thanks for your reply . I got your point .
>
> Actually , I have to place my opensips cfg file in a file system
> . and wanted to access that file in different machines . In short I
> wanted to maintain a single file for all the servers .
>
> In my case both the domains are mapped to different machine
> having their own public and private IP. It wont work for me in this
> case . Its giving error while starting opensips , its not able to bind
> the address . This is not the right way to do so .
>
> So , I wanted to combine two different file in a single file .
> How I will do this ? Can I add two different "advertised_address" ?
>
> listen=udp:eth0:5507
> advertised_address=test1.i3clogic.com <http://test1.i3clogic.com>
> advertised_address=test2.i3clogic.com <http://test2.i3clogic.com>
> advertised_port=5507
>
> Can I do like this . I have tried to run like this but its not
> working . Its always publishing the second address "test2.i3clogic.com
> <http://test2.i3clogic.com>" in record_route .
> What I am trying to do is possible or not ?
>
>
>
> */Thanks & Regards/*
> /Sasmita Panda/
> /Network Testing and Software Engineer/
> /3CLogic , ph:07827611765/
>
> On Mon, Nov 21, 2016 at 6:03 PM, Bogdan-Andrei Iancu
> <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>
> Hi Sasmita,
>
> The URI in RR header is dictated by the interfaces / listeners
> involved in routing the call.
>
> In your case, on which interface is the call received ? on .xxx or
> .xyy ?
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com <http://www.opensips-solutions.com>
>
> On 21.11.2016 13:26, Sasmita Panda wrote:
>> Hi All ,
>> I am using opensips-1.11 . I need to configure multiple
>> domains in the listen field and I want the particular domain get
>> exposed to outside depending upon the request .
>> bellow is my config file .
>> listen=10.165.yy.xxx:5507 AS test1.i3clogic.com:5507
>> <http://test1.i3clogic.com:5507>
>> listen=10.165.yy.xyy:5507 AS test2.i3clogic.com:5507
>> <http://test2.i3clogic.com:5507>
>> alias="test1.i3clogic.com <http://test1.i3clogic.com>"
>> alias="test1.i3clogic.com:5507 <http://test1.i3clogic.com:5507>"
>> alias="test2.i3clogic.com <http://test2.i3clogic.com>"
>> alias="test2.i3clogic.com:5507 <http://test2.i3clogic.com:5507>"
>> So what I want is , When an Invite comes with request uri
>> "test2.i3clogic.com <http://test2.i3clogic.com>" , then it
>> should add the same domain in the Record_route while forwarding
>> the call .
>> But now its adding "test1.i3clogic.com
>> <http://test1.i3clogic.com>" domain always . I think it giving
>> priority to the listen domain added first .
>> How can i achieve my goal . Is this possible or not . If
>> possible then how can I do this .
>> */Thanks & Regards/*
>> /Sasmita Panda/
>> /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
>> <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20161122/7134862b/attachment.htm>
More information about the Users
mailing list