[OpenSIPS-Users] del_uri_param failure

2018-02-21 Thread Ben Newlin
Hi,

I am very glad to have the new del_uri_param function. This was a common 
problem of mine and it is great not to have to use regex to do this. However, 
while implementing this I have run into some strange behavior by the function 
when the URI param being deleted does not exist.

In my case I am using the dialog module and attempting to remove a URI param 
just after the dialog creation. When the function does not find the URI param, 
it causes the dialog to immediately be destroyed and all message processing 
stops, including exiting the script.

Feb 21 22:47:42 [371] DBG:uri:del_uri_param: requested key not found in RURI
Feb 21 22:47:42 [371] DBG:dialog:next_state_dlg: unref dlg 0x7f460780a8c8 with 
1 -> 2 in entry 0x7f46077fbfa8
Feb 21 22:47:42 [371] DBG:core:evi_param_set: adding string param
Feb 21 22:47:42 [371] DBG:core:evi_param_set: adding string param
Feb 21 22:47:42 [371] DBG:core:evi_param_set: adding int param
Feb 21 22:47:42 [371] DBG:core:evi_param_set: adding int param
Feb 21 22:47:42 [371] DBG:core:destroy_avp_list: destroying list (nil)
Feb 21 22:47:42 [371] DBG:dialog:next_state_dlg: dialog 0x7f460780a8c8 changed 
from state 1 to state 5, due event 1
Feb 21 22:47:42 [371] DBG:dialog:dlg_onreply: dialog 0x7f460780a8c8 failed 
(negative reply)
Feb 21 22:47:42 [371] DBG:dialog:unref_dlg: unref dlg 0x7f460780a8c8 with 1 -> 
1 in entry 0x7f46077fbfa8
Feb 21 22:47:42 [371] DBG:dialog:unref_dlg: unref dlg 0x7f460780a8c8 with 1 -> 
0 in entry 0x7f46077fbfa8
Feb 21 22:47:42 [371] DBG:dialog:unref_dlg: ref <=0 for dialog 0x7f460780a8c8
Feb 21 22:47:42 [371] DBG:dialog:destroy_dlg: destroying dialog 0x7f460780a8c8
Feb 21 22:47:42 [371] DBG:dialog:destroy_dlg: dlg expired or not in list - dlg 
0x7f460780a8c8 [3710:1818203549] with clid '2-185@127.0.0.1' and tags 
'185SIPpTag002' 'NULL'
Feb 21 22:47:42 [371] DBG:core:destroy_avp_list: destroying list 0x7f460780c048
Feb 21 22:47:42 [371] DBG:core:receive_msg: cleaning up

The logs indicate that a DLG_EVENT_TDEL is being raised which, when the dialog 
is still in UNCONFIRMED state, causes the dialog to be destroyed. It’s not 
clear to me how or why the del_uri_param function could be doing this, 
especially as a transaction hasn’t even been created for the message yet in 
this case. I’m not sure what effect this would have if the dialog is in other 
states or at other times during the call.

It took me a while to realize it was the del_uri_param function causing this, 
as it seems so strange. But I have verified that when I remove the function, or 
when I verify the URI param exists before calling the function, everything is 
fine. That workaround works perfectly well, but it seemed such strange and 
catastrophic error behavior to drop the entire message that I wanted to report 
it anyway to see if anything needed to be addressed.

Call traces can be found here: https://pastebin.com/9FnmJCD9

You will see the same INVITE is offered multiple times as OpenSIPS is not 
responding after dropping the previous requests and dialog.

Thanks,
Ben Newlin

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


[OpenSIPS-Users] OpenSIPS crashing on 200 OK

2018-02-21 Thread Ben Newlin
Hi,

I am currently upgrading to 2.3.3 and am running off the HEAD of the 2.3 
branch. My OpenSIPS is consistently crashing when trying to process the ACK to 
an initial INVITE request. I am testing with SIPp using a simple single call 
scenario. I see the following in the logs:

Feb 21 21:32:27 [383] DBG:core:io_wait_loop_epoll: [TCP_main] EPOLLHUP on IN 
->connection closed by the remote peer!
Feb 21 21:32:27 [383] CRITICAL:core:receive_fd: EOF on 33
Feb 21 21:32:27 [383] DBG:core:handle_worker: dead child 9, pid 370 (shutting 
down?)
Feb 21 21:32:27 [383] DBG:core:io_watch_del: [TCP_main] io_watch_del op on 
index 8 33 (0x8d4e80, 33, 8, 0x0,0x1) fd_no=29 called
Feb 21 21:32:27 [361] DBG:core:handle_sigs: status = 139
Feb 21 21:32:27 [361] INFO:core:handle_sigs: child process 370 exited by a 
signal 11
Feb 21 21:32:27 [361] INFO:core:handle_sigs: core was generated
Feb 21 21:32:27 [361] INFO:core:handle_sigs: terminating due to SIGCHLD

