Re: [OpenSIPS-Users] "477 Send failed" processing

2016-05-04 Thread Yuri Ritvin
Thanks a lot, Bogdan.
The flag has been implemented and works as expected.

Best regards,
Yuri

On Wed, May 4, 2016 at 4:26 AM, Bogdan-Andrei Iancu 
wrote:

> Hi Yuri,
>
> That 477 is a result of a failed send (opensips was not able to send out
> the requests) ; failure route is triggered by negative replies after the
> request was sent out (this is why you do not see it there).
>
> But, if you use the 0x02 flag in t_relay()
> http://www.opensips.org/html/docs/modules/2.2.x/tm.html#id294529
>
> you can see the failure in the script (t_relay() will return with negative
> code) and you can do your own replying there.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 04.05.2016 06:19, Yuri Ritvin wrote:
>
> Hi,
> I'm looking into a way to convert a response code "477 Send failed" into
> "404".
> It looks like the failure_route doesn't take care of the "477" cases (at
> least in ver.2.2).
> Is it by design or something is missing in the picture ?
>
> Thank you.
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSips 2.2 crash

2016-05-04 Thread Hristo Donev
Thanks,

I apply the patch.

Now working. I send additional information if have any problems.

Best regards,

2016-05-04 12:15 GMT+03:00 Ionut Ionita :

> Hi,
>
>   Can you try this patch and tell me if the problem is fixed?
>
> Regards,
>
> Ionut Ionita
> OpenSIPS Developer
>
> On 05/03/2016 05:35 PM, Hristo Donev wrote:
>
> This is last line from my opensips.log
>
> WARNING:core:timer_ticker: timer task  already scheduled for
> 194629310 ms (now 194630310 ms), it may overlap..
> WARNING:core:timer_ticker: timer task  already scheduled for
> 194629310 ms (now 194631300 ms), it may overlap..
> INFO:core:handle_sigs: child process 29635 exited by a signal 11
> INFO:core:handle_sigs: core was generated
> INFO:core:handle_sigs: terminating due to SIGCHLD
>
> 2016-05-03 17:14 GMT+03:00 Hristo Donev :
>
>> modparam("nathelper", "natping_interval", 30)
>> modparam("nathelper", "ping_threshold", 5)
>> I not set max_pings_lost.
>>
>> 2016-05-03 17:11 GMT+03:00 Ionut Ionita < 
>> ionution...@opensips.org>:
>>
>>> Can you please tell me the value of the following parameters:
>>> natping_interval
>>> ping_threshold (if set)
>>> max_pings_lost (if set)
>>>
>>> Ionut Ionita
>>> OpenSIPS Developer
>>>
>>> On 04/28/2016 10:34 PM, Hristo Donev wrote:
>>>
>>> Hello,
>>> I run opensips 2.2 (git from 26.04.2016)
>>>
>>> After 2 days opensips crash. Here is BG FULL log:
>>>
>>> #0  0x0053cf0a in remove_given_cell (cell=0xa7a77c24, entry=0xa79e244c)
>>> at nh_table.c:161
>>> No locals.
>>> #1  0x0053c607 in ping_checker_timer (ticks=194629, timer_idx=0x0) at
>>> nathelper.c:1704
>>> ctime = 1461868411
>>> _contact_id = 3395461184862990115
>>> _d = 0xa7a64c40
>>> table = 0xa7962000
>>> cell = 0xa7a77c24
>>> first = 0xa7a77c24
>>> last = 0x0
>>> prev = 0xa7a77c24
>>> __FUNCTION__ = "ping_checker_timer"
>>> #2  0x080ca5b6 in handle_timer_job () at timer.c:632
>>> t = 0xa795ce90
>>> l = 4
>>> __FUNCTION__ = "handle_timer_job"
>>> #3  0x0814df4b in handle_io (fm=0xb780f74c, idx=1, event_type=1) at
>>> net/net_udp.c:264
>>> n = -1080257296
>>> read = 5926048
>>> __FUNCTION__ = "handle_io"
>>> #4  0x0814efb8 in io_wait_loop_epoll (h=0x8216040, t=1, repeat=0) at
>>> net/../io_wait_loop.h:221
>>> ret = 1
>>> n = 1
>>> r = 1
>>> e = 0xb780f74c
>>> __FUNCTION__ = "io_wait_loop_epoll"
>>> #5  0x0814c2d2 in udp_rcv_loop (si=0xb77c45b4) at net/net_udp.c:308
>>> __FUNCTION__ = "udp_rcv_loop"
>>> #6  0x0814f4e7 in udp_start_processes (chd_rank=0x81c923c,
>>> startup_done=0x0) at net/net_udp.c:372
>>> si = 0xb77c45b4
>>> load_p = 0xa7a6cefc
>>> pid = 0
>>> i = 3
>>> p = 1
>>> __FUNCTION__ = "udp_start_processes"
>>> #7  0x08072b17 in main_loop () at main.c:671
>>> startup_done = 0x0
>>> chd_rank = 4
>>> __FUNCTION__ = "main_loop"
>>> #8  0x08075505 in main (argc=9, argv=0xbf9c9574) at main.c:1252
>>> cfg_log_stderr = 1
>>> cfg_stream = 0x910d008
>>> c = -1
>>> r = 0
>>> tmp = 0xbf9c9f75 ""
>>> tmp_len = 136073456
>>> port = 0
>>> proto = 134569328
>>> options = 0x81741b8 "f:cCm:M:b:l:n:N:rRvdDFETSVhw:t:u:g:P:G:W:o:"
>>> ret = -1
>>> seed = 4038391466
>>> rfd = 4
>>> __FUNCTION__ = "main"
>>>
>>>
>>>
>>> ___
>>> Users mailing 
>>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSips 2.2 crash

