[OpenSIPS-Users] OpenSIPS crash

2015-08-31 Thread Stas Kobzar
Hello list,

We had OpenSIPS crashed. Please, find attached crash full stack trace from
core file attached.
OpenSIPS version:
version: opensips 1.11.5-notls (x86_64/linux)
flags: STATS: On, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, SHM_MEM,
SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
git revision: 02a7c06
main.c compiled on 18:04:23 Jul 16 2015 with gcc 4.4.7

I am not sure, but it looks like the problem is MI command ul_add. We use
datagram  MI to add/remove permanent user locations via web interface.

Before we were using XML-rpc and we had similar problem. That's why we
moved to datagram.

Please, advice.
Thank you!

P.S. As it is mentioned in OpenSIPS web-site, I have posted it first to
devel list. But my email was bounced as I am not a member of the list.
Should I send it to OpenSIPS github issues?
-- 

Stas Kobzar

Developeur VoIP / VoIP Developer

___

Modulis­.ca Inc.

# Bureau / Office: 514-284-2020 x 246

Email: s tas.kob...@modulis.ca

https://www.modulis.com


(gdb) bt full
#0  0x7f6ca92e09ef in mem_update_ucontact (_c=0x7f6c84cdc6d8, 
_ci=0x7fff18013e70) at ucontact.c:262
ptr = 
__FUNCTION__ = "mem_update_ucontact"
#1  0x7f6ca92e39d2 in update_ucontact (_r=0x7f6c84d16b58, 
_c=0x7f6c84cdc6d8, _ci=0x7fff18013e70, is_replicated=0 '\000') at ucontact.c:923
ret = 
__FUNCTION__ = "update_ucontact"
#2  0x7f6ca92eb201 in mi_usrloc_add (cmd=, 
param=) at ul_mi.c:542
ci = {received = {s = 0x0, len = 0}, path = 0x0, expires = 0, q = 1000, 
instance = {s = 0x0, len = 0}, callid = 0x0, cseq = 1, flags = 0, cflags = 0, 
user_agent = 0x7f6ca94fbac0, sock = 0x0, methods = 4294967295, last_modified = 
0, attr = 0x0}
r = 0x7f6c84d16b58
c = 0x7f6c84cdc6d8
node = 
dom = 0x7f6c84c21cc8
aor = 0x7f6cabb0b440
contact = 
ui_val = 
n = 
#3  0x7f6ca9eeb241 in run_mi_cmd (rx_sock=7, tx_sock=7) at ../../mi/mi.h:109
ret = 
#4  mi_datagram_server (rx_sock=7, tx_sock=7) at datagram_fnc.c:520
mi_cmd = 
mi_rpl = 
hdl = 0x0
f = 0x7f6cabac4188
dtgram = {start = 0x7f6cabafb270 ":ul_add", current = 0x7f6cabafb2cc 
"", len = 0}
ret = 
len = 
__FUNCTION__ = "mi_datagram_server"
#5  0x7f6ca9eecd83 in datagram_process (rank=0) at mi_datagram.c:311
__FUNCTION__ = "datagram_process"
#6  0x004af269 in start_module_procs () at sr_module.c:586
m = 
n = 
l = 
x = 
__FUNCTION__ = "start_module_procs"
#7  0x0043a5b0 in main_loop (argc=, argv=) at main.c:852
---Type  to continue, or q  to quit---
i = 
pid = 
si = 0x0
startup_done = 0x0
chd_rank = 0
rc = 
load_p = 0x0
#8  main (argc=, argv=) at main.c:1612
cfg_log_stderr = 
cfg_stream = 
c = 
r = 0
tmp = 0x7fff18014e5e ""
tmp_len = 
port = 
proto = 
options = 0x576ca0 "f:cCm:M:b:l:n:N:rRvdDFETSVhw:t:u:g:P:G:W:o:"
ret = -1
seed = 933295776
rfd = 
__FUNCTION__ = "main"
(gdb)___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS crash

2015-08-31 Thread Stas Kobzar
Hello,
Another crash just happened.
Please, find attached gdb bt full.

Thank you,


On Mon, Aug 31, 2015 at 11:32 AM, Stas Kobzar 
wrote:

> Hello list,
>
> We had OpenSIPS crashed. Please, find attached crash full stack trace from
> core file attached.
> OpenSIPS version:
> version: opensips 1.11.5-notls (x86_64/linux)
> flags: STATS: On, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, SHM_MEM,
> SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> MAX_URI_SIZE 1024, BUF_SIZE 65535
> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> git revision: 02a7c06
> main.c compiled on 18:04:23 Jul 16 2015 with gcc 4.4.7
>
> I am not sure, but it looks like the problem is MI command ul_add. We use
> datagram  MI to add/remove permanent user locations via web interface.
>
> Before we were using XML-rpc and we had similar problem. That's why we
> moved to datagram.
>
> Please, advice.
> Thank you!
>
> P.S. As it is mentioned in OpenSIPS web-site, I have posted it first to
> devel list. But my email was bounced as I am not a member of the list.
> Should I send it to OpenSIPS github issues?
> --
>
> Stas Kobzar
>
> Developeur VoIP / VoIP Developer
>
> ___
>
> Modulis­.ca Inc.
>
> # Bureau / Office: 514-284-2020 x 246
>
> Email: s tas.kob...@modulis.ca
>
> https://www.modulis.com
>
> 
>



-- 

Stas Kobzar

Developeur VoIP / VoIP Developer

___

Modulis­.ca Inc.

# Bureau / Office: 514-284-2020 x 246

Email: s tas.kob...@modulis.ca

https://www.modulis.com


#0  0x7fcd682cc9ef in mem_update_ucontact (_c=0x7fcd43d682c8, 
_ci=0x7fffde2509a0) at ucontact.c:262
ptr = 
__FUNCTION__ = "mem_update_ucontact"
#1  0x7fcd682cf9d2 in update_ucontact (_r=0x7fcd43d62088, 
_c=0x7fcd43d682c8, _ci=0x7fffde2509a0, is_replicated=0 '\000') at ucontact.c:923
ret = 
__FUNCTION__ = "update_ucontact"
#2  0x7fcd682d7201 in mi_usrloc_add (cmd=, 
param=) at ul_mi.c:542
ci = {received = {s = 0x0, len = 0}, path = 0x0, expires = 0, q = 1000, 
instance = {s = 0x0, len = 0}, callid = 0x0, cseq = 1, flags = 0, cflags = 0, 
  user_agent = 0x7fcd684e7ac0, sock = 0x0, methods = 4294967295, 
last_modified = 0, attr = 0x0}
r = 0x7fcd43d62088
c = 0x7fcd43d682c8
node = 
dom = 0x7fcd43c7c6f8
aor = 0x7fcd6aae8860
contact = 
ui_val = 
n = 
#3  0x7fcd68ed7241 in run_mi_cmd (rx_sock=7, tx_sock=7) at ../../mi/mi.h:109
ret = 
#4  mi_datagram_server (rx_sock=7, tx_sock=7) at datagram_fnc.c:520
mi_cmd = 
mi_rpl = 
hdl = 0x0
f = 0x7fcd6aab1fd0
dtgram = {start = 0x7fcd6aaec380 ":ul_add", current = 0x7fcd6aaec3dc 
"", len = 0}
ret = 
len = 
__FUNCTION__ = "mi_datagram_server"
#5  0x7fcd68ed8d83 in datagram_process (rank=0) at mi_datagram.c:311
__FUNCTION__ = "datagram_process"
#6  0x004af269 in start_module_procs () at sr_module.c:586
m = 
n = 
l = 
x = 
__FUNCTION__ = "start_module_procs"
#7  0x0043a5b0 in main_loop (argc=, argv=) at main.c:852
i = 
pid = 
si = 0x0
startup_done = 0x0
chd_rank = 0
rc = 
load_p = 0x0
#8  main (argc=, argv=) at main.c:1612
cfg_log_stderr = 
cfg_stream = 
c = 
r = 0
tmp = 0x7fffde252e5e ""
tmp_len = 
port = 
proto = 
options = 0x576ca0 "f:cCm:M:b:l:n:N:rRvdDFETSVhw:t:u:g:P:G:W:o:"
ret = -1
seed = 344037650
rfd = 
__FUNCTION__ = "main"
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] TLS discrepancy between 1.7.1 and 1.11.5

2015-08-31 Thread Matt Hamilton
Hi Bogdan,


Pastebin link is http://pastebin.com/tM7zqTKX


I included both 1.7.1 and 1.11 captures. I don't see a difference between them 
other than 1.11 sending the NOTIFY to UAC unencrypted.

Btw, INVITEs seems to be behaving the same way as NOTIFY (don't have a capture 
for those - I assume the issue is the same).


Btw, TLS works fine between Opensips 1.11 and the phone (OK messages, etc. are 
encrypted).


Thanks,

Matt