I also notice that OpenSIPS is starting up a number of TCP processes even 
though I do not use TCP in my script. I do not even have the proto_tcp module 
loaded. I used to use the “disable_tcp” global parameter in 1.11, but that has 
been removed in 2.3.

Feb 21 22:03:56 [361] DBG:core:internal_fork: forking new process "SIP receiver 
TCP"
Feb 21 22:03:56 [361] DBG:core:internal_fork: forking new process "SIP receiver 
TCP"
Feb 21 22:03:56 [361] DBG:core:internal_fork: forking new process "SIP receiver 
TCP"
Feb 21 22:03:56 [361] DBG:core:internal_fork: forking new process "SIP receiver 
TCP"
Feb 21 22:03:56 [361] DBG:core:internal_fork: forking new process "SIP receiver 
TCP"
Feb 21 22:03:56 [375] DBG:core:io_watch_add: [TCP_worker] io_watch_add op (3 on 
53) (0x8d4e80, 3, 1, (nil),1), fd_no=0/209715
Feb 21 22:03:56 [361] DBG:core:internal_fork: forking new process "SIP receiver 
TCP"
Feb 21 22:03:56 [361] DBG:core:internal_fork: forking new process "SIP receiver 
TCP"
Feb 21 22:03:56 [361] DBG:core:internal_fork: forking new process "SIP receiver 
TCP"

Initialization logs: https://pastebin.com/nsJQGkdy
Call logs: https://pastebin.com/vY5crK8U

I also have the core dump if any more information is needed from that.

Thanks,
Ben Newlin

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


Re: [OpenSIPS-Users] Avpops and db_virtual modules

2018-02-21 Thread Ben Newlin
Bogdan,

I have tested with this fix and I was able to start up with these modules 
properly. I am getting another error now, but I will report that in a new 
thread so as not to confuse unrelated issues.

Thanks,
Ben Newlin

From: Bogdan-Andrei Iancu 
Date: Wednesday, February 21, 2018 at 9:53 AM
To: Ben Newlin , OpenSIPS users mailling list 

Subject: Re: [OpenSIPS-Users] Avpops and db_virtual modules

Hi Ben,

OK, I reviewed the changes and the code and I identified the problem in the way 
db_virtual is computing the capabilities in ROUND ROBIN mode - more or less it 
was discarding the UPDATE DB capabilities, which was required by avpops.

I pushed a fix for this, this is for 2.3:

https://github.com/OpenSIPS/opensips/commit/edded2f1431cfaaf75ed2af0c5ff9ec28548e7c5

Please update and give it a try !

Thanks and Regards,


Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  http://www.opensips-solutions.com

OpenSIPS Summit 2018

  
http://www.opensips.org/events/Summit-2018Amsterdam
On 02/19/2018 04:20 PM, Ben Newlin wrote:
Bogdan,

Thank you for looking into this. I have confirmed that it works in 2.3.2, which 
was released in 8/17 before the commit you provided.

So is there really an issue with the db_virtual capabilities that was masked by 
this bug, or is db_virtual simply not publishing the correct capabilities 
itself?

Thanks,
Ben Newlin

From: Bogdan-Andrei Iancu 
Date: Monday, February 19, 2018 at 6:11 AM
To: Ben Newlin , 
OpenSIPS users mailling list 

Subject: Re: [OpenSIPS-Users] Avpops and db_virtual modules

Hi Ben,

Could you check if a 2.3 version prior this commit:

https://github.com/OpenSIPS/opensips/commit/f25fbf631b6fb6eafea192f95f9a43566d68cc46#diff-91bbef43b346f11cbef768a1b01c74e0
will still have the 1.11 behavior ?





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


Re: [OpenSIPS-Users] Per phone number statistics

2018-02-21 Thread xaled
Hello Ben,

 

thank you for the advice. I will take a look at the module. 

Never actually used it bevor.

 

Thanks,

Xaled

 

From: Users [mailto:users-boun...@lists.opensips.org] On Behalf Of Ben Newlin
Sent: Wednesday, February 21, 2018 5:34 PM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] Per phone number statistics

 