2016-05-04 Thread Ionut Ionita

Hi,

  Can you try this patch and tell me if the problem is fixed?

Regards,

Ionut Ionita
OpenSIPS Developer

On 05/03/2016 05:35 PM, Hristo Donev wrote:

This is last line from my opensips.log

WARNING:core:timer_ticker: timer task  already scheduled 
for 194629310 ms (now 194630310 ms), it may overlap..
WARNING:core:timer_ticker: timer task  already scheduled 
for 194629310 ms (now 194631300 ms), it may overlap..

INFO:core:handle_sigs: child process 29635 exited by a signal 11
INFO:core:handle_sigs: core was generated
INFO:core:handle_sigs: terminating due to SIGCHLD

2016-05-03 17:14 GMT+03:00 Hristo Donev >:


modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_threshold", 5)
I not set max_pings_lost.

2016-05-03 17:11 GMT+03:00 Ionut Ionita >:

Can you please tell me the value of the following parameters:
natping_interval
ping_threshold (if set)
max_pings_lost (if set)

Ionut Ionita
OpenSIPS Developer

On 04/28/2016 10:34 PM, Hristo Donev wrote:

Hello,
I run opensips 2.2 (git from 26.04.2016)

After 2 days opensips crash. Here is BG FULL log:

#0  0x0053cf0a in remove_given_cell (cell=0xa7a77c24,
entry=0xa79e244c) at nh_table.c:161
No locals.
#1  0x0053c607 in ping_checker_timer (ticks=194629,
timer_idx=0x0) at nathelper.c:1704
ctime = 1461868411
_contact_id = 3395461184862990115
_d = 0xa7a64c40
table = 0xa7962000
cell = 0xa7a77c24
first = 0xa7a77c24
last = 0x0
prev = 0xa7a77c24
__FUNCTION__ = "ping_checker_timer"
#2  0x080ca5b6 in handle_timer_job () at timer.c:632
t = 0xa795ce90
l = 4
__FUNCTION__ = "handle_timer_job"
#3  0x0814df4b in handle_io (fm=0xb780f74c, idx=1,
event_type=1) at net/net_udp.c:264
n = -1080257296
read = 5926048
__FUNCTION__ = "handle_io"
#4  0x0814efb8 in io_wait_loop_epoll (h=0x8216040, t=1,
repeat=0) at net/../io_wait_loop.h:221
ret = 1
n = 1
r = 1
e = 0xb780f74c
__FUNCTION__ = "io_wait_loop_epoll"
#5  0x0814c2d2 in udp_rcv_loop (si=0xb77c45b4) at
net/net_udp.c:308
__FUNCTION__ = "udp_rcv_loop"
#6  0x0814f4e7 in udp_start_processes (chd_rank=0x81c923c,
startup_done=0x0) at net/net_udp.c:372
si = 0xb77c45b4
load_p = 0xa7a6cefc
pid = 0
i = 3
p = 1
__FUNCTION__ = "udp_start_processes"
#7  0x08072b17 in main_loop () at main.c:671
startup_done = 0x0
chd_rank = 4
__FUNCTION__ = "main_loop"
#8  0x08075505 in main (argc=9, argv=0xbf9c9574) at main.c:1252
cfg_log_stderr = 1
cfg_stream = 0x910d008
c = -1
r = 0
tmp = 0xbf9c9f75 ""
tmp_len = 136073456
port = 0
proto = 134569328
options = 0x81741b8
"f:cCm:M:b:l:n:N:rRvdDFETSVhw:t:u:g:P:G:W:o:"
ret = -1
seed = 4038391466 
rfd = 4
__FUNCTION__ = "main"