[http://pastebin.com/i/fb2.jpg]

Opensips TLS - Pastebin.com
Read more...




From: Bogdan-Andrei Iancu 
Sent: Monday, August 31, 2015 5:21 AM
To: OpenSIPS users mailling list; mistral9...@hotmail.com
Subject: Re: [OpenSIPS-Users] TLS discrepancy between 1.7.1 and 1.11.5

Hi Matt,

Can you post of pastebin (or similar) the SIP capture showing the incoming 
NOTIFY (via UDP) from Asterisk and the outgoing NOTIFY (supposedly via TLS) to 
UAC ?
Also the SUBSCRIBE request going from OpenSIPS to Asterisk will help alot.

Regards,

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

On 30.08.2015 18:22, Matt Hamilton wrote:


We use Opensips (with TLS) as a dispatcher to multiple Asterisk servers.  
Currently we are in the process of upgrading from 1.7.1 to 1.11.5, and we ran 
into a discrepancy between 1.7.1 and 1.11.5 regarding SIP NOTIFY messages.


Here is the flow (both ways):

UAC(TLS) -> Opensips   (UDP)-> Asterisk
Asterisk (UDP) -> Opensips   (TLS)->UAC


In 1.7.1,  all messages between Opensips and UAC were encrypted - didn't matter 
if it was originated at UAC or Asterisk.

In 1.11.5, the SIP NOTIFY messages coming from Asterisk are sent to UAC 
unencrypted (and not accepted by UAC). Here is the request that Opensips 
receives and sends to the UAC in plaintext:

Request-Line: NOTIFY 
sip:101@1.2.3.4:5075;transport=tls;nat=yes
 SIP/2.0

Anything we can do to have that leg encrypted as well?

Thanks,
Matt




___
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] Invite no repsonse timer

2015-08-31 Thread bluerain
Just curious, I am using opensips 1.11 and have the tm module set as:

modparam("tm", "fr_timer", 5)
modparam("tm", "fr_inv_timer", 120)
modparam("tm", "restart_fr_on_each_reply", 0)
modparam("tm", "onreply_avp_mode", 1)

When I do wireshark on a call that the far end device is not responding (or
delay responding) on INVITES, I see that second invite as send out with
about 0.6 seconds after the first and then 1.2 seconds after the second and
then 2.4 seconds on the last one.  So if I have fr_timer on 5, wouldn't the
invite retry be 5 seconds apart?  Or am I missing something here?

Thx.



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Invite-no-repsonse-timer-tp7598791.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] OpenSIPS crash

2015-08-31 Thread Stas Kobzar
Hello,
We had a couple another crashes which looks very much the same.
Please, see attached.

Thank you,

On Mon, Aug 31, 2015 at 12:00 PM, Stas Kobzar 
wrote:

> Hello,
> Another crash just happened.
> Please, find attached gdb bt full.
>
> Thank you,
>
>
> On Mon, Aug 31, 2015 at 11:32 AM, Stas Kobzar 
> wrote:
>
>> Hello list,
>>
>> We had OpenSIPS crashed. Please, find attached crash full stack trace
>> from core file attached.
>> OpenSIPS version:
>> version: opensips 1.11.5-notls (x86_64/linux)
>> flags: STATS: On, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, SHM_MEM,
>> SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
>> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
>> MAX_URI_SIZE 1024, BUF_SIZE 65535
>> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
>> git revision: 02a7c06
>> main.c compiled on 18:04:23 Jul 16 2015 with gcc 4.4.7
>>
>> I am not sure, but it looks like the problem is MI command ul_add. We use
>> datagram  MI to add/remove permanent user locations via web interface.
>>
>> Before we were using XML-rpc and we had similar problem. That's why we
>> moved to datagram.
>>
>> Please, advice.
>> Thank you!
>>
>> P.S. As it is mentioned in OpenSIPS web-site, I have posted it first to
>> devel list. But my email was bounced as I am not a member of the list.
>> Should I send it to OpenSIPS github issues?
>> --
>>
>> Stas Kobzar
>>
>> Developeur VoIP / VoIP Developer
>>
>> ___
>>
>> Modulis­.ca Inc.
>>
>> # Bureau / Office: 514-284-2020 x 246
>>
>> Email: s tas.kob...@modulis.ca
>>
>> https://www.modulis.com
>>
>> 
>>
>
>
>
> --
>
> Stas Kobzar
>
> Developeur VoIP / VoIP Developer
>
> ___
>
> Modulis­.ca Inc.
>
> # Bureau / Office: 514-284-2020 x 246
>
> Email: s tas.kob...@modulis.ca
>
> https://www.modulis.com
>
> 
>



-- 

Stas Kobzar

Developeur VoIP / VoIP Developer

___

Modulis­.ca Inc.

# Bureau / Office: 514-284-2020 x 246

Email: s tas.kob...@modulis.ca

https://www.modulis.com


#0  0x7f18d62559ef in mem_update_ucontact (_c=0x7f18b2334458, 
_ci=0x7fff100b4580) at ucontact.c:262
ptr = 
__FUNCTION__ = "mem_update_ucontact"
#1  0x7f18d62589d2 in update_ucontact (_r=0x7f18b1f7e5b0, 
_c=0x7f18b2334458, _ci=0x7fff100b4580, is_replicated=0 '\000') at ucontact.c:923
ret = 
__FUNCTION__ = "update_ucontact"
#2  0x7f18d6260201 in mi_usrloc_add (cmd=, 
param=) at ul_mi.c:542
ci = {received = {s = 0x0, len = 0}, path = 0x0, expires = 0, q = 1000, 
instance = {s = 0x0, len = 0}, callid = 0x0, cseq = 1, flags = 0, cflags = 0, 
  user_agent = 0x7f18d6470ac0, sock = 0x0, methods = 4294967295, 
last_modified = 0, attr = 0x0}
r = 0x7f18b1f7e5b0
c = 0x7f18b2334458
node = 
dom = 0x7f18b1c10b20
aor = 0x7f18d8a71238
contact = 
ui_val = 
n = 
#3  0x7f18d6e60241 in run_mi_cmd (rx_sock=7, tx_sock=7) at ../../mi/mi.h:109
ret = 
#4  mi_datagram_server (rx_sock=7, tx_sock=7) at datagram_fnc.c:520
mi_cmd = 
mi_rpl = 
hdl = 0x0
f = 0x7f18d8a3b080
dtgram = {start = 0x7f18d8a72940 ":ul_add", current = 0x7f18d8a7299c 
"", len = 0}
ret = 
len = 
__FUNCTION__ = "mi_datagram_server"
#5  0x7f18d6e61d83 in datagram_process (rank=0) at mi_datagram.c:311
__FUNCTION__ = "datagram_process"
#6  0x004af269 in start_module_procs () at sr_module.c:586
m = 
n = 
l = 
x = 
__FUNCTION__ = "start_module_procs"
#7  0x0043a5b0 in main_loop (argc=, argv=) at main.c:852
i = 
pid = 
si = 0x0
startup_done = 0x0
chd_rank = 0
rc = 
load_p = 0x0
#8  main (argc=, argv=) at main.c:1612
cfg_log_stderr = 
cfg_stream = 
c = 
r = 0
tmp = 0x7fff100b5e5e ""
tmp_len = 
port = 
proto = 
options = 0x576ca0 "f:cCm:M:b:l:n:N:rRvdDFETSVhw:t:u:g:P:G:W:o:"
ret = -1
seed = 3732902674
rfd = 
__FUNCTION__ = "main"
#0  0x7ff1a1af69ef in mem_update_ucontact (_c=0x7ff17d594410, 
_ci=0x7fff482488a0) at ucontact.c:262
ptr = 
__FUNCTION__ = "mem_update_ucontact"
#1  0x7ff1a1af99d2 in update_ucontact (_r=0x7ff17d020c08, 
_c=0x7ff17d594410, _ci=0x7fff482488a0, is_replicated=0 '\000') at ucontact.c:923
ret = 
__FUNCTION__ = "update_ucontact"
#2  0x7ff1a1b01201 in mi_usrloc_add (cmd=, 
param=) at ul_mi.c:542
ci = {received = {s = 0x0, len = 0}, path = 0x0, expires = 0, q = 1000, 
instance = {s = 0x0, len = 0}, callid = 0x0, cseq = 1, flags = 0, cflags = 0, 
  

Re: [OpenSIPS-Users] Register timeout question.

2015-08-31 Thread Bogdan-Andrei Iancu

Rodrigo,

The feature I mentioned was just pushed to GIT :
https://github.com/OpenSIPS/opensips/commit/a1992cd14fe393ca3b3fba0dac0a423e28764966

It relies on some heavy changes on the usrloc (available only on trunk), 
so you cannot simply copy only the above commit.


Regards,

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

On 31.08.2015 14:20, Rodrigo Pimenta Carvalho wrote:


Ok.

Thank you!


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



*De:* Bogdan-Andrei Iancu 
*Enviado:* segunda-feira, 31 de agosto de 2015 06:04
*Para:* Rodrigo Pimenta Carvalho; OpenSIPS users mailling list
*Assunto:* Re: [OpenSIPS-Users] Register timeout question.
Hi Rodrigo,

I meant 40 mins from the registration time (out for the overall 60). 
And yes, yous suspicion is correct.


As said, the "opensipsctl online" only shows the registered contacts, 
without actually checking their current status.


The patch I mentioned will be available in the next days in OpenSIPs 
2.2 devel.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 28.08.2015 20:09, Rodrigo Pimenta Carvalho wrote:


Hi Bogdan.


Thank you again.


Do you mean 40 or 30 mins? If the registration is for 60' and the 
network break down after 30', so I suspect that the registration will 
remain online only for more 30'.  Not 40'. Am I correct?



As I need to know as soon as possible, by means of the SIP Registrar, 
whether a device became offline, I  think that the command 
'opensipsctl online' will be really useful, if each device register 
for 10 seconds for example.



What do you think about this approach? Comment, please.


If the approach is unappropriated, I will take a look in that 
internal PR you have said.



Regards.


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



*De:* Bogdan-Andrei Iancu 
*Enviado:* sexta-feira, 28 de agosto de 2015 12:33
*Para:* Rodrigo Pimenta Carvalho; OpenSIPS users mailling list
*Assunto:* Re: [OpenSIPS-Users] Register timeout question.
Hi Rodrigo,

"opensipsctl online" simply shows the registration cache (who 
registered and for how long), but without actively checking if the 
registered device is still alive.


It simply shows the who's registered based on the received REGISTER 
requests. The list is realtime updated based on these REGISTERs.


But if a device registers for 60 minutes and it drops form network 
after 30 minutes, the device will still be shown as online after 40 
mins (up to 60 mins, when the registration will expire).


Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 28.08.2015 17:19, Rodrigo Pimenta Carvalho wrote:


Hi Bogdan.


Thank you for the reply.


What about the line command 'opensipsctl online'?  This command 
shows me who is online, so it has some way to detect who is and who 
is not online in a moment.



How this command can figure out who is currently online? If some 
peer UAC become offline, does such command return an updated list 
immediately, or does it take some seconds to start returning an 
update list? If it take some seconds, does it depend on the 
periodicity of SIP Register messages from such UAC?



I need to know how long does it take to get an update online peers 
list, by means of the 'opensipsctl online' command, after someone 
becoming offline.



Best regards.


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



*De:* Bogdan-Andrei Iancu 
*Enviado:* sexta-feira, 28 de agosto de 2015 11:00
*Para:* OpenSIPS users mailling list; Rodrigo Pimenta Carvalho
*Assunto:* Re: [OpenSIPS-Users] Register timeout question.
Hi Rodrigo,

Currently there is no way for OpenSIPS to check the status of the 
active registrations. But we have an internal PR with such feature - 
doing SIP pinging to the registered contacts and if no answer, to 
auto unregister the contact. Most probably it will be uploaded on 
2.2 branch in the next week.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 28.08.2015 16:27, Rodrigo Pimenta Carvalho wrote:



Hi.


Let´s  suppose there are some peers online in my OpenSIPS.

For my project, whether a peer (UAC) become offline, my OpenSIPS 
must detect it in 10 seconds.


Is there a way to detect it by means of some kind of SIP Register 
timeout configuration? How to configure OpenSIPS for this objective?



Any hint will be very helpful!


Best regards.




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



Re: [OpenSIPS-Users] core generated by opensips

2015-08-31 Thread Bogdan-Andrei Iancu

Thank you Rahul,

the whole req variable seems to be garbage :(.

Could you additionally print ingdb:
con->con_req
_req
req

Also, does this crash happens on the first TCP read ? or after a while, 
after several read ops?


Regards,

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

On 31.08.2015 15:26, Gupta, Rahul wrote:


Hi Bogdan, here are the details you requested

(gdb) bt

#0 0x7f2095572e2c in vfprintf () from /lib64/libc.so.6

#1 0x7f209560fed0 in __vsyslog_chk () from /lib64/libc.so.6

#2 0x7f2095610100 in syslog () from /lib64/libc.so.6

#3 0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597


#4 0x004c5908 in handle_io (fm=, idx=-1, 
event_type=) at tcp_read.c:1033


#5 0x004c8083 in io_wait_loop_epoll (unix_sock=optimized out>) at io_wait.h:845


#6 tcp_receive_loop (unix_sock=) at tcp_read.c:1141

#7 0x004b12e9 in tcp_init_children (chd_rank=out>, startup_done=0x0) at tcp_main.c:2389


#8 0x0043aebf in main_loop (argc=, 
argv=) at main.c:1011