I would recommend using Dialog profiling.

 

http://www.opensips.org/html/docs/modules/2.3.x/dialog.html#idp158208

 

Ben Newlin

 

From: Users  > on behalf of xaled  >
Reply-To: OpenSIPS users mailling list  >
Date: Wednesday, February 21, 2018 at 11:13 AM
To: 'OpenSIPS users mailling list'  >
Subject: [OpenSIPS-Users] Per phone number statistics

 

Hello,

 

What is a good way of collecting and accessing per phone number (A or B side) 
statistics? For example current number of simultaneous calls to a particular 
phone number.

The best I could come up is to use radius accounting and then do SQL queries on 
the accounting data. 

SNMP stats don’t seem to allow per number statistic collection.

 

Thanks,

Xaled

 

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


Re: [OpenSIPS-Users] history-Info header manipulation

2018-02-21 Thread Bogdan-Andrei Iancu

Hi Xaled,

Indeed - please open a feature request on the OpenSIPS tracker 
(https://github.com/OpenSIPS/opensips/issues) so we can have this on the 
table for future work.


Thanks & Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Summit 2018
  http://www.opensips.org/events/Summit-2018Amsterdam

On 02/21/2018 06:11 PM, xaled wrote:


Hi Bogdan,

ok, thank you for the info.

It would be great to have a generic method of accessing such multipart 
headers.


Greetings,

Xaled

*From:*Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
*Sent:* Wednesday, February 21, 2018 3:57 PM
*To:* xaled ; 'OpenSIPS users mailling list' 


*Subject:* Re: [OpenSIPS-Users] history-Info header manipulation

Hi Xaled,

There were recently some fixes in regards to such headers - multi body 
name-addr like. Internally the parser is able to handle it (the fixes 
I mentioned were related to PAI/PPI hdr parsing).
Still, from script level there is no way (yet) to get access to each 
body part, via variables or transformations :(


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Summit 2018
   http://www.opensips.org/events/Summit-2018Amsterdam

On 02/20/2018 02:51 PM, xaled wrote:

Hi Bogdan,

Mostly yes - single HI Header with multiple hi-entries.

A general solution/advice that would work with both single and
multiple HI headers would be much appreciated.

Thanks,

Xaled

*From:*Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
*Sent:* Tuesday, February 20, 2018 1:15 PM
*To:* OpenSIPS users mailling list 
; xaled 

*Subject:* Re: [OpenSIPS-Users] history-Info header manipulation

Hi Xaled,

You mean if a single History header contains multiple hi-entry
instances ?

Regards,


Bogdan-Andrei Iancu

  


OpenSIPS Founder and Developer

   http://www.opensips-solutions.com

OpenSIPS Summit 2018

   http://www.opensips.org/events/Summit-2018Amsterdam

On 02/19/2018 02:39 PM, xaled wrote:

Hi,

Is there any other/better way for the history-Info header
manipulation like adding or removing a hi-entry except subst?

Thanks,

xaled





___

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] Per phone number statistics

2018-02-21 Thread Ben Newlin
I would recommend using Dialog profiling.

http://www.opensips.org/html/docs/modules/2.3.x/dialog.html#idp158208

Ben Newlin

From: Users  on behalf of xaled 
Reply-To: OpenSIPS users mailling list 
Date: Wednesday, February 21, 2018 at 11:13 AM
To: 'OpenSIPS users mailling list' 
Subject: [OpenSIPS-Users] Per phone number statistics

Hello,

What is a good way of collecting and accessing per phone number (A or B side) 
statistics? For example current number of simultaneous calls to a particular 
phone number.
The best I could come up is to use radius accounting and then do SQL queries on 
the accounting data.
SNMP stats don’t seem to allow per number statistic collection.

Thanks,
Xaled

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


[OpenSIPS-Users] Per phone number statistics

2018-02-21 Thread xaled
Hello,

 

What is a good way of collecting and accessing per phone number (A or B
side) statistics? For example current number of simultaneous calls to a
particular phone number.

The best I could come up is to use radius accounting and then do SQL queries
on the accounting data. 

SNMP stats don't seem to allow per number statistic collection.

 

Thanks,

Xaled

 

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


Re: [OpenSIPS-Users] history-Info header manipulation

2018-02-21 Thread xaled
Hi Bogdan,

 

ok, thank you for the info. 

It would be great to have a generic method of accessing such multipart
headers.

 

Greetings,

Xaled

 

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] 
Sent: Wednesday, February 21, 2018 3:57 PM
To: xaled ; 'OpenSIPS users mailling list'