___
Users mailing list
Users@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


diff --git a/modules/nathelper/nathelper.c b/modules/nathelper/nathelper.c
index 3565ac0..5b35373 100644
--- a/modules/nathelper/nathelper.c
+++ b/modules/nathelper/nathelper.c
@@ -1657,26 +1657,58 @@ ping_checker_timer(unsigned int ticks, void *timer_idx)
 	ctime=now;
 
 	/* detect cells for which threshold has been exceeded */
+
+	/* something very fishy here */
 	lock_get(>timer_list.mutex);
 	first = last = table->timer_list.first;
 
-	while (last != table->timer_list.last
-			&& ((ctime - last->timestamp) > ping_threshold))
+	if (table->timer_list.first == NULL || table->timer_list.last == NULL) {
+		/* nothing to do here - empty list */
+		goto out_release_lock;
+	}
+
+	/* only valid elements */
+	if (table->timer_list.first == table->timer_list.last
+			&& 

Re: [OpenSIPS-Users] What does mean : "We have reached the limit of max async postponed chunks"

2016-05-04 Thread Bogdan-Andrei Iancu

Hi Rodrigo,

This is related to async writing to a TCP connection. If the connection 
is blocked for writing (it still is in connecting phase, or it is simply 
blocked as the other end does not read the content from the TCP pipe), 
OpenSIPS buffers the data that needs to be send on that TCP conn (to 
avoid blocking at script level).


The error says the connection reached it maximum allowed capacity on 
buffering. See:

http://www.opensips.org/html/docs/modules/2.2.x/proto_tcp.html#id293474

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 07.04.2016 14:57, Rodrigo Pimenta Carvalho wrote:


Ok. Thank you.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979



*De:* users-boun...@lists.opensips.org 
 em nome de Johan De Clercq 


*Enviado:* quinta-feira, 7 de abril de 2016 02:43
*Para:* OpenSIPS users mailling list
*Assunto:* Re: [OpenSIPS-Users] What does mean : "We have reached the 
limit of max async postponed chunks"

I think that there is a problem with connectivity.
Just check the source code to see what it exactly means.

2016-04-06 16:38 GMT+02:00 Rodrigo Pimenta Carvalho >:


Hi.


Today I saw this error log:


Apr 06 14:04:39 colibri-imx6 opensips[29712]: Apr  6 14:04:39
[29720] ERROR:core:proto_tcp_send: Failed to add another write
chunk to 0x74ab2df0
Apr 06 14:04:39 colibri-imx6 opensips[29712]: Apr  6 14:04:39
[29720] ERROR:tm:msg_send: send() for proto 2 failed
Apr 06 14:04:39 colibri-imx6 opensips[29712]: Apr  6 14:04:39
[29720] ERROR:core:add_write_chunk: We have reached the limit of
max async postponed chunks
Apr 06 14:04:39 colibri-imx6 opensips[29712]: Apr  6 14:04:39
[29720] ERROR:core:proto_tcp_send: Failed to add another write
chunk to 0x74ab2df0


What does mean it?

What should I do to avoid it?


Any hint will be very helpful!

Best regards.



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200  RAMAL 979

___
Users mailing list
Users@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] uac_replace_from causing issues with To header Version 2.1