#9 main (argc=, argv=) at 
main.c:1612


(gdb) f 3

#3 0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597


597 tcp_read.c: No such file or directory.

in tcp_read.c

(gdb) p *req

$1 = {next = 0x3,

  buf = "\022Ø\000\000\000\000\000M\000\000\000\000\000\000\000T", 
'\000' , "p\227\032\223 \177\000\000p\227\032\223 
\177\000\000H\000\000\000\000\000\000\000\250\203\032\223 
\177\000\000\300\227\032\223 
\177\000\000\001\000\000\000\000\000\000\000\264×\000\000\000\000\000\003\000\000\000\000\000\000\000\271×\000\000\000\000\000R\000\000\000\000\000\000\000Y", 
'\000' , "Ð\032\223 \177\000\000Ð\032\223 
\177\000\000\200", '\000' , "P\221\026\223 
\177\000\000Via: SIP/2.0/TCP 
10.204.70.154:5070;branch=z9hG4bK+540c4cc39bb7b8e44a"...,


  start = 0x6d782b6c6d736d2f bounds>, pos = 0x462d78614d0a0d6c bounds>,


  parsed = 0x3a7364726177726f bounds>, body = 0x3c0a0d0a0d303720 bounds>, content_len = 1819113535, has_content_len = 30240,


  complete = 29285, bytes_to_go = 1852795251, error = 774971965, state 
= 1696604720}


(gdb)

*From:*Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
*Sent:* Monday, August 31, 2015 5:25 AM
*To:* OpenSIPS users mailling list; Gupta, Rahul
*Subject:* Re: [OpenSIPS-Users] core generated by opensips

Hi Rahul,

Could you do in gdb:

p *req

to see all the field of the request structure.

Thanks,

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

On 30.08.2015 23:31, Gupta, Rahul wrote:

Hi, I am using opensips-1.11.5-tls and the opensips crashed with
the following gdb trace. Seems like it crashed while printing
error message. Is this something already fixed

LM_ERR("bad request, state=%d, error=%d "

"buf:\n%.*s\nparsed:\n%.*s\n", req->state, req->error,

(int)(req->pos-req->buf), req->buf,

(int)(req->parsed-req->start), req->start);

(gdb) bt

#0 0x7f2095572e2c in vfprintf () from /lib64/libc.so.6

#1 0x7f209560fed0 in __vsyslog_chk () from /lib64/libc.so.6

#2 0x7f2095610100 in syslog () from /lib64/libc.so.6

#3 0x004c4202 in tcp_read_req (con=0x7f2081a933c0,
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597

#4 0x004c5908 in handle_io (fm=,
idx=-1, event_type=) at tcp_read.c:1033

#5 0x004c8083 in io_wait_loop_epoll (unix_sock=) at io_wait.h:845

#6 tcp_receive_loop (unix_sock=) at
tcp_read.c:1141

#7 0x004b12e9 in tcp_init_children (chd_rank=, startup_done=0x0) at tcp_main.c:2389

#8 0x0043aebf in main_loop (argc=,
argv=) at main.c:1011

#9 main (argc=, argv=)
at main.c:1612

(gdb) f 3

#3 0x004c4202 in tcp_read_req (con=0x7f2081a933c0,
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597

597 tcp_read.c: No such file or directory.

in tcp_read.c

(gdb) info 3

Undefined info command: "3".  Try "help info".

(gdb) print buf

$1 = 0

(gdb) print req

$2 = (struct tcp_req *) 0x7f20931a97e0

(gdb) print req->state

$3 = 1696604720

(gdb) print req->error

$4 = 774971965

(gdb) print req->buf

$5 = "\022Ø\000\000\000\000\000M\000\000\000\000\000\000\000T",
'\000' , "p\227\032\223
\177\000\000p\227\032\223
\177\000\000H\000\000\000\000\000\000\000\250\203\032\223
\177\000\000\300\227\032\223

\177\000\000\001\000\000\000\000\000\000\000\264×\000\000\000\000\000\003\000\000\000\000\000\000\000\271×\000\000\000\000\000R\000\000\000\000\000\000\000Y",
'\000' , "Ð\032\223 \177\000\000Ð\032\223
\177\000\000\200", '\000' , "P\221\026\223
\177\000\000Via: SIP/2.0/TCP
10.204.70.154:5070;branch=z9hG4bK+540c4cc39bb7b8e44a"...

(gdb) print req->start

$6 = 0x6d782b6c6d736d2f 

(gdb) print req->parsed-req->start

$7 = -3676281973086354112

(gdb) 

[OpenSIPS-Users] Question regarding TLS

2015-08-31 Thread Gupta, Rahul
Hi, I am using opensips-1.11.5-tls and trying to figure out which TLS versions 
are supported

>From the documentation I see that either 1.0 or 1.2 are supported. Is it 
>possible to have all the tls version support (1.0, 1.1 and 1.2) within the 
>same instance of opensips ?

*TLSv1_2 - means OpenSIPS will accept only TLSv1.2 connections (rfc3261 
conformant).

*TLSv1 - means OpenSIPS will accept only TLSv1 connections (rfc3261 
conformant).
Thanks
Rahul Gupta

--

DISCLAIMER: This e-mail may contain information that is confidential, 
privileged or otherwise protected from disclosure. If you are not an intended 
recipient of this e-mail, do not duplicate or redistribute it by any means. 
Please delete it and any attachments and notify the sender that you have 
received it in error. Unintended recipients are prohibited from taking action 
on the basis of information in this e-mail.E-mail messages may contain computer 
viruses or other defects, may not be accurately replicated on other systems, or 
may be intercepted, deleted or interfered with without the knowledge of the 
sender or the intended recipient. If you are not comfortable with the risks 
associated with e-mail messages, you may decide not to use e-mail to 
communicate with IPC. IPC reserves the right, to the extent and under 
circumstances permitted by applicable law, to retain, monitor and intercept 
e-mail messages to and from its systems.
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] core generated by opensips

2015-08-31 Thread Gupta, Rahul
Hi Bogdan, following is the info you requested. This is not the first tcp read, 
this server is been running for a while and taking calls.

