[SR-Users] siptrace error...

2012-03-26 Thread Krishna Kurapati
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 list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] siptrace error...

2012-03-28 Thread Daniel-Constantin Mierla

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 list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


--
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] siptrace error...

2012-03-28 Thread Krishna Kurapati
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  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-us...@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/
>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] siptrace error...

2012-03-28 Thread Daniel-Constantin Mierla
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 
mailto:mico...@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 list
sr-users@lists.sip-router.org  
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


-- 
Daniel-Constantin Mierla

Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/




--
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] siptrace error...

2012-03-28 Thread Alexandr Dubovikov

Hello Krishna,

do you use git version or release 3.2 ?

I don't really understand what's a problem do you have ?

Wbr,
Alexandr


3/28/2012 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 
mailto:mico...@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 list
sr-users@lists.sip-router.org  
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


-- 
Daniel-Constantin Mierla

Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] siptrace error...

2012-03-29 Thread Krishna Kurapati
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  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 <
> mico...@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-us...@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/
>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] siptrace error...

2012-03-30 Thread Daniel-Constantin Mierla

Hello,

On 3/29/12 10:35 PM, Krishna Kurapati wrote:

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


as you can see the port is printed as '5060??k5', which is invalid. 
Somewhere is missing a null termination or the length is wrong.


Maybe Alexandr can have a look, being the author of that piece of code.

Cheers,
Daniel

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 
mailto:mico...@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
mailto:mico...@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 list
sr-users@lists.sip-router.org  
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


-- 
Daniel-Constantin Mierla

Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/




-- 
Daniel-Constantin Mierla

Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/




--
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] siptrace error...

2012-03-30 Thread Alexandr Dubovikov

Krishna,

take the last siptrace.c from ser's git and add after line 1703 this code:

if(len > 0) tmp_piport[len - 1] = '\0';


so, code must looks so:

/* our tmp string */
1703 
 
strncpy(tmp_piport, pipport, len);
1704 
 
if(len > 0) tmp_piport[len-1] = '\0';
1705 
 
len = 0;



and let me know if it works for you.

Wbr,
Alexandr



3/29/2012 10:35 PM, Krishna Kurapati wrote:

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 
mailto:mico...@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
mailto:mico...@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 list
sr-users@lists.sip-router.org  
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


-- 
Daniel-Constantin Mierla

Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/




-- 
Daniel-Constantin Mierla

Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/




___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users