Daniel,
I finally had some time to put a log after it failed to convert from to
socket.
ERROR: siptrace [siptrace.c:1704]: there is not a valid number port 5060??k5
Mar 29 13:30:32 siptest /usr/sbin/kamailio[19848]: ERROR: siptrace
[siptrace.c:1514]: ERROR: bad FROM tcp:10.1.0.6:5060 or TO tcp:
75.62.17.45:63343
The passing parameter to the function look fine. Well formed and null
terminated. Inside it is failing.
Any ideas....
Attaching the code segments around the lines
Code around line 1514:
/* Convert proto:ip:port to sockaddress union SRC IP */
if (pipport2su(from->s, &from_su, &proto)==-1 || (pipport2su(to->s,
&to_su, &proto)==-1))
{
LOG(L_ERR, "ERROR: bad FROM %s or TO %s\n", from->s,
to->s);
goto error;
}
Code around line 1704:
else {
/*the address contains a port number*/
*p = '\0';
p++;
port_str.s = p;
port_str.len = strlen(p);
LM_DBG("the port string is %s\n", p);
if(str2int(&port_str, &port_no) != 0 ) {
LM_ERR("there is not a valid number port %s\n", p);
goto error;
}
*p = '\0';
}
On Wed, Mar 28, 2012 at 2:16 PM, Daniel-Constantin Mierla <miconda(a)gmail.com
wrote:
> have you changed the log line to print the port? can you print the entire
> string, with proto and ip to see if there are spaces/invalid characters
> (print it between special chars, like [])?
>
> The line is inside the mirroring traffic via hep protocol, is what you
> want to get, right?
>
> Cheers,
> Daniel
>
>
> On 3/28/12 12:53 PM, Krishna Kurapati wrote:
>
> I tried to pull null terminator to see if that fixes the issue. That is
> why there is shift in the lines. It is same as line 1701.
>
> Krish Kura
>
> On Wed, Mar 28, 2012 at 3:57 AM, Daniel-Constantin Mierla <
> miconda(a)gmail.com
wrote:
>
>> Hello,
>>
>> are you working with a custom siptrace module? the line in siptrace.c
>> does not match. If you changed the sources, paste here the lines in
>> siptrace.c around 1705, 10 before and 10 after.
>>
>> Cheers,
>> Daniel
>>
>>
>> On 3/26/12 3:23 PM, Krishna Kurapati wrote:
>>
>> Hi,
>>
>> I keep getting this error in the sip_trace module:
>>
>> Mar 26 06:19:26 siptest /usr/sbin/kamailio[4279]: ERROR: siptrace
>> [siptrace.c:1705]: there is not a valid number port 5060?/??
>>
>> Krish Kura
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> --
>> Daniel-Constantin Mierla
>> Kamailio Advanced Training, April 23-26, 2012, Berlin,
Germanyhttp://www.asipto.com/index.php/kamailio-advanced-training/
>>
>>
>
> --
> Daniel-Constantin Mierla
> Kamailio Advanced Training, April 23-26, 2012, Berlin,
Germanyhttp://www.asipto.com/index.php/kamailio-advanced-training/
>
>