(gdb) bt
#0  0x7f2095572e2c in vfprintf () from /lib64/libc.so.6
#1  0x7f209560fed0 in __vsyslog_chk () from /lib64/libc.so.6
#2  0x7f2095610100 in syslog () from /lib64/libc.so.6
#3  0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597
#4  0x004c5908 in handle_io (fm=, idx=-1, 
event_type=) at tcp_read.c:1033
#5  0x004c8083 in io_wait_loop_epoll (unix_sock=) 
at io_wait.h:845
#6  tcp_receive_loop (unix_sock=) at tcp_read.c:1141
#7  0x004b12e9 in tcp_init_children (chd_rank=, 
startup_done=0x0) at tcp_main.c:2389
#8  0x0043aebf in main_loop (argc=, argv=) at main.c:1011
#9  main (argc=, argv=) at main.c:1612
(gdb) f 3
#3  0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597
597 tcp_read.c: No such file or directory.
in tcp_read.c
(gdb) p con->con_req
$1 = (struct tcp_req *) 0x7f20931a97e0
(gdb) p _req
$2 = (struct tcp_req *) 0x82d720
(gdb) p req
$3 = (struct tcp_req *) 0x7f20931a97e0
(gdb)

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
Sent: Monday, August 31, 2015 3:45 PM
To: Gupta, Rahul; OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] core generated by opensips

Thank you Rahul,

the whole req variable seems to be garbage :(.

Could you additionally print in gdb:
con->con_req
_req
req

Also, does this crash happens on the first TCP read ? or after a while, after 
several read ops ?

Regards,


Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

http://www.opensips-solutions.com
On 31.08.2015 15:26, Gupta, Rahul wrote:
Hi Bogdan, here are the details you requested

(gdb) bt
#0  0x7f2095572e2c in vfprintf () from /lib64/libc.so.6
#1  0x7f209560fed0 in __vsyslog_chk () from /lib64/libc.so.6
#2  0x7f2095610100 in syslog () from /lib64/libc.so.6
#3  0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597
#4  0x004c5908 in handle_io (fm=, idx=-1, 
event_type=) at tcp_read.c:1033
#5  0x004c8083 in io_wait_loop_epoll (unix_sock=) 
at io_wait.h:845
#6  tcp_receive_loop (unix_sock=) at tcp_read.c:1141
#7  0x004b12e9 in tcp_init_children (chd_rank=, 
startup_done=0x0) at tcp_main.c:2389
#8  0x0043aebf in main_loop (argc=, argv=) at main.c:1011
#9  main (argc=, argv=) at main.c:1612
(gdb) f 3
#3  0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597
597 tcp_read.c: No such file or directory.
in tcp_read.c
(gdb) p *req
$1 = {next = 0x3,
  buf = "\022Ø\000\000\000\000\000M\000\000\000\000\000\000\000T", '\000' 
, "p\227\032\223 \177\000\000p\227\032\223 
\177\000\000H\000\000\000\000\000\000\000\250\203\032\223 
\177\000\000\300\227\032\223 
\177\000\000\001\000\000\000\000\000\000\000\264×\000\000\000\000\000\003\000\000\000\000\000\000\000\271×\000\000\000\000\000R\000\000\000\000\000\000\000Y",
 '\000' , "Ð\032\223 \177\000\000Ð\032\223 \177\000\000\200", 
'\000' , "P\221\026\223 \177\000\000Via: SIP/2.0/TCP 
10.204.70.154:5070;branch=z9hG4bK+540c4cc39bb7b8e44a"...,
  start = 0x6d782b6c6d736d2f , pos = 
0x462d78614d0a0d6c ,
  parsed = 0x3a7364726177726f , body 
= 0x3c0a0d0a0d303720 , content_len = 
1819113535, has_content_len = 30240,
  complete = 29285, bytes_to_go = 1852795251, error = 774971965, state = 
1696604720}
(gdb)

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
Sent: Monday, August 31, 2015 5:25 AM
To: OpenSIPS users mailling list; Gupta, Rahul
Subject: Re: [OpenSIPS-Users] core generated by opensips

Hi Rahul,

Could you do in gdb:

p *req

to see all the field of the request structure.

Thanks,



Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

http://www.opensips-solutions.com
On 30.08.2015 23:31, Gupta, Rahul wrote:
Hi, I am using opensips-1.11.5-tls and the opensips crashed with the following 
gdb trace. Seems like it crashed while printing error message. Is this 
something already fixed

LM_ERR("bad request, state=%d, error=%d "
  "buf:\n%.*s\nparsed:\n%.*s\n", req->state, 
req->error,
  (int)(req->pos-req->buf), req->buf,
  (int)(req->parsed-req->start), req->start);

(gdb) bt
#0  0x7f2095572e2c in vfprintf () from /lib64/libc.so.6
#1  0x7f209560fed0 in __vsyslog_chk () from /lib64/libc.so.6
#2  0x7f2095610100 in syslog () from /lib64/libc.so.6
#3  0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597
#4  0x004c5908 in handle_io (fm=, idx=-1, 
event_type=) at tcp_read.c:1033
#5  0x004c8083 in io_wait_loop_epoll (unix_sock=) 
at io_wait.h:845
#6  tcp_receive_loop (unix_sock=) at tcp_read.c:1141
#7  0x004b12e9 in tcp_init_children 

Re: [OpenSIPS-Users] OpenSIPS crash

2015-08-31 Thread Bogdan-Andrei Iancu

Hi Stas,

In frame 0, please print in gdb:
_c->callid
_ci->callid
*_ci->callid

Regards,

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

On 31.08.2015 18:32, Stas Kobzar wrote:

Hello list,

We had OpenSIPS crashed. Please, find attached crash full stack trace 
from core file attached.

OpenSIPS version:
version: opensips 1.11.5-notls (x86_64/linux)
flags: STATS: On, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, 
SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
MAX_URI_SIZE 1024, BUF_SIZE 65535

poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
git revision: 02a7c06
main.c compiled on 18:04:23 Jul 16 2015 with gcc 4.4.7

I am not sure, but it looks like the problem is MI command ul_add. We 
use datagram  MI to add/remove permanent user locations via web 
interface.


Before we were using XML-rpc and we had similar problem. That's why we 
moved to datagram.


Please, advice.
Thank you!

P.S. As it is mentioned in OpenSIPS web-site, I have posted it first 
to devel list. But my email was bounced as I am not a member of the list.

Should I send it to OpenSIPS github issues?
--

Stas Kobzar

Developeur VoIP / VoIP Developer

___


Modulis­.ca Inc.

# Bureau / Office: 514-284-2020 x 246

Email: s tas.kob...@modulis.ca

https://www.modulis.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


Re: [OpenSIPS-Users] Invite no repsonse timer

2015-08-31 Thread Bogdan-Andrei Iancu

Hi,

The fr_timer does not have steps for retransmissions, but after how long 
the retransmissions should stop.


Retransmissions do have a predefined stepping of 0.5, 1, 2, 4 , 4, 4 
seconds until the expire is reached.


Regards,

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

On 31.08.2015 21:12, bluerain wrote:

Just curious, I am using opensips 1.11 and have the tm module set as:

modparam("tm", "fr_timer", 5)
modparam("tm", "fr_inv_timer", 120)
modparam("tm", "restart_fr_on_each_reply", 0)
modparam("tm", "onreply_avp_mode", 1)

When I do wireshark on a call that the far end device is not responding (or
delay responding) on INVITES, I see that second invite as send out with
about 0.6 seconds after the first and then 1.2 seconds after the second and
then 2.4 seconds on the last one.  So if I have fr_timer on 5, wouldn't the
invite retry be 5 seconds apart?  Or am I missing something here?

Thx.



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Invite-no-repsonse-timer-tp7598791.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


Re: [OpenSIPS-Users] Question regarding TLS

2015-08-31 Thread Bogdan-Andrei Iancu

Hi Rahul,

For a TLS domain you can use a single TLS method. But you can use 
different values for different TLS domains. For 1.11, see the example here:

http://www.opensips.org/html/docs/tutorials/tls-1.4.x.html#AEN345

Regards,

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

On 31.08.2015 22:46, Gupta, Rahul wrote:


Hi, I am using opensips-1.11.5-tls and trying to figure out which TLS 
versions are supported


From the documentation I see that either 1.0 or 1.2 are supported. Is 
it possible to have all the tls version support (1.0, 1.1 and 1.2) 
within the same instance of opensips ?


·/TLSv1_2/- means OpenSIPS will accept only TLSv1.2 connections 
(rfc3261 conformant).


·/TLSv1/- means OpenSIPS will accept only TLSv1 connections (rfc3261 
conformant).


Thanks

Rahul Gupta

--

DISCLAIMER: This e-mail may contain information that is confidential, 
privileged or otherwise protected from disclosure. If you are not an 
intended recipient of this e-mail, do not duplicate or redistribute it 
by any means. Please delete it and any attachments and notify the 
sender that you have received it in error. Unintended recipients are 
prohibited from taking action on the basis of information in this 
e-mail.E-mail messages may contain computer viruses or other defects, 
may not be accurately replicated on other systems, or may be 
intercepted, deleted or interfered with without the knowledge of the 
sender or the intended recipient. If you are not comfortable with the 
risks associated with e-mail messages, you may decide not to use 
e-mail to communicate with IPC. IPC reserves the right, to the extent 
and under circumstances permitted by applicable law, to retain, 
monitor and intercept e-mail messages to and from its systems.




