[OpenSIPS-Users] mid_registrar work arround

Ben Newlin Ben.Newlin at genesys.com
Thu Aug 2 20:44:27 EDT 2018


M4 will process the file before OpenSIPS runs and will not be changeable at runtime. It sounds like that will not work for you if I am understanding properly.

My first thought would be to use the shared variables from CFGUTILS [1]. They can be accessed from inside the script, but can also be set via MI. So when your monitor detects a failure and switches the IPs, it could also use MI to change the value of the variable in OpenSIPS for future use.

As a side note to OpenSIPS devs, it appears this module was missed when the Module Index page [2] was redesigned as I can't find it there for 2.x, but the direct links to the 2.x versions still work.

[1] http://www.opensips.org/html/docs/modules/2.4.x/cfgutils.html
[2] http://www.opensips.org/Documentation/Modules-2-4

Ben Newlin 

On 8/2/18, 5:56 PM, "Users on behalf of volga629 at networklab.ca" <users-bounces at lists.opensips.org on behalf of volga629 at networklab.ca> wrote:

    Hello Liviu,
    Yes, that correct.  Right now each node in cluster have own vip from 
    keepalived on LAN side.
    The issue how to specify correct vip in case of failover, so if node 2 
    fail and node 2 vip was relocated to node 1. All sessions should be 
    process on node 1 and
    append_hf("Path: <sip:$fU at MAIN_VIP:5060;transport=udp>\r\n"); should 
    have correct ip's.  Same with rtpengine offer
    rtpengine_offer("replace-origin replace-session-connection 
    in-iface=external out-iface=internal media-address=$avp(media_addr) 
    RTP/AVP ICE=remove") where need introduce media-address to specify 
    correct vip ip.
    Can you exapand on m4 ? I never used the templating.
    Might db avp  to predefine  cluster nodes vip ip, not sure.
    
    
    volga629
    
    
    
    On Thu, Aug 2, 2018 at 10:50 AM, Liviu Chircu <liviu at opensips.org> 
    wrote:
    > Hi Volga,
    > 
    > If I understood your problem correctly, one idea would be to use m4 
    > over opensips.cfg and define a different MAIN_VIP variable for each 
    > of your three servers:
    > 
    > append_hf("Path: <sip:$fU at MAIN_VIP:5060;transport=udp>\r\n");
    >  Liviu Chircu
    > OpenSIPS Developer
    > http://www.opensips-solutions.com
    > On 09.07.2018 07:34, volga629 at networklab.ca wrote:
    >> Hello Everyone,
    >> 
    >> I have work around on this issue
    >> # Work arround for github issue #1109
    >> append_hf("Path: <sip:$fU at listen ip:5060;transport=udp>\r\n"
    >> 
    >> 
    >> Right now we use 3 node cluster with 3 vips in active/active mode
    >> I need some idea how to determine path header listen ip address from 
    >> 3 vips.
    >> 
    >> 
    >> volga629
    >> 
    >> 
    >> 
    >> 
    >> _______________________________________________
    >> Users mailing list
    >> Users at lists.opensips.org
    >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    > 
    
    
    _______________________________________________
    Users mailing list
    Users at lists.opensips.org
    http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    



More information about the Users mailing list