This patch on 4.4.6 tag worked ok for me by simply forcing a port number on the Via and Request URI prefixes:

diff --git modules/topoh/topoh_mod.c modules/topoh/topoh_mod.c
index 266cc46..7322cd6 100644
--- modules/topoh/topoh_mod.c
+++ modules/topoh/topoh_mod.c
@@ -160,7 +160,7 @@ static int mod_init(void)
    }

    /* 'SIP/2.0/UDP ' + ip + ';' + param + '=' + prefix (+ '\0') */
-   th_via_prefix.len = 12 + th_ip.len + 1 + th_vparam_name.len + 1
+   th_via_prefix.len = 12 + th_ip.len + 6 + th_vparam_name.len + 1
        + th_vparam_prefix.len;
    th_via_prefix.s = (char*)pkg_malloc(th_via_prefix.len+1);
    if(th_via_prefix.s==NULL)
@@ -169,7 +169,7 @@ static int mod_init(void)
        goto error;
    }
    /* 'sip:' + ip + ';' + param + '=' + prefix (+ '\0') */
-   th_uri_prefix.len = 4 + th_ip.len + 1 + th_uparam_name.len + 1
+   th_uri_prefix.len = 4 + th_ip.len + 6 + th_uparam_name.len + 1
        + th_uparam_prefix.len;
    th_uri_prefix.s = (char*)pkg_malloc(th_uri_prefix.len+1);
    if(th_uri_prefix.s==NULL)
@@ -180,21 +180,21 @@ static int mod_init(void)
    /* build via prefix */
    memcpy(th_via_prefix.s, "SIP/2.0/UDP ", 12);
    memcpy(th_via_prefix.s+12, th_ip.s, th_ip.len);
-   th_via_prefix.s[12+th_ip.len] = ';';
-   memcpy(th_via_prefix.s+12+th_ip.len+1, th_vparam_name.s,
+    memcpy(th_via_prefix.s+12+th_ip.len, ":5060;", 6);
+   memcpy(th_via_prefix.s+12+th_ip.len+6, th_vparam_name.s,
            th_vparam_name.len);
-   th_via_prefix.s[12+th_ip.len+1+th_vparam_name.len] = '=';
-   memcpy(th_via_prefix.s+12+th_ip.len+1+th_vparam_name.len+1,
+   th_via_prefix.s[12+th_ip.len+6+th_vparam_name.len] = '=';
+   memcpy(th_via_prefix.s+12+th_ip.len+6+th_vparam_name.len+1,
            th_vparam_prefix.s, th_vparam_prefix.len);
    th_via_prefix.s[th_via_prefix.len] = '\0';
    LM_DBG("VIA prefix: [%s]\n", th_via_prefix.s);
    /* build uri prefix */
    memcpy(th_uri_prefix.s, "sip:", 4);
    memcpy(th_uri_prefix.s+4, th_ip.s, th_ip.len);
-   th_uri_prefix.s[4+th_ip.len] = ';';
-   memcpy(th_uri_prefix.s+4+th_ip.len+1, th_uparam_name.s, th_uparam_name.len);
-   th_uri_prefix.s[4+th_ip.len+1+th_uparam_name.len] = '=';
-   memcpy(th_uri_prefix.s+4+th_ip.len+1+th_uparam_name.len+1,
+   memcpy(th_uri_prefix.s+4+th_ip.len, ":5060;", 6);
+   memcpy(th_uri_prefix.s+4+th_ip.len+6, th_uparam_name.s, th_uparam_name.len);
+   th_uri_prefix.s[4+th_ip.len+6+th_uparam_name.len] = '=';
+   memcpy(th_uri_prefix.s+4+th_ip.len+6+th_uparam_name.len+1,
            th_uparam_prefix.s, th_uparam_prefix.len);
    th_uri_prefix.s[th_uri_prefix.len] = '\0';
    LM_DBG("URI prefix: [%s]\n", th_uri_prefix.s);


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.