___
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] TLS discrepancy between 1.7.1 and 1.11.5

2015-08-31 Thread Bogdan-Andrei Iancu

Hi Matt,

Indeed, the SIP messages do look ok.

Could you post the OpenSIPS logs (in debug 4) for processing the NOTIFY 
request ?


Regards,

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

On 31.08.2015 20:07, Matt Hamilton wrote:


Hi Bogdan,


Pastebin link is http://pastebin.com/tM7zqTKX


I included both 1.7.1 and 1.11 captures. I don't see a difference 
between them other than 1.11 sending the NOTIFY to UAC unencrypted.


Btw, INVITEs seems to be behaving the same way as NOTIFY (don't have a 
capture for those - I assume the issue is the same).



Btw, TLS works fine between Opensips 1.11 and the phone (OK messages, 
etc. are encrypted).



Thanks,

Matt




Opensips TLS - Pastebin.com
Read more... 



*From:* Bogdan-Andrei Iancu 
*Sent:* Monday, August 31, 2015 5:21 AM
*To:* OpenSIPS users mailling list; mistral9...@hotmail.com
*Subject:* Re: [OpenSIPS-Users] TLS discrepancy between 1.7.1 and 1.11.5
Hi Matt,

Can you post of pastebin (or similar) the SIP capture showing the 
incoming NOTIFY (via UDP) from Asterisk and the outgoing NOTIFY 
(supposedly via TLS) to UAC ?

Also the SUBSCRIBE request going from OpenSIPS to Asterisk will help alot.

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 30.08.2015 18:22, Matt Hamilton wrote:




We use Opensips (with TLS) as a dispatcher to multiple Asterisk 
servers.  Currently we are in the process of upgrading from 1.7.1 to 
1.11.5, and we ran into a discrepancy between 1.7.1 and 1.11.5 
regarding SIP NOTIFY messages.



Here is the flow (both ways):

UAC(TLS) -> Opensips   (UDP)-> Asterisk
Asterisk  (UDP) -> Opensips   (TLS)->UAC


In 1.7.1,  all messages between Opensips and UAC were encrypted - 
didn't matter if it was originated at UAC or Asterisk.


In 1.11.5, the SIP NOTIFY messages coming from Asterisk are sent to 
UAC unencrypted (and not accepted by UAC). Here is the request that 
Opensips receives and sends to the UAC in plaintext:


Request-Line: NOTIFY sip:101@1.2.3.4:5075;transport=tls;nat=yes SIP/2.0

Anything we can do to have that leg encrypted as well?

Thanks,
Matt



___
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] core generated by opensips

2015-08-31 Thread Bogdan-Andrei Iancu

And printing :
*con

Thanks,

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

On 31.08.2015 22:50, Gupta, Rahul wrote:


Hi Bogdan, following is the info you requested. This is not the first 
tcp read, this server is been running for a while and taking calls.


(gdb) bt

#0 0x7f2095572e2c in vfprintf () from /lib64/libc.so.6

#1 0x7f209560fed0 in __vsyslog_chk () from /lib64/libc.so.6

#2 0x7f2095610100 in syslog () from /lib64/libc.so.6

#3 0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597


#4 0x004c5908 in handle_io (fm=, idx=-1, 
event_type=) at tcp_read.c:1033


#5 0x004c8083 in io_wait_loop_epoll (unix_sock=optimized out>) at io_wait.h:845


#6 tcp_receive_loop (unix_sock=) at tcp_read.c:1141

#7 0x004b12e9 in tcp_init_children (chd_rank=out>, startup_done=0x0) at tcp_main.c:2389


#8 0x0043aebf in main_loop (argc=, 
argv=) at main.c:1011


#9 main (argc=, argv=) at 
main.c:1612


(gdb) f 3

#3 0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597


597 tcp_read.c: No such file or directory.

in tcp_read.c

(gdb) p con->con_req

$1 = (struct tcp_req *) 0x7f20931a97e0

(gdb) p _req

$2 = (struct tcp_req *) 0x82d720

(gdb) p req

$3 = (struct tcp_req *) 0x7f20931a97e0

(gdb)

*From:*Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
*Sent:* Monday, August 31, 2015 3:45 PM
*To:* Gupta, Rahul; OpenSIPS users mailling list
*Subject:* Re: [OpenSIPS-Users] core generated by opensips




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


Re: [OpenSIPS-Users] B2BUA marketting scenario

2015-08-31 Thread Sebastian Sastre
Bodgan,

Did you have a change to look into this? just curious to know if you
replicated the problem.

thanks !


On Tue, Aug 18, 2015 at 12:16 PM, Sebastian Sastre <
sastre.sebast...@gmail.com> wrote:

> Bogdan,
>
> it appears to be broken as of 1.11 and 2.1 yes. I couldn't find any more
> indications in the logs that would point to a visible error, but the ACK
> still has no SDP.
>
> I have a few machines to test this out with the different versions, let me
> know if you want a specific trace or core dump, happy to help.
>
> thanks !
>
>
> On Tue, Aug 18, 2015 at 9:22 AM, Bogdan-Andrei Iancu 
> wrote:
>
>> Sebastian,
>>
>> So 1.11 and above are broken in this late ACK generation ? If so, I will
>> dig into .
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 18.08.2015 16:20, Sebastian Sastre wrote:
>>
>> Bodgan,
>>
>> Yes , i tried 1.11 and had the same issue, so i went down to 1.8 TLS and
>> it worked right away with the same scenario. A fee config changes but
>> overal its the standrad script.
>>
>> With 1.8 i see the sdp on the Ack and the call connects without problems.
>> Even video.
>>
>> Not sure why it did not work on higher versions.
>>
>> Regards,
>>
>>
>> On Tue, Aug 18, 2015 at 7:42 AM, Bogdan-Andrei Iancu > > wrote:
>>
>>> Hi Sebastian,
>>>
>>> You mentioned yesterday on IRC channel that you fixed the problem ?
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>>
>>> On 17.08.2015 13:40, Sebastian Sastre wrote:
>>>
>>> Bodgan,
>>>
>>> Thanks i wasn't sure on the ack process. This is the log , the scenario
>>> is triggered by a httpd json call.
>>>
>>> INFO:b2b_logic:b2bl_add_client: adding entity
>>> [0x7f718dfa7068]->[B2B.173.7331923] to tuple [0x7f718dfa0cd0]->[685.0]
>>> WARNING:b2b_logic:b2bl_delete_entity: entity [0x7f718dfa2d18]->[] not
>>> found for tuple [685.0]
>>> INFO:b2b_logic:b2bl_delete_entity: delete tuple [685.0], entity []
>>> INFO:b2b_logic:b2bl_add_client: adding entity
>>> [0x7f718dfa4d28]->[B2B.173.5533781] to tuple [0x7f718dfa0cd0]->[685.0]
>>> INFO:b2b_logic:b2b_add_dlginfo: Dialog pair: [B2B.173.7331923] -
>>> [B2B.173.5533781]
>>>
>>> and the trace looks like this
>>>
>>> 172.10.1.21 -> 172.10.1.107 SIP 436 Request: INVITE
>>> sip:sebas3@172.10.1.107:5060
>>> 172.10.1.107 -> 172.10.1.21 SIP 346 Status: 100 Giving a try
>>> 172.10.1.107 -> 172.10.1.21 SIP 456 Status: 180 Ringing
>>> 172.10.1.107 -> 172.10.1.21 SIP/SDP 1088 Status: 200 Ok, with session
>>> description
>>>
>>> 172.10.1.21 -> 172.10.1.20 SIP/SDP 843 Request: INVITE
>>> sip:1@172.10.1.20:5060, with session description
>>> 172.10.1.20 -> 172.10.1.21 SIP 390 Status: 100 Trying
>>> 172.10.1.20 -> 172.10.1.21 SIP/SDP 1252 Status: 200 OK, with session
>>> description
>>>
>>> 172.10.1.21 -> 172.10.1.107 SIP 526 Request: ACK
>>> sip:sebas3@73.139.116.217
>>> 172.10.1.21 -> 172.10.1.20 SIP 446 Request: ACK
>>> sip:1@172.10.1.20:5060;transport=udp
>>>
>>> 172.10.1.107 -> 172.10.1.21 SIP 474 Request: BYE
>>> sip:DialerProxy@172.10.1.21:5060
>>> 172.10.1.21 -> 172.10.1.20 SIP 446 Request: BYE
>>> sip:1@172.10.1.20:5060;transport=udp
>>> 172.10.1.20 -> 172.10.1.21 SIP 545 Status: 200 OK
>>> 172.10.1.21 -> 172.10.1.107 SIP 629 Status: 200 OK
>>>
>>> thanks !
>>>
>>>
>>> On Mon, Aug 17, 2015 at 5:47 AM, Bogdan-Andrei Iancu <
>>> bog...@opensips.org> wrote:
>>>
 Hi Sebastian,

 The 200OK from FS must be followed by ACK+SDP to linphone. See:
 http://www.opensips.org/Documentation/Tutorials-B2BUA#toc14

 If this does not happen -> do you see any errors in the logs (around
 the processing of 200OK from FS) ?

 Regards,

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

 On 17.08.2015 04:18, Sebastian Sastre wrote:

 Hi guys,

 Im using the B2BUA module to send a call out to our subscribers and
 bridge them with our IVR server on answer.

 The subscriber side uses linphone and the media server is a freeswitch
 1.6. When placing the call thru the trigger scenario MI command, the
 initial invite does not have any SDP inside which makes sense.

 Once the 200ok is received from the linphone client, opensips uses  the
 SDP contained in the 200 to generate an invite to the freeswitch box. which
 is great.

 However, when the 200ok is received from freeswitch, the following ACK
 back the linphone client does not contain the SDP and Linphone complains
 with "No codec intersection" and sends an immediate bye.

 Am i right to think that the sdp should go in the ack to create a late
 offer?
 Should i be sending a re invite?

 any help appreciated.

 My scenario is simple.

 
 >>> type="extern">
   
 
 
 client1
 

