Hi Everyone,

 

I am trying to add DMQ for redundancy of registrations and USRLOC, and I’m trying to send calls to the correct SBC that is the original registrar for a handset. I’ve been using the thread here where Charles gave some guidance on how to use path to store and use the original SBC: https://lists.kamailio.org/pipermail/sr-users/2018-February/100246.html and  https://lists.kamailio.org/pipermail/sr-users/2013-September/079736.html

 

I am struggling with when to decide to modify the destination URI. My testing shows this is required otherwise some handsets will ignore the invite, but right now I am doing it in a blanket form, right before SIPOUT (which is where the origin SBC handles the invite instead of LOCATION). I am sure this is being too heavy-handed though and there are some cases where I won’t want to set this, but I am not sure which?

 

        # record routing for dialog forming requests (in case they are routed)

        # - remove preloaded route headers

        remove_hf("Route");

        if (is_method("INVITE|SUBSCRIBE")) {

                record_route();

        }

        xlog("Setting du according to path. Current du is $du\n");

        xlog("Current route header: $(hdr(Route))\n");

        xlog("Current route: $(hdr(Route){uri.host})\n");

>>>        $du = $(hdr(Route){param.value,received});

        #xlog("New du destination uri is: $du\n");

 

        # dispatch requests to foreign domains

        route(SIPOUT);

 

In the linked threads, Charles mentioned that only the last-hop registrar should make this change, but what’s the best way to determine if I am on the last-hop registrar?

 

As per the snippet above, I tried using the {uri.host} transformation to extract the origin SBC’s IP from the route header. My plan is to then compare this against “myself” but I am struggling to extract the right info from the route header. And I am not even sure if this is the right general approach?

 

The route header looks like this: <sip:ORIGIN_SBC_IP:5060;received=sip:UAC_WAN_IP:2048;lr>

 

Any guidance or examples would be appreciated.

 

Thanks!


Rhys Hanrahan | Chief Information Officer
e: rhys@nexusone.com.au  

www.nexusone.com.au   signature_555064778

NEXUS ONE | FUSION TECHNOLOGY SOLUTIONS
p: 1800 NEXUS1 (1800 639 871) or 1800 565 845 | a: Suite 12.03 Level 12, 227 Elizabeth Street, Sydney NSW 2000
www.nexusone.com.au | www.fusiontech.com.au

The information in this email and any accompanying attachments may contain; a. Confidential information of Fusion Technology Solutions Pty Ltd, Nexus One Pty Ltd or third parties; b. Legally privileged information of Fusion Technology Solutions Pty Ltd, Nexus One Pty Ltd or third parties; and or c. Copyright material Fusion Technology Solutions Pty Ltd, Nexus One Pty Ltd or third parties. If you have received this email in error, please notify the sender immediately and delete this message. Fusion Technology Solutions Pty Ltd, Nexus One Pty Ltd does not accept any responsibility for loss or damage arising from the use or distribution of this email.

Please consider the environment before printing this email.