Subject: Re: [OpenSIPS-Users] history-Info header manipulation

 

Hi Xaled,

There were recently some fixes in regards to such headers - multi body
name-addr like. Internally the parser is able to handle it (the fixes I
mentioned were related to PAI/PPI hdr parsing).
Still, from script level there is no way (yet) to get access to each body
part, via variables or transformations :(

Regards,



Bogdan-Andrei Iancu
 
OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Summit 2018
  http://www.opensips.org/events/Summit-2018Amsterdam

On 02/20/2018 02:51 PM, xaled wrote:

Hi Bogdan,

 

Mostly yes - single HI Header with multiple hi-entries. 

A general solution/advice that would work with both single and multiple HI
headers would be much appreciated. 

 

Thanks,

Xaled

 

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] 
Sent: Tuesday, February 20, 2018 1:15 PM
To: OpenSIPS users mailling list  
; xaled   
Subject: Re: [OpenSIPS-Users] history-Info header manipulation

 

Hi Xaled,

You mean if a single History header contains multiple hi-entry instances ?

Regards,




Bogdan-Andrei Iancu
 
OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Summit 2018
  http://www.opensips.org/events/Summit-2018Amsterdam

On 02/19/2018 02:39 PM, xaled wrote:

Hi,

 

Is there any other/better way for the history-Info header manipulation like
adding or removing a hi-entry except subst? 

 

Thanks,

xaled







___
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] history-Info header manipulation

2018-02-21 Thread Bogdan-Andrei Iancu

Hi Xaled,

There were recently some fixes in regards to such headers - multi body 
name-addr like. Internally the parser is able to handle it (the fixes I 
mentioned were related to PAI/PPI hdr parsing).
Still, from script level there is no way (yet) to get access to each 
body part, via variables or transformations:(


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Summit 2018
  http://www.opensips.org/events/Summit-2018Amsterdam

On 02/20/2018 02:51 PM, xaled wrote:


Hi Bogdan,

Mostly yes - single HI Header with multiple hi-entries.

A general solution/advice that would work with both single and 
multiple HI headers would be much appreciated.


Thanks,

Xaled

*From:*Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
*Sent:* Tuesday, February 20, 2018 1:15 PM
*To:* OpenSIPS users mailling list ; xaled 


*Subject:* Re: [OpenSIPS-Users] history-Info header manipulation

Hi Xaled,

You mean if a single History header contains multiple hi-entry instances ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Summit 2018
   http://www.opensips.org/events/Summit-2018Amsterdam

On 02/19/2018 02:39 PM, xaled wrote:

Hi,

Is there any other/better way for the history-Info header
manipulation like adding or removing a hi-entry except subst?

Thanks,

xaled




___

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] Avpops and db_virtual modules

2018-02-21 Thread Bogdan-Andrei Iancu

Hi Ben,

OK, I reviewed the changes and the code and I identified the problem in 
the way db_virtual is computing the capabilities in ROUND ROBIN mode - 
more or less it was discarding the UPDATE DB capabilities, which was 
required by avpops.


I pushed a fix for this, this is for 2.3:
https://github.com/OpenSIPS/opensips/commit/edded2f1431cfaaf75ed2af0c5ff9ec28548e7c5

Please update and give it a try !

Thanks and Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Summit 2018
  http://www.opensips.org/events/Summit-2018Amsterdam

On 02/19/2018 04:20 PM, Ben Newlin wrote:


Bogdan,

Thank you for looking into this. I have confirmed that it works in 
2.3.2, which was released in 8/17 before the commit you provided.


So is there really an issue with the db_virtual capabilities that was 
masked by this bug, or is db_virtual simply not publishing the correct 
capabilities itself?


Thanks,

Ben Newlin

*From: *Bogdan-Andrei Iancu 
*Date: *Monday, February 19, 2018 at 6:11 AM
*To: *Ben Newlin , OpenSIPS users mailling 
list 

*Subject: *Re: [OpenSIPS-Users] Avpops and db_virtual modules

Hi Ben,

Could you check if a 2.3 version prior this commit:
https://github.com/OpenSIPS/opensips/commit/f25fbf631b6fb6eafea192f95f9a43566d68cc46#diff-91bbef43b346f11cbef768a1b01c74e0
will still have the 1.11 behavior ?




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