Re: [OpenSIPS-Users] core generated by opensips

2015-08-31 Thread Gupta, Rahul
Hi Bogdan, following is the info you requested.

#0  0x7f2095572e2c in vfprintf () from /lib64/libc.so.6
#1  0x7f209560fed0 in __vsyslog_chk () from /lib64/libc.so.6
#2  0x7f2095610100 in syslog () from /lib64/libc.so.6
#3  0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597
#4  0x004c5908 in handle_io (fm=, idx=-1, 
event_type=) at tcp_read.c:1033
#5  0x004c8083 in io_wait_loop_epoll (unix_sock=) 
at io_wait.h:845
#6  tcp_receive_loop (unix_sock=) at tcp_read.c:1141
#7  0x004b12e9 in tcp_init_children (chd_rank=, 
startup_done=0x0) at tcp_main.c:2389
#8  0x0043aebf in main_loop (argc=, argv=) at main.c:1011
#9  main (argc=, argv=) at main.c:1612
(gdb) f 3
#3  0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597
597 tcp_read.c: No such file or directory.
in tcp_read.c
(gdb) p con->con_req
$1 = (struct tcp_req *) 0x7f20931a97e0
(gdb) p _req
$2 = (struct tcp_req *) 0x82d720
(gdb) p req
$3 = (struct tcp_req *) 0x7f20931a97e0
(gdb) p *con
$4 = {s = 30, fd = 21, write_lock = 0, id = 19, rcv = {src_ip = {af = 2, len = 
4, u = {addrl = {2621885450, 0}, addr32 = {2621885450, 0, 0, 0}, addr16 = 
{52234, 40006, 0, 0, 0, 0, 0, 0},
addr = "\n\314F\234", '\000' }}, dst_ip = {af = 2, 
len = 4, u = {addrl = {2588331018, 0}, addr32 = {2588331018, 0, 0, 0}, addr16 = 
{52234, 39494, 0, 0, 0, 0, 0, 0},
addr = "\n\314F\232", '\000' }}, src_port = 5060, 
dst_port = 5070, proto = 2, proto_reserved1 = 19, proto_reserved2 = 0, src_su = 
{s = {sa_family = 2,
sa_data = "\023\304\n\314F\234\000\000\000\000\000\000\000"}, sin = 
{sin_family = 2, sin_port = 50195, sin_addr = {s_addr = 2621885450}, sin_zero = 
"\000\000\000\000\000\000\000"}},
bind_address = 0x7f2093171398}, refcnt = 2, type = PROTO_TCP, flags = 2, 
state = S_CONN_CONNECT, extra_data = 0x0, timeout = 50039, lifetime = 0, 
id_hash = 19, id_next = 0x0, id_prev = 0x0, c_next = 0x0,
  c_prev = 0x0, con_aliases = {{parent = 0x7f2081a933c0, next = 0x0, prev = 
0x0, port = 5060, hash = 974}, {parent = 0x0, next = 0x0, prev = 0x0, port = 0, 
hash = 0}, {parent = 0x0, next = 0x0, prev = 0x0,
  port = 0, hash = 0}, {parent = 0x0, next = 0x0, prev = 0x0, port = 0, 
hash = 0}}, aliases = 1, con_req = 0x7f20931a97e0, msg_attempts = 1, 
async_chunks = 0x7f2081a93530, async_chunks_no = 0,
  oldest_chunk = 0}
(gdb)

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
Sent: Monday, August 31, 2015 4:39 PM
To: Gupta, Rahul; OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] core generated by opensips

And printing :
*con

Thanks,


Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

http://www.opensips-solutions.com
On 31.08.2015 22:50, Gupta, Rahul wrote:
Hi Bogdan, following is the info you requested. This is not the first tcp read, 
this server is been running for a while and taking calls.

(gdb) bt
#0  0x7f2095572e2c in vfprintf () from /lib64/libc.so.6
#1  0x7f209560fed0 in __vsyslog_chk () from /lib64/libc.so.6
#2  0x7f2095610100 in syslog () from /lib64/libc.so.6
#3  0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597
#4  0x004c5908 in handle_io (fm=, idx=-1, 
event_type=) at tcp_read.c:1033
#5  0x004c8083 in io_wait_loop_epoll (unix_sock=) 
at io_wait.h:845
#6  tcp_receive_loop (unix_sock=) at tcp_read.c:1141
#7  0x004b12e9 in tcp_init_children (chd_rank=, 
startup_done=0x0) at tcp_main.c:2389
#8  0x0043aebf in main_loop (argc=, argv=) at main.c:1011
#9  main (argc=, argv=) at main.c:1612
(gdb) f 3
#3  0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597
597 tcp_read.c: No such file or directory.
in tcp_read.c
(gdb) p con->con_req
$1 = (struct tcp_req *) 0x7f20931a97e0
(gdb) p _req
$2 = (struct tcp_req *) 0x82d720
(gdb) p req
$3 = (struct tcp_req *) 0x7f20931a97e0
(gdb)

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
Sent: Monday, August 31, 2015 3:45 PM
To: Gupta, Rahul; OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] core generated by opensips




--

DISCLAIMER: This e-mail may contain information that is confidential, 
privileged or otherwise protected from disclosure. If you are not an intended 
recipient of this e-mail, do not duplicate or redistribute it by any means. 
Please delete it and any attachments and notify the sender that you have 
received it in error. Unintended recipients are prohibited from taking action 
on the basis of information in this e-mail.E-mail messages may contain computer 
viruses or other defects, may not be accurately replicated on other systems, or 
may be intercepted, deleted or interfered 

Re: [OpenSIPS-Users] Register timeout question.

2015-08-31 Thread Bogdan-Andrei Iancu

Hi Rodrigo,

I meant 40 mins from the registration time (out for the overall 60). And 
yes, yous suspicion is correct.


As said, the "opensipsctl online" only shows the registered contacts, 
without actually checking their current status.


The patch I mentioned will be available in the next days in OpenSIPs 2.2 
devel.


Regards,

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

On 28.08.2015 20:09, Rodrigo Pimenta Carvalho wrote:


Hi Bogdan.


Thank you again.


Do you mean 40 or 30 mins? If the registration is for 60' and the 
network break down after 30', so I suspect that the registration will 
remain online only for more 30'.  Not 40'. Am I correct?



As I need to know as soon as possible, by means of the SIP Registrar, 
whether a device became offline, I  think that the command 
'opensipsctl online' will be really useful, if each device register 
for 10 seconds for example.



What do you think about this approach? Comment, please.


If the approach is unappropriated, I will take a look in that internal 
PR you have said.



Regards.


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



*De:* Bogdan-Andrei Iancu 
*Enviado:* sexta-feira, 28 de agosto de 2015 12:33
*Para:* Rodrigo Pimenta Carvalho; OpenSIPS users mailling list
*Assunto:* Re: [OpenSIPS-Users] Register timeout question.
Hi Rodrigo,

"opensipsctl online" simply shows the registration cache (who 
registered and for how long), but without actively checking if the 
registered device is still alive.


It simply shows the who's registered based on the received REGISTER 
requests. The list is realtime updated based on these REGISTERs.


But if a device registers for 60 minutes and it drops form network 
after 30 minutes, the device will still be shown as online after 40 
mins (up to 60 mins, when the registration will expire).


Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 28.08.2015 17:19, Rodrigo Pimenta Carvalho wrote:


Hi Bogdan.


Thank you for the reply.


What about the line command 'opensipsctl online'? This command shows 
me who is online, so it has some way to detect who is and who is 
not online in a moment.



How this command can figure out who is currently online? If some peer 
UAC become offline, does such command return an updated list 
immediately, or does it take some seconds to start returning an 
update list? If it take some seconds, does it depend on the 
periodicity of SIP Register messages from such UAC?



I need to know how long does it take to get an update online peers 
list, by means of the 'opensipsctl online' command, after someone 
becoming offline.



Best regards.


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



*De:* Bogdan-Andrei Iancu 
*Enviado:* sexta-feira, 28 de agosto de 2015 11:00
*Para:* OpenSIPS users mailling list; Rodrigo Pimenta Carvalho
*Assunto:* Re: [OpenSIPS-Users] Register timeout question.
Hi Rodrigo,

Currently there is no way for OpenSIPS to check the status of the 
active registrations. But we have an internal PR with such feature - 
doing SIP pinging to the registered contacts and if no answer, to 
auto unregister the contact. Most probably it will be uploaded on 2.2 
branch in the next week.


Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 28.08.2015 16:27, Rodrigo Pimenta Carvalho wrote:



Hi.


Let´s  suppose there are some peers online in my OpenSIPS.

For my project, whether a peer (UAC) become offline, my OpenSIPS 
must detect it in 10 seconds.


Is there a way to detect it by means of some kind of SIP Register 
timeout configuration? How to configure OpenSIPS for this objective?



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] NOTIFY and TLS issue

