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

2016-05-17 Thread Rodrigo Pimenta Carvalho
Ok.

Thank you very much!

If necessary I can take a look in the source code too.

Best regards.


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



De: Bogdan-Andrei Iancu 
Enviado: terça-feira, 17 de maio de 2016 16:39
Para: Rodrigo Pimenta Carvalho; users@lists.opensips.org; Ionut Ionita
Assunto: Re: [OpenSIPS-Users] How to avoid many warnings about 
"handle_timer_job".

Maybe John, the author of the sqlite driver in OpenSIPS has some information on 
this

Regards,

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

[http://www.opensips-solutions.com/imgs/opensips-solutions-logo.gif]

Home — OpenSIPS Solutions
www.opensips-solutions.com
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is 
more than a SIP proxy/router as it includes application-level functionalities.

On 17.05.2016 20:06, Rodrigo Pimenta Carvalho wrote:

Ok.


I agree with you.


But, do you have some comment on how to handle locked tables when I'm using 
DB_SQLite module from OpenSIPS?


I know that SQLite has a mechanism to handle this condition and I have already 
used it in another project without OpenSIPs. But, as log as the connection to 
SQLite is programmed in the OpenSIPS code, should I do something more to deal 
with this kind of issue?


Any hint will be very helpful!


Regards.


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



De: Bogdan-Andrei Iancu 
Enviado: terça-feira, 17 de maio de 2016 13:03
Para: Rodrigo Pimenta Carvalho; 
users@lists.opensips.org
Assunto: Re: [OpenSIPS-Users] How to avoid many warnings about 
"handle_timer_job".

Hi Rodrigo,

I guess the root of your problem is this:
 ERROR: db_sqlite:db_sqlite_raw_query: query failed: database is locked.

If the DB query gets blocked on sqlite level, then the timer job will not 
terminate and the timer will complain on this -> you will get all the warnings 
from the timer:
WARNING:core:timer_ticker: timer task  already scheduled...

Regards,

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

[http://www.opensips-solutions.com/imgs/opensips-solutions-logo.gif]

Home — OpenSIPS Solutions
www.opensips-solutions.com
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is 
more than a SIP proxy/router as it includes application-level functionalities.

On 17.05.2016 14:57, Rodrigo Pimenta Carvalho wrote:

Hi Bogdan-Andrei.


For usrloc I had used the following configuration until 3 days ago, and having 
the same problem:


-

modparam("usrloc", "nat_bflag", "NAT")
modparam("usrloc", "db_mode", 1)
modparam("usrloc", "timer_interval",10)
modparam("usrloc", "db_url",
"sqlite:///usr/local/opensips/db/sisc.sqlite") # CUSTOMIZE ME
--


Since 3 days ago I started to use the following modified configuration, and the 
problem disappeared:


modparam("usrloc", "db_mode", 2)
modparam("usrloc", "timer_interval",3)

I'm still not sure that such modification in configuration is the solution, 
because I still have to test several situations. Ex: using TLS, TCP. Making 
calls (until now in my recent tests I didn't make calls). Using a link to 
Internet (until know I'm using a LAN in my recent tests). So, there are some 
scenarios that I still have to test before confirming that I have gotten the 
solution. Until now I just let 2 clients sending SIP REGISTER and nothing more.

By the way, I'm using SQLite and I know that some times the log presents the 
message:

" ERROR: db_sqlite:db_sqlite_raw_query: query failed: database is locked."

That is, sometimes a table can be locked, but it should be responsibility of 
the DB_SQLite module to handle this condition, shouldn't be?
Do you think that SQLite can be causing such issue (delay in the execution of 
the ul-timer)?

Any hint will be very helpful!

Thanks!



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



De: Bogdan-Andrei Iancu 
Enviado: terça-feira, 17 de maio de 2016 05:47
Para: Rodrigo Pimenta Carvalho;  
users@lists.opensips.org
Assunto: Re: [OpenSIPS-Users] How to avoid many warnings about 
"handle_timer_job".

Hi Rodrigo,

I'm back also. The logs indicate there is a serious delay in the 

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

2016-05-17 Thread Bogdan-Andrei Iancu
So far, yes. But to be 100% you need to check via a pcap the 
fragmentation flags in the IP packet(s) for the SIP INVITE. This will 
tell you (1) if the packet is fragmented and (2) if all the IP packets 
(UDP fragments) are present.


Regards,

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

On 17.05.2016 20:07, Nabeel wrote:


In that case, the answer to your question seems to be that the UDP 
packets did not reach the OpenSIPS server, because nothing was added 
to the OpenSIPS logs using debug level 4. All of this seems to point 
to the cause being UDP packet fragmentation. Is this correct?


On 17 May 2016 4:24 pm, "Bogdan-Andrei Iancu" > wrote:


The TCP/IP stack of your server may decide to drop an UDP packet
if it cannot re-assemble it correctly (like not all the IP
fragments were received).
In such a case, you see the IP packets (carrying the fragments) on
network level, but they are never delivered at application level.

Regards,

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

On 17.05.2016 16:05, Nabeel wrote:


The next question - is this INVITE reaching your opensips
script ? to be sure that the OS delivers the UDP packet to
the opensips application.


I don't have any firewall on my server. Why would the UDP packet
get blocked between entering the server and reaching opensips
script? The opensips server is running without errors. Other
calls work fine.




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


[OpenSIPS-Users] Security presentation on opensips

2016-05-17 Thread John Nash
I saw
http://www.opensips.org/pub/events/2012-08-07_ClueCon_Chicago/VLAD_PAIU-OpenSIPS-Securing_SIP_Networks.pdf
.

I would love to watch the video session of this, is there any place I can
get the video? Tried searching google but did not find.

Regards

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


Re: [OpenSIPS-Users] Drouting memory usage

2016-05-17 Thread John Nash
Hello Bogdan,

The version is Server:: OpenSIPS (2.1.2 (x86_64/linux))

Since this is live we do not have detailed debug. Below is what happened
before crash (We had multiple such entries). I figured it might be related
to malformed SIP message so I applied sipmsg_validate() function even for
so called trusted endpoints.


May 11 20:38:30 localhost opensips[10315]: ERROR:tm:send_ack: failed to
generate a HBH ACK if key HFs in reply missing
May 11 20:38:30 localhost opensips[10315]: ERROR:tm:reply_received: failed
to send ACK (local=no)
May 11 20:38:46 localhost opensips[10315]: ERROR:tm:send_ack: failed to
generate a HBH ACK if key HFs in reply missing
May 11 20:38:46 localhost opensips[10315]: ERROR:tm:reply_received: failed
to send ACK (local=no)
May 11 20:38:51 localhost opensips[10314]: ERROR:core:parse_to: unexpected
char [#015] in status 1: <<"1234
;tag=2878411H96479>>
.
May 11 20:38:51 localhost opensips[10314]: ERROR:core:parse_from_header:
bad from header
May 11 20:38:51 localhost opensips[10314]: ERROR:dialog:dlg_create_dialog:
bad request or missing FROM hdr :-/
May 11 20:38:51 localhost opensips[10314]: ERROR:core:skip_name: closing
quote missing in name part of Contact
May 11 20:38:51 localhost opensips[10314]: ERROR:core:parse_contacts:
failed to skip name part
May 11 20:38:51 localhost opensips[10314]: ERROR:core:contact_parser:
failed to parse contacts
May 11 20:38:51 localhost opensips[10314]: ERROR:core:parse_contact: failed
to parse contact
May 11 20:38:51 localhost opensips[10314]:
ERROR:topology_hiding:topo_no_dlg_encode_contact: bad Contact HDR
May 11 20:38:51 localhost opensips[10314]: ERROR:core:skip_name: closing
quote missing in name part of Contact
May 11 20:38:51 localhost opensips[10314]: ERROR:core:parse_contacts:
failed to skip name part
May 11 20:38:51 localhost opensips[10314]: ERROR:core:contact_parser:
failed to parse contacts
May 11 20:38:51 localhost opensips[10314]: ERROR:core:parse_contact: failed
to parse contact
May 11 20:38:51 localhost opensips[10314]:
ERROR:topology_hiding:build_encoded_contact_suffix: bad Contact HDR
May 11 20:38:51 localhost opensips[10314]:
CRITICAL:topology_hiding:build_encoded_contact_suffix: #012>>> pkg_free()
on non-pkg ptr 0x18 - aborting!#012#012It seems you have hit a programming
bug.#012Please help us make OpenSIPS better by reporting it at
https://github.com/OpenSIPS/opensips/issues#012


On Tue, May 17, 2016 at 9:35 PM, Bogdan-Andrei Iancu 
wrote:

> Hi Nash,
>
> What version of OpenSIPS are you using ? also, before that CRITICAL
> message, do you see any other error messages in the logs ?
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 12.05.2016 08:46, John Nash wrote:
>
> Actually crash happened shortly after we uploaded 11000 codes but looks
> like it is not related to drouting. I see following message
>
> CRITICAL:topology_hiding:build_encoded_contact_suffix: #012>>> pkg_free()
> on non-pkg ptr 0x18 - aborting!#012#012It seems you have hit a programming
> bug.#012Please help us make OpenSIPS better by reporting it at
> https://github.com/OpenSIPS/opensips/issues#012
>
> In log file I see following messages time to time
> ERROR:core:pv_get_contact_body: failed to parse contact hdr
>
> On Wed, May 11, 2016 at 11:29 PM, John Nash 
> wrote:
>
>> I have been using drouting module with just 200 entries from 8 months
>> yesterday we had need of adding around 11000 entries in rules table but
>> after that opensips started to crash. I am currently using -m 2048 -M 1024
>> isn't it enough memory?
>>
>> How can I anticipate memory usage?
>>
>> John
>>
>
>
>
> ___
> 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] How to overcome SIP ALG on Wi-Fi routers

2016-05-17 Thread Russell Treleaven
Look for the fragmentation flag.
On May 17, 2016 1:08 PM, "Nabeel"  wrote:

> In that case, the answer to your question seems to be that the UDP packets
> did not reach the OpenSIPS server, because nothing was added to the
> OpenSIPS logs using debug level 4. All of this seems to point to the cause
> being UDP packet fragmentation. Is this correct?
> On 17 May 2016 4:24 pm, "Bogdan-Andrei Iancu"  wrote:
>
>> The TCP/IP stack of your server may decide to drop an UDP packet if it
>> cannot re-assemble it correctly (like not all the IP fragments were
>> received).
>> In such a case, you see the IP packets (carrying the fragments) on
>> network level, but they are never delivered at application level.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 17.05.2016 16:05, Nabeel wrote:
>>
>> The next question - is this INVITE reaching your opensips script ? to be
>>> sure that the OS delivers the UDP packet to the opensips application.
>>
>>
>> I don't have any firewall on my server. Why would the UDP packet get
>> blocked between entering the server and reaching opensips script? The
>> opensips server is running without errors. Other calls work fine.
>>
>>
>>
> ___
> 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-17 Thread Nabeel
In that case, the answer to your question seems to be that the UDP packets
did not reach the OpenSIPS server, because nothing was added to the
OpenSIPS logs using debug level 4. All of this seems to point to the cause
being UDP packet fragmentation. Is this correct?
On 17 May 2016 4:24 pm, "Bogdan-Andrei Iancu"  wrote:

> The TCP/IP stack of your server may decide to drop an UDP packet if it
> cannot re-assemble it correctly (like not all the IP fragments were
> received).
> In such a case, you see the IP packets (carrying the fragments) on network
> level, but they are never delivered at application level.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 17.05.2016 16:05, Nabeel wrote:
>
> The next question - is this INVITE reaching your opensips script ? to be
>> sure that the OS delivers the UDP packet to the opensips application.
>
>
> I don't have any firewall on my server. Why would the UDP packet get
> blocked between entering the server and reaching opensips script? The
> opensips server is running without errors. Other calls work fine.
>
>
>
___
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-17 Thread Rodrigo Pimenta Carvalho
Ok.


I agree with you.


But, do you have some comment on how to handle locked tables when I'm using 
DB_SQLite module from OpenSIPS?


I know that SQLite has a mechanism to handle this condition and I have already 
used it in another project without OpenSIPs. But, as log as the connection to 
SQLite is programmed in the OpenSIPS code, should I do something more to deal 
with this kind of issue?


Any hint will be very helpful!


Regards.


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



De: Bogdan-Andrei Iancu 
Enviado: terça-feira, 17 de maio de 2016 13:03
Para: Rodrigo Pimenta Carvalho; users@lists.opensips.org
Assunto: Re: [OpenSIPS-Users] How to avoid many warnings about 
"handle_timer_job".

Hi Rodrigo,

I guess the root of your problem is this:
 ERROR: db_sqlite:db_sqlite_raw_query: query failed: database is locked.

If the DB query gets blocked on sqlite level, then the timer job will not 
terminate and the timer will complain on this -> you will get all the warnings 
from the timer:
WARNING:core:timer_ticker: timer task  already scheduled...

Regards,

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

[http://www.opensips-solutions.com/imgs/opensips-solutions-logo.gif]

Home — OpenSIPS Solutions
www.opensips-solutions.com
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is 
more than a SIP proxy/router as it includes application-level functionalities.

On 17.05.2016 14:57, Rodrigo Pimenta Carvalho wrote:

Hi Bogdan-Andrei.


For usrloc I had used the following configuration until 3 days ago, and having 
the same problem:


-

modparam("usrloc", "nat_bflag", "NAT")
modparam("usrloc", "db_mode", 1)
modparam("usrloc", "timer_interval",10)
modparam("usrloc", "db_url",
"sqlite:///usr/local/opensips/db/sisc.sqlite") # CUSTOMIZE ME
--


Since 3 days ago I started to use the following modified configuration, and the 
problem disappeared:


modparam("usrloc", "db_mode", 2)
modparam("usrloc", "timer_interval",3)

I'm still not sure that such modification in configuration is the solution, 
because I still have to test several situations. Ex: using TLS, TCP. Making 
calls (until now in my recent tests I didn't make calls). Using a link to 
Internet (until know I'm using a LAN in my recent tests). So, there are some 
scenarios that I still have to test before confirming that I have gotten the 
solution. Until now I just let 2 clients sending SIP REGISTER and nothing more.

By the way, I'm using SQLite and I know that some times the log presents the 
message:

" ERROR: db_sqlite:db_sqlite_raw_query: query failed: database is locked."

That is, sometimes a table can be locked, but it should be responsibility of 
the DB_SQLite module to handle this condition, shouldn't be?
Do you think that SQLite can be causing such issue (delay in the execution of 
the ul-timer)?

Any hint will be very helpful!

Thanks!



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



De: Bogdan-Andrei Iancu 
Enviado: terça-feira, 17 de maio de 2016 05:47
Para: Rodrigo Pimenta Carvalho; 
users@lists.opensips.org
Assunto: Re: [OpenSIPS-Users] How to avoid many warnings about 
"handle_timer_job".

Hi Rodrigo,

I'm back also. The logs indicate there is a serious delay in the execution of 
the ul-timer (user location). According to your logs, it is almost 15 minutes 
:O . What db_mode do you use in usrloc module ?

Regards,

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

[http://www.opensips-solutions.com/imgs/opensips-solutions-logo.gif]

Home — OpenSIPS Solutions
www.opensips-solutions.com
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is 
more than a SIP proxy/router as it includes application-level functionalities.

On 11.05.2016 16:29, Rodrigo Pimenta Carvalho wrote:

Hi. Just one more thing:


During my tests I have zero calls per second and zero parallel calls.

I just let softphones sending SIP REGISTER messages, 1 at each minute.

And I have just 4 softphones registering.


After all, we have changed the CPU clock, increasing it. For example:


we have used the command  "cpufreq-set -f 7920" to change the clock to 792 
MHz.


Before it, the clock used was less than 400 MHz.


Do you think it can really help us to avoid such warning in the log?


Best regards.


Re: [OpenSIPS-Users] OpenSIPS 2.2 cross compiled decreases RAM by 28 bytes periodically.

2016-05-17 Thread Rodrigo Pimenta Carvalho
Hi Liviu.


Thank you very much!


Answers:

1 - It really keeps leaking for hours and hours. But, I will investigate again 
and take more detaisl about frequency of the 28 bytes leaking.


2 - I intend to run Valgrind and OpenSIPS in such environment just to check if 
there is leaks.


I will return with some more details.


Best regards.


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



De: users-boun...@lists.opensips.org  em nome 
de Liviu Chircu 
Enviado: terça-feira, 17 de maio de 2016 13:04
Para: users@lists.opensips.org
Assunto: Re: [OpenSIPS-Users] OpenSIPS 2.2 cross compiled decreases RAM by 28 
bytes periodically.

Hi Rodrigo,

I will answer with two questions, so I can get a better picture of what's going 
on:

* How long is your sample period? Does it really keep leaking for hours and 
hours?
* Are you sure the memory is "leaked", and not "buffered"? This is a common 
topic for discussion in Linux systems, so please make sure you are using the 
proper tools to monitor your OS memory [1]

[1]: http://www.linuxatemyram.com
Help! Linux ate my RAM!
www.linuxatemyram.com
This "something" is what top and free calls "buffers" and "cached". Since your 
and Linux's terminology differs, you think you are low on ram when you're not.



Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 16.05.2016 21:29, Rodrigo Pimenta Carvalho wrote:


Hi.


I'm in a situation that in my hardware I have OpenSIPS cross compiled.

It is working well, but decreasing the RAM by 28 bytes periodically. That is, 
my RAM decreases 28 bytes time to time.


I'm curious about any hint about what to do in this case. Does someone here has 
already seen such problem or has any hint?


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] Possible dialog/topology hiding bug

2016-05-17 Thread Bogdan-Andrei Iancu

Hi Pete,

No, this is not a know bug, nor an intended behavior. So, simply 
restarting opensips during a TH call will lead to this error ? no 
special setup, just a proxy between 2 end points, right ?


Regards,

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

On 17.05.2016 16:36, Pete Kelly wrote:
I am seeing something interesting with topology_hiding + dialog on 
2.1. If I let the dialog flush to the DB and kill opensips, opensips 
loads back in the dialog info on startup as expected.


However any new in dialog requests (e.g. BYE) do not proxy - it looks 
like Via, Call-ID and Contact are restored but ruri is not - which 
makes OpenSIPS loop the request back to itself.


For reference, to "enable" topology hiding, I am simply calling 
topology_hiding("C") then in has_totag() I am calling 
topology_hiding_match()


If I perform the same test without topology hiding, the in-dialog 
requests continue to proxy as normal.


Is this a known bug/quirk, is it likely I am not performing some check 
or test that i need to?



___
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] Drouting memory usage

2016-05-17 Thread Bogdan-Andrei Iancu

Hi Nash,

What version of OpenSIPS are you using ? also, before that CRITICAL 
message, do you see any other error messages in the logs ?


Regards,

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

On 12.05.2016 08:46, John Nash wrote:
Actually crash happened shortly after we uploaded 11000 codes but 
looks like it is not related to drouting. I see following message


CRITICAL:topology_hiding:build_encoded_contact_suffix: #012>>> 
pkg_free() on non-pkg ptr 0x18 - aborting!#012#012It seems you have 
hit a programming bug.#012Please help us make OpenSIPS better by 
reporting it at https://github.com/OpenSIPS/opensips/issues#012


In log file I see following messages time to time
ERROR:core:pv_get_contact_body: failed to parse contact hdr

On Wed, May 11, 2016 at 11:29 PM, John Nash > wrote:


I have been using drouting module with just 200 entries from 8
months yesterday we had need of adding around 11000 entries in
rules table but after that opensips started to crash. I am
currently using -m 2048 -M 1024 isn't it enough memory?

How can I anticipate memory usage?

John




___
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 cross compiled decreases RAM by 28 bytes periodically.

2016-05-17 Thread Liviu Chircu

Hi Rodrigo,

I will answer with two questions, so I can get a better picture of 
what's going on:


* How long is your sample period? Does it really keep leaking for hours 
and hours?
* Are you sure the memory is "leaked", and not "buffered"? This is a 
common topic for discussion in Linux systems, so please make sure you 
are using the proper tools to monitor your OS memory [1]


[1]: http://www.linuxatemyram.com

Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 16.05.2016 21:29, Rodrigo Pimenta Carvalho wrote:



Hi.


I'm in a situation that in my hardware I have OpenSIPS cross compiled.

It is working well, but decreasing the RAM by 28 bytes periodically. 
That is, my RAM decreases 28 bytes time to time.



I'm curious about any hint about what to do in this case. Does someone 
here has already seen such problem or has any hint?



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] Where to write an Internal format of a db_text table?

2016-05-17 Thread Bogdan-Andrei Iancu

Hi Rodrigo,

The format of the tables is not part of the opensips script. Is like in 
mysql, where you define the tables in mysql itself and not in opensips. 
The db text files (the actual tables) are to be placed where ever you 
want on the disk. What you need to do from OpenSIPS cfg is to point via 
db_url to the location where the table files exist.


Like if you use:
modparam("usrloc", "db_url", "text:///path/to/dbtext/database")

then OpenSIPS will expect to find in /path/to/dbtext/database dir the 
"location" file with the description of the location table


Best regards,

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

On 13.05.2016 20:59, Rodrigo Pimenta Carvalho wrote:


Hi.

I'm reading the documentation about DB_Text.


Where, in script, can I write an Internal format of a db_text table?


For example, I need write :


"

...
table_name(str) table_version(int)
acc:6;
#missed_calls:5
#domain:3
#grp:3
#re_grp:2
#address:5
#aliases:1009
#location:1009
...

"


So, in which part of the script can I write this commands without 
parser error?



Any hint will be very helpful.


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] Can I use DB_SQLite and DB_Text at same time in a script?

2016-05-17 Thread Bogdan-Andrei Iancu

Hi Rodrigo,

Of course you can use any combination of SQL backends - when you define 
the db_url for a module, just select the db backend you want for it.


Now, the timer error you get here is related to the SQLite - I noticed 
in one of your more recent posts that you get an error from sqlite on 
locking the location table - this blocking of the table may prevent 
opensips to write into the table - and the writing in the location table 
is timer based. So, the timer complains on getting blocked.


Regards,

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

On 13.05.2016 15:53, Rodrigo Pimenta Carvalho wrote:


Dear OpenSIPS-users,

In my project I'm using SQLite as database for OpenSIPS, Everything is 
going well for several tables. That is, OpenSIPS works very well to 
handle several tables from my SQLite data base. Except for table 
location, as I suspect.


What is the problem?
--
After receiving "SIP REGISTER" messages for a time, OpenSIPS shows a 
warning in the log:
"WARNING:core:timer_ticker: timer task  already schedualed 
f...verlap.."



How can I reproduce the problem?
---
I just let only one softphone (client) online sending SIP REGISTER to 
my OpenSIPS, one message at each minute. Only one client is enough to 
cause the problem. And there is no calls at all.



What I'm suspecting?
-
I suspect that when OpenSIPS receives the SIP REGISTER it has to 
handle the table location. And then the proxy does it successfully for 
a number of SIP REGISTER. But, after a time, probably there is some 
error while handling the location via SQLite, and it causes the issue. 
I suspect that if I stop using DB_SQLite for keep users locations, the 
problem will disappear (finish).



What I intend to do?
--
I intend to use DB_Text every time OpenSIPS will need to save user 
locations. But I still want to continue using DB_SQLite for other data.



Can I use DB_Text and DB_SQLite in the same script or such thing will 
cause problems for sure?

P.S.: I'm using OpenSIPS 2.2 from october/november 2015.

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] IS_MYSELF() always uses 5060 if received port is 0

2016-05-17 Thread Bogdan-Andrei Iancu

Hi,

That is a great catch, thank you for finding and reporting this. See the 
attach patch that should address the problem. Could you please give it a 
try to see if it really solves the problem ?


Best Regards,

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

On 13.05.2016 22:30, Ravitez Ravi wrote:

Hi All,
Good Day,
Here's the problem i'm facing and would be a great help if you 
could comment.

Thank you.

is_myself() does not check for SIPS port if connection type is TLS
*Configuration :*
- Opensips V1.11.5 running in secure mode on port 5061
- Avaya trying to communicate with Opensips server.
- Opensips server ip 192.168.1.11
- Avaya ip : 192.168.1.20


*Steps :*
- Avaya sends INVITE to Opensips with route header
Route: 
- Opensips tries to process it but fails.
*DBG:rr:is_preloaded: is_preloaded: Yes*
*DBG:core:grep_sock_info: checking if host==us: 14==14 && 
 [192.168.1.11] == [192.168.1.11]*

*DBG:core:grep_sock_info: checking if port 5061 matches port 5060*
*DBG:core:check_self: host != me*
*DBG:rr:after_loose: Topmost URI is NOT myself*



SIP/2.0 403 Preload Route denied
*Code Snippet :*
/*
 * Check if URI is myself
 */
#ifdef ENABLE_USER_CHECK
static inline int is_myself(str *_user, str* _host, unsigned short _port)
#else
static inline int is_myself(str* _host, unsigned short _port)
#endif
{
int ret;

*ret = check_self(_host, _port ? _port : SIP_PORT, 0);/* match all 
protos*/*

if (ret < 0) return 0;

*Should is_myself() check for connection type and then decide to 
either use SIP or SIPS port.*

*
*
*
*
*
*
Regards,
Ravitez.D


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


diff --git a/modules/rr/loose.c b/modules/rr/loose.c
index 28d4b05..beb2c4f 100644
--- a/modules/rr/loose.c
+++ b/modules/rr/loose.c
@@ -224,14 +224,24 @@ static inline int is_2rr(str* _params)
  * Check if URI is myself
  */
 #ifdef ENABLE_USER_CHECK
-static inline int is_myself(str *_user, str* _host, unsigned short _port)
+static inline int is_myself(str *_user, struct sip_uri* _uri)
 #else
-static inline int is_myself(str* _host, unsigned short _port)
+static inline int is_myself(struct sip_uri* _uri)
 #endif
 {
 	int ret;
+	unsigned short port;
 
-	ret = check_self(_host, _port ? _port : SIP_PORT, 0);/* match all protos*/
+	if ((port=_uri->port_no)==0) {
+		if (_uri->proto!=PROTO_NONE) {
+			port = protos[_uri->proto].default_port;
+		} else if (_uri->type==SIPS_URI_T || _uri->type==TELS_URI_T) {
+			port = protos[PROTO_TLS].default_port;
+		} else {
+			port = protos[PROTO_UDP].default_port;
+		}
+	}
+	ret = check_self(&_uri->host, port, 0);/* match all protos*/
 	if (ret < 0) return 0;
 
 #ifdef ENABLE_USER_CHECK
@@ -509,9 +519,9 @@ static inline int after_strict(struct sip_msg* _m)
 
 	if ( enable_double_rr && is_2rr() &&
 #ifdef ENABLE_USER_CHECK
-	is_myself(, , puri.port_no)
+	is_myself(, )
 #else
-	is_myself(, puri.port_no)
+	is_myself()
 #endif
 	) {
 		/* double route may occure due different IP and port, so force as
@@ -718,10 +728,10 @@ static inline int after_loose(struct sip_msg* _m, int preloaded)
 
 	/* IF the URI was added by me, remove it */
 #ifdef ENABLE_USER_CHECK
-	ret=is_myself(, , puri.port_no);
+	ret=is_myself(, );
 	if (ret>0)
 #else
-	if (is_myself(, puri.port_no))
+	if (is_myself())
 #endif
 	{
 		LM_DBG("Topmost route URI: '%.*s' is me\n",
@@ -899,10 +909,9 @@ int loose_route(struct sip_msg* _m)
 		return after_loose(_m, 1);
 	} else {
 #ifdef ENABLE_USER_CHECK
-		if (is_myself(&_m->parsed_uri.user, &_m->parsed_uri.host,
-		_m->parsed_uri.port_no) && !(_m->parsed_uri.gr.s && _m->parsed_uri.gr.len)) {
+		if (is_myself(&_m->parsed_uri.user, &_m->parsed_uri) && !(_m->parsed_uri.gr.s && _m->parsed_uri.gr.len)) {
 #else
-		if (is_myself(&_m->parsed_uri.host, _m->parsed_uri.port_no) && !(_m->parsed_uri.gr.s && _m->parsed_uri.gr.len)) {
+		if (is_myself(&_m->parsed_uri) && !(_m->parsed_uri.gr.s && _m->parsed_uri.gr.len)) {
 #endif
 			return after_strict(_m);
 		} else {
___
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-17 Thread Bogdan-Andrei Iancu
The TCP/IP stack of your server may decide to drop an UDP packet if it 
cannot re-assemble it correctly (like not all the IP fragments were 
received).
In such a case, you see the IP packets (carrying the fragments) on 
network level, but they are never delivered at application level.


Regards,

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

On 17.05.2016 16:05, Nabeel wrote:


The next question - is this INVITE reaching your opensips script ?
to be sure that the OS delivers the UDP packet to the opensips
application.


I don't have any firewall on my server. Why would the UDP packet get 
blocked between entering the server and reaching opensips script? The 
opensips server is running without errors. Other calls work fine.


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


[OpenSIPS-Users] Possible dialog/topology hiding bug

2016-05-17 Thread Pete Kelly
I am seeing something interesting with topology_hiding + dialog on 2.1. If
I let the dialog flush to the DB and kill opensips, opensips loads back in
the dialog info on startup as expected.

However any new in dialog requests (e.g. BYE) do not proxy - it looks like
Via, Call-ID and Contact are restored but ruri is not - which makes
OpenSIPS loop the request back to itself.

For reference, to "enable" topology hiding, I am simply calling
topology_hiding("C") then in has_totag() I am calling
topology_hiding_match()

If I perform the same test without topology hiding, the in-dialog requests
continue to proxy as normal.

Is this a known bug/quirk, is it likely I am not performing some check or
test that i need to?
___
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-17 Thread Nabeel
>
> The next question - is this INVITE reaching your opensips script ? to be
> sure that the OS delivers the UDP packet to the opensips application.


I don't have any firewall on my server. Why would the UDP packet get
blocked between entering the server and reaching opensips script? The
opensips server is running without errors. Other calls work fine.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Transfer issue with Cisco unified call manager

2016-05-17 Thread Sasmita Panda
Hi ,

I have encountered similar issue . B2BUA mode of opensips not able to
change the SDP . I have tried to do this with Opensips-1.11 . I think it
cant even change the SDP .

 As for my understanding , Opensips only work as a middle man
between two  User Agent . It only change the signaling part(like : Route ,
Via , From etc ) but not the SDP part .

 I think it cant be don't by this module automatically . If this is
possible to do then I will be helpful also .

*Thanks & Regards*
*Sasmita Panda*
*Network Testing and Software Engineer*
*3CLogic , ph:07827611765*

On Tue, May 17, 2016 at 2:40 PM, Chen-Che Huang  wrote:

> Dear all,
>
> For collaboration purpose and some reasons, we have set up a kind-of-weird
> architecture with Cisco unified call manager (abbreviated CUCM) as follows.
>
> client A
> client B <>OpenSIPS SIP proxy<>CUCM
> client C   |
>  RTP proxy
>
>
> The OpenSIPS SIP proxy here acts as clients to CUCM. For each client, the
> OpenSIPS SIP proxy creates a unique socket to CUCM. All the requests and
> responses between clients and CUCM pass through the OpenSIPS SIP proxy. All
> the RTP packets between clients are relayed by RTP proxy.
>
> Although this architecture is kind-of-weird, it works for client
> registration and call setup. However, in this architecture, we cannot
> support a particular call transfer case.
> Client A calls client B (OK)
> Client A transfers the call to client C (OK)
> Client A transfers the call to make client B talk to client C (Failed in
> terms of media relay).
>
> The SIP signalling flow is basically okay. The problem is that we cannot
> let
> client B and client C's RTP packets relayed by the RTP Proxy because the
> SIP
> messages in this case are two separate dialogs (the CUCM acts in B2BUA
> mode). I have do a preliminary study to address issue by using the B2BUA
> module of the OpenSIPS but the module seems not to have the ability to
> modify SDP.
>
> Has anyone encountered similar issues or had any suggestion on this issue?
> Many thanks for any comments.
>
> Yours sincerely,
> Chen-Che
>
>
>
>
>  where client A transfers the call to make client B and client C with each
> other. Because CUCM acts like in B2BUA mode,
>
>
>
> --
> View this message in context:
> http://opensips-open-sip-server.1449251.n2.nabble.com/Transfer-issue-with-Cisco-unified-call-manager-tp7602968.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> ___
> 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


[OpenSIPS-Users] Transfer issue with Cisco unified call manager

2016-05-17 Thread Chen-Che Huang
Dear all,

For collaboration purpose and some reasons, we have set up a kind-of-weird
architecture with Cisco unified call manager (abbreviated CUCM) as follows. 

client A
client B <>OpenSIPS SIP proxy<>CUCM
client C   |
 RTP proxy
   

The OpenSIPS SIP proxy here acts as clients to CUCM. For each client, the
OpenSIPS SIP proxy creates a unique socket to CUCM. All the requests and
responses between clients and CUCM pass through the OpenSIPS SIP proxy. All
the RTP packets between clients are relayed by RTP proxy.

Although this architecture is kind-of-weird, it works for client
registration and call setup. However, in this architecture, we cannot
support a particular call transfer case.
Client A calls client B (OK)
Client A transfers the call to client C (OK)
Client A transfers the call to make client B talk to client C (Failed in
terms of media relay).

The SIP signalling flow is basically okay. The problem is that we cannot let
client B and client C's RTP packets relayed by the RTP Proxy because the SIP
messages in this case are two separate dialogs (the CUCM acts in B2BUA
mode). I have do a preliminary study to address issue by using the B2BUA
module of the OpenSIPS but the module seems not to have the ability to
modify SDP.

Has anyone encountered similar issues or had any suggestion on this issue?
Many thanks for any comments.

Yours sincerely,
Chen-Che




 where client A transfers the call to make client B and client C with each
other. Because CUCM acts like in B2BUA mode, 



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Transfer-issue-with-Cisco-unified-call-manager-tp7602968.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
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-17 Thread Bogdan-Andrei Iancu
You can check it in the pcap - if an UDP packet is fragmented into 
multiple IP packets, you have some fragmentation flag set into the IP 
header (see 
https://www.cs.nyu.edu/courses/fall98/G22.2262-001/class11.txt, look for 
"fragmentation" ).


Also, at SIP level, you may check if the advertised Content-Length 
matches the actual length of the body - if the body is shorter than 
advertised in Content-Len, it means the UDP packet is fragmented .


Regards,

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

On 06.05.2016 20:11, Nabeel wrote:


Can packet fragmentation be verified (to be sure that it is packet 
fragmentation)?


On 6 May 2016 5:28 pm, "Nabeel" > wrote:


The trace I posted earlier is what I see with tcpdump when
attempting a call. There is no other INVITE shown in the trace:
http://pastebin.com/raw/C4iymTbh

The trace seems to end abruptly in the middle of the SDP, so I
think it could be due to packet fragmentation.

On 6 May 2016 4:18 pm, "Bogdan-Andrei Iancu" > wrote:

So that meas the INVITE never gets to the callee ?? maybe it
is not properly routed .

Do you see (with ngrep or tcpdump) the INVITE being sent out
by opensips towards callee ?

Regards,

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

On 06.05.2016 12:56, Nabeel wrote:


Hi,

Thanks for the idea about packet compression. By 'call fails
to connect', I meant the call does not connect to the callee,
ie. the callee's phone does not ring after the INVITE
(despite using TURN server).

This was a public WiFi network and that was all I could get
at the time. I am using OpenSIPS version 2.1.

Nabeel

On 6 May 2016 9:16 am, "Bogdan-Andrei Iancu"
> wrote:

Hi,

Hard to analyze a call based on the INVITE packet only
:). Still the SIP signaling does not show any ALG
interference (also not sure if the capture was done
before or after the ALG). Also, what you mean by "call
fails" ?no reply, negative reply , no audio ?

Regards,

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

On 05.05.2016 22:35, Nabeel wrote:


Please check the following SIP trace taken within a WiFi
network. The call fails to connect despite the INVITE
request and using a non-standard port. Could this be
caused by SIP ALG, or some unopened RTP port on the router?

http://pastebin.com/raw/C4iymTbh


___
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-17 Thread Bogdan-Andrei Iancu
As per that capture, I assume that 162.249.6.110 is your server.  And 
there is nothing send further from that IP - only incoming traffic.


The next question - is this INVITE reaching your opensips script ? to be 
sure that the OS delivers the UDP packet to the opensips application.


Regards,

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

On 06.05.2016 19:28, Nabeel wrote:


The trace I posted earlier is what I see with tcpdump when attempting 
a call. There is no other INVITE shown in the trace: 
http://pastebin.com/raw/C4iymTbh


The trace seems to end abruptly in the middle of the SDP, so I think 
it could be due to packet fragmentation.


On 6 May 2016 4:18 pm, "Bogdan-Andrei Iancu" > wrote:


So that meas the INVITE never gets to the callee ?? maybe it is
not properly routed .

Do you see (with ngrep or tcpdump) the INVITE being sent out by
opensips towards callee ?

Regards,

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

On 06.05.2016 12:56, Nabeel wrote:


Hi,

Thanks for the idea about packet compression. By 'call fails to
connect', I meant the call does not connect to the callee, ie.
the callee's phone does not ring after the INVITE (despite using
TURN server).

This was a public WiFi network and that was all I could get at
the time. I am using OpenSIPS version 2.1.

Nabeel

On 6 May 2016 9:16 am, "Bogdan-Andrei Iancu" > wrote:

Hi,

Hard to analyze a call based on the INVITE packet only :).
Still the SIP signaling does not show any ALG interference
(also not sure if the capture was done before or after the
ALG). Also, what you mean by "call fails" ?no reply, negative
reply , no audio ?

Regards,

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

On 05.05.2016 22:35, Nabeel wrote:


Please check the following SIP trace taken within a WiFi
network. The call fails to connect despite the INVITE
request and using a non-standard port. Could this be caused
by SIP ALG, or some unopened RTP port on the router?

http://pastebin.com/raw/C4iymTbh


___
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-17 Thread Bogdan-Andrei Iancu

Hi Rodrigo,

I'm back also. The logs indicate there is a serious delay in the 
execution of the ul-timer (user location). According to your logs, it is 
almost 15 minutes :O . What db_mode do you use in usrloc module ?


Regards,

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

On 11.05.2016 16:29, Rodrigo Pimenta Carvalho wrote:


Hi. Just one more thing:


During my tests I have zero calls per second and zero parallel calls.

I just let softphones sending SIP REGISTER messages, 1 at each minute.

And I have just 4 softphones registering.


After all, we have changed the CPU clock, increasing it. For example:


we have used the command  "cpufreq-set -f 7920" to change the 
clock to 792 MHz.



Before it, the clock used was less than 400 MHz.


Do you think it can really help us to avoid such warning in the log?


Best regards.



Best regards.


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



*De:* Rodrigo Pimenta Carvalho
*Enviado:* quarta-feira, 11 de maio de 2016 09:03
*Para:* Bogdan-Andrei Iancu
*Assunto:* Re: [OpenSIPS-Users] How to avoid many warnings about 
"handle_timer_job".


Hi Bogdan-Andrei.


I'm back.


After coming back, I didn't see that log anymore.


However, another log appears every day:


"

May 11 11:51:48 colibri-imx6-jfl opensips[2193]: May 11 11:51:48 
[2200] WARNING:core:timer_ticker: timer task  already 
schedualed for 940840 ms (now 20647710 ms)...y overlap..

"


When it starts to appear, I have to reset the OpenSIPS to avoid such 
messages.



My configurations :

---

debug=3

log_stderror=yes
log_facility=LOG_LOCAL1

max_while_loops=200
sip_warning = 0
tcp_children=4

fork=yes # para usar TLS deixe o fork = yes.
children=4
--

Any suggestion?


Best Regards.




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



*De:* Bogdan-Andrei Iancu 
*Enviado:* quarta-feira, 4 de maio de 2016 05:38
*Para:* OpenSIPS users mailling list; Rodrigo Pimenta Carvalho
*Assunto:* Re: [OpenSIPS-Users] How to avoid many warnings about 
"handle_timer_job".

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


Home — OpenSIPS Solutions 
www.opensips-solutions.com
OpenSIPS is a mature Open Source implementation of a SIP server. 
OpenSIPS is more than a SIP proxy/router as it includes 
application-level functionalities.


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 

Re: [OpenSIPS-Users] SIPTRAce module

2016-05-17 Thread Bogdan-Andrei Iancu

Hi,

You can use the script_trace() function :
http://www.opensips.org/Documentation/Script-CoreFunctions-2-1#toc43
to trace the executions through your script.

Place this function first thing in your script and check the its output 
for your OPTIONS.


Regards,

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

On 10.05.2016 17:26, Nduwayezu, Joselyne wrote:

hello Bogdan,

How can i do to  check the logs to see if the script execution really 
gets to the siptrace part ?All what i've done, i use ngrep to capture 
packets when i send sipsak and this is what i get on both servers:


Server 10.0.0.5 gives:
.

U 2016/05/10 13:57:12.402720 10.0.0.5:47413  -> 
10.0.0.4:5060 

OPTIONS sip:opensips@10.0.0.4  SIP/2.0.
Via: SIP/2.0/UDP 10.0.0.5:47413;branch=z9hG4bK.3fc50b66;rport;alias.
From: sip:sipsak@10.0.0.5:47413;tag=4c5c78b9.
To: sip:opensips@10.0.0.4 .
Call-ID: 1281128633@10.0.0.5 .
CSeq: 1 OPTIONS.
Contact: sip:sipsak@10.0.0.5:47413 .
Content-Length: 0.
Max-Forwards: 70.
User-Agent: sipsak 0.9.6.
Accept: text/plain.
.

U 2016/05/10 13:57:12.405823 10.0.0.4:5060  -> 
10.0.0.5:47413 

SIP/2.0 *500 Service full.*
Via: SIP/2.0/UDP 
10.0.0.5:47413;received=10.0.0.5;branch=z9hG4bK.3fc50b66;rport=47413;alias.

From: sip:sipsak@10.0.0.5:47413;tag=4c5c78b9.
To: sip:opensips@10.0.0.4 
;tag=61890dad1e908c702027bf054a266115.c3bd.

Call-ID: 1281128633@10.0.0.5 .
CSeq: 1 OPTIONS.
Server: OpenSIPS (2.1.2 (x86_64/linux)).
Content-Length: 0.
.

Server 10.0.0.4 gives:


root@front-1:/etc/opensips# ngrep -d eth0 -t -W byline "$1" port 5060 -q
interface: eth0 (10.0.0.0/255.255.255.0 )
filter: (ip or ip6) and ( port 5060 )
U 2016/05/10 13:57:12.406208 10.0.0.5:47413  -> 
10.0.0.4:5060 

OPTIONS sip:opensips@10.0.0.4  SIP/2.0.
Via: SIP/2.0/UDP 10.0.0.5:47413;branch=z9hG4bK.3fc50b66;rport;alias.
From: sip:sipsak@10.0.0.5:47413;tag=4c5c78b9.
To: sip:opensips@10.0.0.4 .
Call-ID: 1281128633@10.0.0.5 .
CSeq: 1 OPTIONS.
Contact: sip:sipsak@10.0.0.5:47413 .
Content-Length: 0.
Max-Forwards: 70.
User-Agent: sipsak 0.9.6.
Accept: text/plain.
.

U 2016/05/10 13:57:12.406735 10.0.0.4:5060  -> 
10.0.0.5:47413 

SIP/2.0 *500 Service full.*
Via: SIP/2.0/UDP 
10.0.0.5:47413;received=10.0.0.5;branch=z9hG4bK.3fc50b66;rport=47413;alias.

From: sip:sipsak@10.0.0.5:47413;tag=4c5c78b9.
To: sip:opensips@10.0.0.4 
;tag=61890dad1e908c702027bf054a266115.c3bd.

Call-ID: 1281128633@10.0.0.5 .
CSeq: 1 OPTIONS.
Server: OpenSIPS (2.1.2 (x86_64/linux)).
Content-Length: 0.

I guess the error "500 Service full" is related to a bloc in the 
script where i define the routing logic for the load balancing:



## Freeswitch
route[2] {
xlog("L_NOTICE","[$pr:$fU@$si:$sp]: This is Media-Server Route 
Use Load-balancer NOW!!\n");

 if (!load_balance("1","calls")) {
 sl_send_reply("500","Service full");
exit;
}
xlog("L_NOTICE","[$pr:$fU@$si:$sp]: Selected destination 
Media-Server : $du\n");

}

.
In need more explanation how i can fix that.

NDUWAYEZU Joselyne

2016-04-30 12:20 GMT+02:00 Bogdan-Andrei Iancu >:


Hi,

Use debug=4 in your config and check the logs to see if the script
execution really gets to the siptrace part and if so, why it is
not done. If you do not manage to "read" the logs, post them
somewhere (post only logs related to the REGISTER execution - the
REGISTER you want to trace) and send here the link.

Regards,

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

On 27.04.2016 10 :24, Francjos wrote:

Hello,
I,ve conigured two opensips servers and i would like each one
to send sipsak
to another and see if it is still working.
I've installed sipsak on both Opensips.
In order to see the request and reply messages, i've used the
siptrace
module.
I've loaded it on both Opensips and set the parameters as follows:

  loadmodule “siptrace.so”

modparam(“siptrace”, “db_url“,
“mysql://opensips:opensipsrw@localhost/opensips”)
modparam(“siptrace”, “trace_flag“, “22”)# Here the
trace_flag will 22.
modparam(“siptrace”, “traced_user_avp“, “$avp(traced_user)”)
modparam(“siptrace”, “trace_on”, 1)

I also load