2016-05-04 Thread Bogdan-Andrei Iancu

Hi Jonathan,

It will help if you could post the entire SIP flow for the call - to see 
the direction of the SIP requests (if TO and FROM are swapped) and the 
values for these headers (when sent out by UA's).


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 07.04.2016 17:06, Jonathan Hunter wrote:


Hi Guys,

Using opensips 2.1 and when I use uac_replace_from to do the following 
on an initial invite;


uac_replace_from("anonymous","sip:anonymous@anonymous.invalid");

This is on anonymous calls, where I engage this only when PAID and 
Privacy:ID are present.


Once the Call establishes, for some reason, when opensips gets the ACK 
which contains;


From: "anonymous" ;tag=K4tDg08X414XQ
To: ;tag=3a197c15

When proxying it onwards it changes the From and To address to;


From: "anonymous" ;tag=K4tDg08X414XQ
To: 
;tag=3a197c15


I can only see uac_replace_from being engaged once, and Im not using 
any To replace commands.


Has anyone seen this issue before as its causing issues for us.

Thanks

Jon


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] (code=exited, status=255)

2016-05-04 Thread Bogdan-Andrei Iancu

Hi Rodrigo,

Whatever value (for the return status) different than 0 means error. 
Look into the logs for some messages describing the failure.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 11.04.2016 15:02, Rodrigo Pimenta Carvalho wrote:


Hi.


My opensips doesn't started automatically today and let this code in 
the log:



(code=exited, status=255)


What does mean status 255?


Regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] How to avoid many warnings about "handle_timer_job".

2016-05-04 Thread Bogdan-Andrei Iancu

Hi Rodrigo,

How many opensips process you have configured ?

Do you have an estimation of the load on your opensips (in terms of 
calls per second and parallel calls) ?


Best regards

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 14.04.2016 15:06, Rodrigo Pimenta Carvalho wrote:


Hi.


Sometimes, the log of my OpenSIPS shows warnings like this:



Apr 14 00:04:33 colibri-imx6 opensips[6909]: Apr 14 00:04:30 [6918] 
WARNING:core:handle_timer_job: timer job  has a 52 us 
delay in execution
Apr 14 00:04:36 colibri-imx6 opensips[6909]: Apr 14 00:04:30 [6920] 
WARNING:core:handle_timer_job: utimer job  has a 52 us 
delay in execution
Apr 14 00:04:39 colibri-imx6 opensips[6909]: Apr 14 00:04:30 [6916] 
WARNING:core:utimer_ticker: utimer task  already schedualed 
for 18348330 ms (now 18348960 ms), it may overlap..
Apr 14 00:04:43 colibri-imx6 opensips[6909]: Apr 14 00:04:30 [6919] 
WARNING:core:handle_timer_job: timer job  has a 52 us 
delay in execution
Apr 14 00:04:53 colibri-imx6 opensips[6909]: Apr 14 00:04:31 [6919] 
WARNING:core:handle_timer_job: timer job  has a 107 
us delay in execution
Apr 14 00:04:57 colibri-imx6 opensips[6909]: Apr 14 00:04:31 [6916] 
WARNING:core:utimer_ticker: utimer task  already schedualed 
for 18349200 ms (now 18349400 ms), it may overlap..
Apr 14 00:04:59 colibri-imx6 opensips[6909]: Apr 14 00:04:31 [6918] 
WARNING:core:handle_timer_job: utimer job  has a 20 us 
delay in execution
Apr 14 00:05:02 colibri-imx6 opensips[6909]: Apr 14 00:04:31 [6920] 
WARNING:core:handle_timer_job: utimer job  has a 20 us 
delay in execution
Apr 14 00:05:04 colibri-imx6 opensips[6909]: Apr 14 00:04:33 [6919] 
WARNING:core:handle_timer_job: utimer job  has a 40 us 
delay in execution
Apr 14 00:05:09 colibri-imx6 opensips[6909]: Apr 14 00:04:33 [6916] 
WARNING:core:utimer_ticker: utimer task  already schedualed 
for 18350050 ms (now 18350450 ms), it may overlap..
Apr 14 00:05:11 colibri-imx6 opensips[6909]: Apr 14 00:04:34 [6920] 
WARNING:core:handle_timer_job: utimer job  has a 68 us 
delay in execution
Apr 14 00:05:16 colibri-imx6 opensips[6909]: Apr 14 00:04:34 [6918] 
WARNING:core:handle_timer_job: utimer job  has a 68 us 
delay in execution
Apr 14 00:05:21 colibri-imx6 opensips[6909]: Apr 14 00:04:34 [6916] 
WARNING:core:utimer_ticker: utimer task  already schedualed 
for 18350820 ms (now 18351500 ms), it may overlap..
Apr 14 00:05:26 colibri-imx6 opensips[6909]: Apr 14 00:04:36 [6916] 
WARNING:core:utimer_ticker: utimer task  already schedualed 
for 18352100 ms (now 18352300 ms), it may overlap..
Apr 14 00:05:28 colibri-imx6 opensips[6909]: Apr 14 00:04:36 [6918] 
WARNING:core:handle_timer_job: utimer job  has a 20 us 
delay in execution
Apr 14 00:05:32 colibri-imx6 opensips[6909]: Apr 14 00:04:36 [6919] 
WARNING:core:handle_timer_job: utimer job  has a 20 us 
delay in execution
Apr 14 00:05:36 colibri-imx6 opensips[6909]: Apr 14 00:04:37 [6920] 
WARNING:core:handle_timer_job: utimer job  has a 
1835267 us delay in execution
Apr 14 00:05:38 colibri-imx6 opensips[6909]: Apr 14 00:04:38 [6918] 
WARNING:core:handle_timer_job: utimer job  has a 68 us 
delay in execution
Apr 14 00:05:41 colibri-imx6 opensips[6909]: Apr 14 00:04:38 [6919] 
WARNING:core:handle_timer_job: timer job  has a 80 us 
delay in execution
Apr 14 00:05:44 colibri-imx6 opensips[6909]: Apr 14 00:04:38 [6920] 
WARNING:core:handle_timer_job: timer job  has a 80 
us delay in execution




Any suggestion to avoid this or to use a specific configuration for TM 
modules?



Any hint will be very helpful!


Best regards.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] "477 Send failed" processing

2016-05-04 Thread Bogdan-Andrei Iancu

Hi Yuri,

That 477 is a result of a failed send (opensips was not able to send out 
the requests) ; failure route is triggered by negative replies after the 
request was sent out (this is why you do not see it there).


But, if you use the 0x02 flag in t_relay()
http://www.opensips.org/html/docs/modules/2.2.x/tm.html#id294529

you can see the failure in the script (t_relay() will return with 
negative code) and you can do your own replying there.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 04.05.2016 06:19, Yuri Ritvin wrote:

Hi,
I'm looking into a way to convert a response code "477 Send failed" 
into "404".
It looks like the failure_route doesn't take care of the "477" cases 
(at least in ver.2.2).

Is it by design or something is missing in the picture ?

Thank you.


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] How to overcome SIP ALG on Wi-Fi routers

2016-05-04 Thread Bogdan-Andrei Iancu

And in this case, instead of re-inventing the wheel, just use TLS :)

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 04.05.2016 03:05, Alex Balashov wrote:

On 05/03/2016 08:03 PM, Nabeel wrote:


A possible solution to this seems to be a 'SIP tunnel' server. The
server would tunnel the SIP and UDP packets over a common TCP port
such as 80 or 443, which are more likely to be open and unblocked on
Wi-Fi routers for browsing, Email, etc. The tunnel server would then
send this data to OpenSIPS over UDP.


This sounds substantially similar to a VPN, except without the benefit 
of encryption.





___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users