2015-08-31 Thread Damien Sandras
Hi Bogdan,
I'm not sure about that (see our previous discussions about connection
reuse).
It will only reuse the active SUBSCRIBE TCP connection if the Contact
header of the SUBSCRIBE indicates the same IP/port than the one used to
create the outbound SUBSCRIBE TCP connection. That is rarely the case.
Or am I missing something ?
Le lundi 31 août 2015 à 12:17 +0300, Bogdan-Andrei Iancu a écrit :
> Hi Bogdan,
> 
> If the conn with B is still alive (the one created by SUBSCRIBE
> requests), it should be reused when OpenSIPS has to send the NOTIFY.
> Have you enabled the tcp aliases ?
> 
> If still a problem, can you make a log (with debug 6) when the NOTIFY
> is to be send + a listing from list_tcp_conns ?
> 
> Regards,
>  Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
> On 28.08.2015 20:53, Bogdan Chifor wrote:
> > Hello,
> > 
> > I have a question regarding the following scenario:
> > 
> > 1. I have two devices connected to the server via two-way TLS(TCP).
> >  1.1 Device A is behind a NAT
> >  1.2 Device B is directly connected to the server
> > 
> > 2. Device B subscribes to the presence of device A.
> > 
> > 3. Device A gets offline and the server generates a NOTIFY message
> > to be sent to device B.
> > 
> > 4. The server does not find an existing tcp connection (from the
> > logs), even though the socket is visible if the "opensipsctl fifo
> > list_tcp_conns" or "netstat" commands are used.
> > 
> > 5. Because the server does not find an existing connection it
> > initiates one (TLS). After that the proto tls module logs the
> > following error: "NOTICE:proto_tls:verify_callback: verify
> > error:num=26:unsupported certificate purpose".
> > 
> > 6. This error is normal because device B does not have a
> > certificate with server authentication extended key usage, it has
> > only the client authentication extended key usage (as normal). 
> > 
> > What is the reason behind the start of the new connection and how
> > should I handle this issue?
> > 
> > This is my proto_tls config:
> > 
> > modparam("proto_tls", "verify_cert", "1")
> > modparam("proto_tls", "require_cert", "1")
> > modparam("proto_tls", "tls_method", "TLSv1")
> > modparam("proto_tls", "certificate", "...")
> > modparam("proto_tls", "private_key", "...")
> > modparam("proto_tls", "ca_list", "...")
> > modparam("proto_tls", "ca_dir", "...")
> > 
> > 
> > Any help is appreciated.
> > 
> > Best regards,
> > 
> > Bogdan.
> > 
> > 
> > ___
> > 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
-- 
Damien SANDRAS

Ekiga Project 
http://www.ekiga.org___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] OpenSIPS Control Panel 6.1

2015-08-31 Thread Alex Ionescu

Hi Bill,

Sorry for my late answer, I was on holiday. If you can attach a patch I 
can take a look over it and if it is good for the project I can submit 
the code.


Regards,
Alex

On 14.08.2015 10:32, Bill Shirley wrote:
Sorry Alex; I didn't mean to rile you.  Remember I DID say I was 
grateful for all
the work that has gone into free software development.  That includes 
OpenSIPS CP.


There are a few places where assumptions are made about the PHP 
configuration:
1) not all shops allow the shortcut code it 
http://php.net/manual/en/ini.core.php#ini.short-open-tag
2) not all shops run with "display_errors = Off"; there are a lot of 
uninitialized

variables

Set these in your php.ini and then run the CP:
short_open_tag = Off
display_errors = On

No, it's not hard for me to give a helping hand.  I have been editing 
the code extensively

and would like to share my changes.  Any suggestions on how to do this?

Bill

On 8/10/2015 1:35 AM, Alex Ionescu wrote:

Hi,

There are many using CP 6.1 with success. It may not be the best 
piece of software in the world but it does its job.


You say it's full of security holes and exposed to sql injection. I 
invite you to try making some sql injections and come back

here with the proof.

Also, there are lots of security holes everywhere. If you think 
you've spotted some big ones in CP please point them out so we
can fix them. That's the whole idea with open source software and the 
user community, right ?


It's easy to point fingers but hard to give a helping hand, right ?

Regards,
Alex Ionescu

On August 10, 2015 4:47:25 AM Bill Shirley 
 wrote:


Is anyone running the 6.1 CP?  It's full of bugs and security 
holes.  Whoever thought it wise to code:

extract($_POST);
Also, the input stored in the database is not sanitized plus a whole 
lot more errors.


https://xkcd.com/327/
We had a 'professional' company write a web portal for us that 
didn't sanitize their input.  I actually
did do a "'; DROP TABLE `customer`;" on the database.  I even 
emailed them before hand pointing out

the problem.

I don't want to sound harsh or ungrateful.  I run a lot of free 
software that enables me to earn a living.

I'm thankful for all the people that labored to produce the software.

I'm also guessing that CP 6.1 not meant to be run with the Fedora 22 
version of OpenSIPS:

[0:root@jabba lib]$ rpm -q php httpd opensips
php-5.5.20-2.fc19.x86_64
httpd-2.4.9-1.fc19.x86_64
opensips-1.10.1-1.fc19.x86_64

I'm trying to set up a SIP proxy to route calls from my network to 
Cisco CUCM on another network.

Any pointers are appreciated.

Bill

___
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] core generated by opensips

2015-08-31 Thread Bogdan-Andrei Iancu

Hi Rahul,

Could you do in gdb:

p *req

to see all the field of the request structure.

Thanks,

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

On 30.08.2015 23:31, Gupta, Rahul wrote:


Hi, I am using opensips-1.11.5-tls and the opensips crashed with the 
following gdb trace. Seems like it crashed while printing error 
message. Is this something already fixed


LM_ERR("bad request, state=%d, error=%d "

"buf:\n%.*s\nparsed:\n%.*s\n", req->state, req->error,

(int)(req->pos-req->buf), req->buf,

(int)(req->parsed-req->start), req->start);

(gdb) bt

#0 0x7f2095572e2c in vfprintf () from /lib64/libc.so.6

#1 0x7f209560fed0 in __vsyslog_chk () from /lib64/libc.so.6

#2 0x7f2095610100 in syslog () from /lib64/libc.so.6

#3 0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597


#4 0x004c5908 in handle_io (fm=, idx=-1, 
event_type=) at tcp_read.c:1033


#5 0x004c8083 in io_wait_loop_epoll (unix_sock=optimized out>) at io_wait.h:845


#6 tcp_receive_loop (unix_sock=) at tcp_read.c:1141

#7 0x004b12e9 in tcp_init_children (chd_rank=out>, startup_done=0x0) at tcp_main.c:2389


#8 0x0043aebf in main_loop (argc=, 
argv=) at main.c:1011


#9 main (argc=, argv=) at 
main.c:1612


(gdb) f 3

#3 0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597


597 tcp_read.c: No such file or directory.

in tcp_read.c

(gdb) info 3

Undefined info command: "3".  Try "help info".

(gdb) print buf

$1 = 0

(gdb) print req

$2 = (struct tcp_req *) 0x7f20931a97e0

(gdb) print req->state

$3 = 1696604720

(gdb) print req->error

$4 = 774971965

(gdb) print req->buf

$5 = "\022Ø\000\000\000\000\000M\000\000\000\000\000\000\000T", '\000' 
, "p\227\032\223 \177\000\000p\227\032\223 
\177\000\000H\000\000\000\000\000\000\000\250\203\032\223 
\177\000\000\300\227\032\223 
\177\000\000\001\000\000\000\000\000\000\000\264×\000\000\000\000\000\003\000\000\000\000\000\000\000\271×\000\000\000\000\000R\000\000\000\000\000\000\000Y", 
'\000' , "Ð\032\223 \177\000\000Ð\032\223 
\177\000\000\200", '\000' , "P\221\026\223 
\177\000\000Via: SIP/2.0/TCP 
10.204.70.154:5070;branch=z9hG4bK+540c4cc39bb7b8e44a"...


(gdb) print req->start

$6 = 0x6d782b6c6d736d2f 

(gdb) print req->parsed-req->start

$7 = -3676281973086354112

(gdb) print req->pos-req->buf

$8 = 5056690538022925700

(gdb) print (int)(req->pos-req->buf)

$9 = -1175489148

(gdb) print (int)(req->pos-req->buf)

$10 = -1175489148

(gdb) print (int)(req->parsed-req->start)

$11 = -201063104

(gdb)

--

DISCLAIMER: This e-mail may contain information that is confidential, 
privileged or otherwise protected from disclosure. If you are not an 
intended recipient of this e-mail, do not duplicate or redistribute it 
by any means. Please delete it and any attachments and notify the 
sender that you have received it in error. Unintended recipients are 
prohibited from taking action on the basis of information in this 
e-mail.E-mail messages may contain computer viruses or other defects, 
may not be accurately replicated on other systems, or may be 
intercepted, deleted or interfered with without the knowledge of the 
sender or the intended recipient. If you are not comfortable with the 
risks associated with e-mail messages, you may decide not to use 
e-mail to communicate with IPC. IPC reserves the right, to the extent 
and under circumstances permitted by applicable law, to retain, 
monitor and intercept e-mail messages to and from its systems.




___
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] TLS discrepancy between 1.7.1 and 1.11.5

2015-08-31 Thread Bogdan-Andrei Iancu

Hi Matt,

Can you post of pastebin (or similar) the SIP capture showing the 
incoming NOTIFY (via UDP) from Asterisk and the outgoing NOTIFY 
(supposedly via TLS) to UAC ?

