Oops, I think I sent this off prematurely ...
I might have you covered on that too. Maybe you can add this:
alias=ifelse(_OPENSER_HOST,`hostname1',`2.3.4.5',
`hostname2',`2.3.4.6',
`')
This will substitute 2.3.4.5 if the host's name is "hostname1".
I'll be quiet now! :)
From: [email protected]
[mailto:[email protected]] On Behalf Of Daniel Goepp
Sent: Thursday, September 30, 2010 3:07 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Config include file
Unfortunately the hostname is not what we are using, but rather a public IP
address which is on the other side of NAT, so the proxies are not aware of what
it is. I believe the m4 solution posted earlier will meet our need though for
now, but thanks for the feedback, this is a creative solution ;)
-dg
On Thu, Sep 30, 2010 at 1:00 PM, Pauba, Kevin L
<[email protected]<mailto:[email protected]>> wrote:
define(`_OPENSER_HOST',`regexp(esyscmd(`hostname -f'),`\<.+\>',\&)')dnl
...
alias="_OPENSER_HOST"
Take special note of the backquote (`).
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]<mailto:[email protected]>]
On Behalf Of Brett Nemeroff
Sent: Thursday, September 30, 2010 12:22 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Config include file
Check out m4:
http://www.opensips.org/Resources/DocsTools
On Thu, Sep 30, 2010 at 12:19 PM, Daniel Goepp
<[email protected]<mailto:[email protected]>> wrote:
We have many proxies that have an identical configuration other than their
public IP address. We set this IP address only for a few things:
In the global parameters:
advertised_address
Then in our routes for:
record_route_preset
rtpproxy_offer
rtpproxy_answer
What I would like to do is create a file on each of these servers (or a DB)
that contains that servers public IP, and then put something like an include
into the script. This would make managing our config a lot easier. So each
system would have an identical config and could be updated very easily. Does
this make sense? Any comments on how this might be done?
Thanks
-dg
_______________________________________________
Users mailing list
[email protected]<mailto:[email protected]>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]<mailto:[email protected]>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users