Also the SUBSCRIBE request going from OpenSIPS to Asterisk will help alot.

Regards,

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

On 30.08.2015 18:22, Matt Hamilton wrote:




We use Opensips (with TLS) as a dispatcher to multiple Asterisk 
servers.  Currently we are in the process of upgrading from 1.7.1 to 
1.11.5, and we ran into a discrepancy between 1.7.1 and 1.11.5 
regarding SIP NOTIFY messages.



Here is the flow (both ways):

UAC(TLS) -> Opensips   (UDP)-> Asterisk
Asterisk  (UDP) -> Opensips   (TLS)->UAC


In 1.7.1,  all messages between Opensips and UAC were encrypted - 
didn't matter if it was originated at UAC or Asterisk.


In 1.11.5, the SIP NOTIFY messages coming from Asterisk are sent to 
UAC unencrypted (and not accepted by UAC). Here is the request that 
Opensips receives and sends to the UAC in plaintext:


Request-Line: NOTIFY sip:101@1.2.3.4:5075;transport=tls;nat=yes SIP/2.0

Anything we can do to have that leg encrypted as well?

Thanks,
Matt



___
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 check SIP trace of calls in TLS

2015-08-31 Thread Bogdan-Andrei Iancu
Or you can use siptrace module to capture the SIP messages at the 
OpenSIPS level.


Regards,

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

On 31.08.2015 08:32, Giovanni Maruzzelli wrote:


With ngrep you cant.

You must use sngrep or sipgrep2, with certificate and private key.

sent from my mobile,
Giovanni Maruzzelli
cell: +39 347 266 56 18

On Aug 31, 2015 3:50 AM, "Nabeel" > wrote:


Hi,

When I try to check SIP trace of calls in TLS (with ngrep), I only
see the encrypted messages which are are not intelligible.  Is
there any way to view the SIP traffic of calls in TLS?


___
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] NOTIFY and TLS issue

2015-08-31 Thread Bogdan-Andrei Iancu

Hi Bogdan,

If the conn with B is still alive (the one created by SUBSCRIBE 
requests), it should be reused when OpenSIPS has to send the NOTIFY. 
Have you enabled the tcp aliases ?


If still a problem, can you make a log (with debug 6) when the NOTIFY is 
to be send + a listing from list_tcp_conns ?


Regards,

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

On 28.08.2015 20:53, Bogdan Chifor wrote:

Hello,

I have a question regarding the following scenario:

1. I have two devices connected to the server via two-way TLS(TCP).
 1.1 Device A is behind a NAT
 1.2 Device B is directly connected to the server

2. Device B subscribes to the presence of device A.

3. Device A gets offline and the server generates a NOTIFY message to 
be sent to device B.


4. The server does not find an existing tcp connection (from the 
logs), even though the socket is visible if the "opensipsctl fifo 
list_tcp_conns" or "netstat" commands are used.


5. Because the server does not find an existing connection it 
initiates one (TLS). After that the proto tls module logs the 
following error: "NOTICE:proto_tls:verify_callback: verify 
error:num=26:unsupported certificate purpose".


6. This error is normal because device B does not have a certificate 
with server authentication extended key usage, it has only the client 
authentication extended key usage (as normal).


What is the reason behind the start of the new connection and how 
should I handle this issue?


This is my proto_tls config:

*modparam("proto_tls", "verify_cert", "1")*
*modparam("proto_tls", "require_cert", "1")*
*modparam("proto_tls", "tls_method", "TLSv1")*
*modparam("proto_tls", "certificate", "...")*
*modparam("proto_tls", "private_key", "...")*
*modparam("proto_tls", "ca_list", "...")*
*modparam("proto_tls", "ca_dir", "...")*


Any help is appreciated.

Best regards,

Bogdan.


___
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] core generated by opensips

2015-08-31 Thread Gupta, Rahul
Hi Bogdan, here are the details you requested

(gdb) bt
#0  0x7f2095572e2c in vfprintf () from /lib64/libc.so.6
#1  0x7f209560fed0 in __vsyslog_chk () from /lib64/libc.so.6
#2  0x7f2095610100 in syslog () from /lib64/libc.so.6
#3  0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597
#4  0x004c5908 in handle_io (fm=, idx=-1, 
event_type=) at tcp_read.c:1033
#5  0x004c8083 in io_wait_loop_epoll (unix_sock=) 
at io_wait.h:845
#6  tcp_receive_loop (unix_sock=) at tcp_read.c:1141
#7  0x004b12e9 in tcp_init_children (chd_rank=, 
startup_done=0x0) at tcp_main.c:2389
#8  0x0043aebf in main_loop (argc=, argv=) at main.c:1011
#9  main (argc=, argv=) at main.c:1612
(gdb) f 3
#3  0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597
597 tcp_read.c: No such file or directory.
in tcp_read.c
(gdb) p *req
$1 = {next = 0x3,
  buf = "\022Ø\000\000\000\000\000M\000\000\000\000\000\000\000T", '\000' 
, "p\227\032\223 \177\000\000p\227\032\223 
\177\000\000H\000\000\000\000\000\000\000\250\203\032\223 
\177\000\000\300\227\032\223 
\177\000\000\001\000\000\000\000\000\000\000\264×\000\000\000\000\000\003\000\000\000\000\000\000\000\271×\000\000\000\000\000R\000\000\000\000\000\000\000Y",
 '\000' , "Ð\032\223 \177\000\000Ð\032\223 \177\000\000\200", 
'\000' , "P\221\026\223 \177\000\000Via: SIP/2.0/TCP 
10.204.70.154:5070;branch=z9hG4bK+540c4cc39bb7b8e44a"...,
  start = 0x6d782b6c6d736d2f , pos = 
0x462d78614d0a0d6c ,
  parsed = 0x3a7364726177726f , body 
= 0x3c0a0d0a0d303720 , content_len = 
1819113535, has_content_len = 30240,
  complete = 29285, bytes_to_go = 1852795251, error = 774971965, state = 
1696604720}
(gdb)

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
Sent: Monday, August 31, 2015 5:25 AM
To: OpenSIPS users mailling list; Gupta, Rahul
Subject: Re: [OpenSIPS-Users] core generated by opensips

Hi Rahul,

Could you do in gdb:

p *req

to see all the field of the request structure.

Thanks,


Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

http://www.opensips-solutions.com
On 30.08.2015 23:31, Gupta, Rahul wrote:
Hi, I am using opensips-1.11.5-tls and the opensips crashed with the following 
gdb trace. Seems like it crashed while printing error message. Is this 
something already fixed

LM_ERR("bad request, state=%d, error=%d "
  "buf:\n%.*s\nparsed:\n%.*s\n", req->state, 
req->error,
  (int)(req->pos-req->buf), req->buf,
  (int)(req->parsed-req->start), req->start);

(gdb) bt
#0  0x7f2095572e2c in vfprintf () from /lib64/libc.so.6
#1  0x7f209560fed0 in __vsyslog_chk () from /lib64/libc.so.6
#2  0x7f2095610100 in syslog () from /lib64/libc.so.6
#3  0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597
#4  0x004c5908 in handle_io (fm=, idx=-1, 
event_type=) at tcp_read.c:1033
#5  0x004c8083 in io_wait_loop_epoll (unix_sock=) 
at io_wait.h:845
#6  tcp_receive_loop (unix_sock=) at tcp_read.c:1141
#7  0x004b12e9 in tcp_init_children (chd_rank=, 
startup_done=0x0) at tcp_main.c:2389
#8  0x0043aebf in main_loop (argc=, argv=) at main.c:1011
#9  main (argc=, argv=) at main.c:1612
(gdb) f 3
#3  0x004c4202 in tcp_read_req (con=0x7f2081a933c0, 
bytes_read=0x7ffc6bc97f0c) at tcp_read.c:597
597 tcp_read.c: No such file or directory.
in tcp_read.c
(gdb) info 3
Undefined info command: "3".  Try "help info".
(gdb) print buf
$1 = 0
(gdb) print req
$2 = (struct tcp_req *) 0x7f20931a97e0
(gdb) print req->state
$3 = 1696604720
(gdb) print req->error
$4 = 774971965
(gdb) print req->buf
$5 = "\022Ø\000\000\000\000\000M\000\000\000\000\000\000\000T", '\000' , "p\227\032\223 \177\000\000p\227\032\223 
\177\000\000H\000\000\000\000\000\000\000\250\203\032\223 
\177\000\000\300\227\032\223 
\177\000\000\001\000\000\000\000\000\000\000\264×\000\000\000\000\000\003\000\000\000\000\000\000\000\271×\000\000\000\000\000R\000\000\000\000\000\000\000Y",
 '\000' , "Ð\032\223 \177\000\000Ð\032\223 \177\000\000\200", 
'\000' , "P\221\026\223 \177\000\000Via: SIP/2.0/TCP 
10.204.70.154:5070;branch=z9hG4bK+540c4cc39bb7b8e44a"...
(gdb) print req->start
$6 = 0x6d782b6c6d736d2f 
(gdb) print req->parsed-req->start
$7 = -3676281973086354112
(gdb) print req->pos-req->buf
$8 = 5056690538022925700
(gdb) print (int)(req->pos-req->buf)
$9 = -1175489148
(gdb) print (int)(req->pos-req->buf)
$10 = -1175489148
(gdb) print (int)(req->parsed-req->start)
$11 = -201063104
(gdb)

--

DISCLAIMER: This e-mail may contain information that is confidential, 
privileged or otherwise protected from disclosure. If you are not