Re: [OpenSIPS-Users] uri table

2020-03-20 Thread volga629 via Users

  
  
Ok I figure out  
  

  
route[HANDLE_REGISTER] {
    # authenticate the REGISTER requests
    if(!www_authorize($rd, "subscriber")) {
    www_challenge($rd, "auth");
    exit;
    }

    if(!db_is_to_authorized("uri")) {
    send_reply(403,"Forbidden auth ID");
    exit;
    }

    if (!save("location"))
    sl_reply_error();
    exit;
}

  


On 3/20/20 3:19 PM, volga629 via Users
  wrote:


  
  Hello Everyone,
  
  Some documentation is mismatching in auth and_db modules, can
figure out what correct way 
  
  [root@dev1-msg scripts]# opensips -c -f
  /etc/opensips/opensips.cfg
  Mar 20 14:12:44 [25882] Traceback (last included file at the
  bottom):
  Mar 20 14:12:44 [25882]  0. /etc/opensips/opensips.cfg
  Mar 20 14:12:44 [25882] CRITICAL:core:yyerror: parse error in
  /etc/opensips/opensips.cfg:417:2-4: syntax error
  Mar 20 14:12:44 [25882]     }
  Mar 20 14:12:44 [25882] 
  Mar 20 14:12:44 [25882]     if(!db_is_to_authorized("uri")) {
  Mar 20 14:12:44 [25882]     ^~~
  Mar 20 14:12:44 [25882]         send_reply("403","Forbidden
  auth ID");
  Mar 20 14:12:44 [25882]         exit;
  Mar 20 14:12:44 [25882] CRITICAL:core:yyerror: parse error in
  /etc/opensips/opensips.cfg:417:2-4: 
  Mar 20 14:12:44 [25882] ERROR:core:parse_opensips_cfg: bad
  config file (2 errors)
  Mar 20 14:12:44 [25882] ERROR:core:main: failed to parse
  config file /etc/opensips/opensips.cfg
  

  route[HANDLE_REGISTER] {
      # authenticate the REGISTER requests
      if(!www_authorize("$rd", "subscriber")) 
          www_challenge("$rd", "auth");
          exit;
      }
  
      if(!db_is_to_authorized("uri")) {
          send_reply("403","Forbidden auth ID");
          exit;
      }
  
      if(!save("location"))
          sl_reply_error();
      exit;
  }
  

  

  

  volga629
  
  On 3/20/20 9:11 AM, volga629 via
Users wrote:
  
  

Hello Everyone,
I am trying migrate to 3.0 and I want
keep db_is_from_authorized("uri");, but can't understand
where need set use_uri_table


based on migration doc
function db_check_from() was replaced by the AUTH_DB
module with:

  if use_uri_table was
set, use db_is_from_authorized("uri")



volga629



___
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] uri table

2020-03-20 Thread volga629 via Users

  
  
Hello Everyone,

Some documentation is mismatching in auth and_db modules, can
  figure out what correct way 

[root@dev1-msg scripts]# opensips -c -f
/etc/opensips/opensips.cfg
Mar 20 14:12:44 [25882] Traceback (last included file at the
bottom):
Mar 20 14:12:44 [25882]  0. /etc/opensips/opensips.cfg
Mar 20 14:12:44 [25882] CRITICAL:core:yyerror: parse error in
/etc/opensips/opensips.cfg:417:2-4: syntax error
Mar 20 14:12:44 [25882]     }
Mar 20 14:12:44 [25882] 
Mar 20 14:12:44 [25882]     if(!db_is_to_authorized("uri")) {
Mar 20 14:12:44 [25882]     ^~~
Mar 20 14:12:44 [25882]         send_reply("403","Forbidden auth
ID");
Mar 20 14:12:44 [25882]         exit;
Mar 20 14:12:44 [25882] CRITICAL:core:yyerror: parse error in
/etc/opensips/opensips.cfg:417:2-4: 
Mar 20 14:12:44 [25882] ERROR:core:parse_opensips_cfg: bad
config file (2 errors)
Mar 20 14:12:44 [25882] ERROR:core:main: failed to parse config
file /etc/opensips/opensips.cfg

  
route[HANDLE_REGISTER] {
    # authenticate the REGISTER requests
    if(!www_authorize("$rd", "subscriber")) 
        www_challenge("$rd", "auth");
        exit;
    }

    if(!db_is_to_authorized("uri")) {
        send_reply("403","Forbidden auth ID");
        exit;
    }

    if(!save("location"))
        sl_reply_error();
    exit;
}

  

  

  
volga629

On 3/20/20 9:11 AM, volga629 via Users
  wrote:


  
  Hello Everyone,
  I am trying migrate to 3.0 and I want
  keep db_is_from_authorized("uri");, but can't understand where
  need set use_uri_table
  
  
  based on migration doc
  function db_check_from() was replaced by the
  AUTH_DB module with:
  
if use_uri_table was
  set, use db_is_from_authorized("uri")
  
  
  
  volga629
  
  
  
  ___
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] "opensipsctl fifo get_statistics 5xx_replies" - counter not incrementing

2020-03-20 Thread Ben Newlin
The 5xx_replies would be non-zero because you are sending stateless 503 
replies. Either using “sl_send_reply” or calling “send_reply” from the 
signaling module without creating a transaction first. This makes sense for 
sending negative OPTIONS replies; you don’t want to create a transaction for 
that you just reply quickly and statelessly and your count goes up.

The 5xx_transactions counter increments for any transaction that ends with a 
5xx response *to* OpenSIPS, you are correct about that part. But if you have a 
single transaction and OpenSIPS receives a 5xx response and then relays that 
response upstream, 5xx_replies will not be incremented. So it is not as simple 
as the from and to.

Similarly, if you were to forward a message downstream statelessly, without 
creating a transaction or using TM, and then received a 5xx response, 
5xx_transactions counter would not be incremented because there was no 
transaction. But 5xx _replies would be incremented when you relayed the 
response upstream, because it was done statelessly. Again, not quite as simple 
as received vs sent.

Ben Newlin

From: Users  on behalf of solarmon 

Reply-To: OpenSIPS users mailling list 
Date: Friday, March 20, 2020 at 1:08 PM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] "opensipsctl fifo get_statistics 5xx_replies" - 
counter not incrementing

Hi Ben,

OK, but why is there already a counter value for  5xx_replies - it is non zero.

Actually, what I have just done at the moment is to put my clusters in 'drain 
mode' - so all SIP Options pings to it will be responded with a 503. When in 
this mode, the  5xx_replies counters are going up.

Thus, I believe  5xx_replies is for 503 replies coming from opensips, and 
possibly 5xx_transactions is for 503 responses going to opensips.

Thank you.

On Fri, 20 Mar 2020 at 16:01, Ben Newlin 
mailto:ben.new...@genesys.com>> wrote:
Apologies for the confusion.

So that is expected if you are using the TM module and creating transactions 
for all of the 5xx responses, as far as I know.

Ben Newlin

From: Users 
mailto:users-boun...@lists.opensips.org>> on 
behalf of solarmon mailto:solar...@one-n.co.uk>>
Reply-To: OpenSIPS users mailling list 
mailto:users@lists.opensips.org>>
Date: Friday, March 20, 2020 at 10:49 AM
To: OpenSIPS users mailling list 
mailto:users@lists.opensips.org>>
Subject: Re: [OpenSIPS-Users] "opensipsctl fifo get_statistics 5xx_replies" - 
counter not incrementing

Hi Ben,

Thanks for your input.

It is the other way around - in my case, the transaction counters are 
incrementing, but not the replies counters.

Thank you.

On Fri, 20 Mar 2020 at 13:09, Ben Newlin 
mailto:ben.new...@genesys.com>> wrote:
I believe the XXX_replies statistics only count StateLess (SL module) messages. 
XXX_transactions count transaction handled by the TM module.

So if replies are incrementing but not transactions, it means you are not 
creating transactions for these messages.

Ben Newlin

From: Users 
mailto:users-boun...@lists.opensips.org>> on 
behalf of solarmon mailto:solar...@one-n.co.uk>>
Reply-To: OpenSIPS users mailling list 
mailto:users@lists.opensips.org>>
Date: Friday, March 20, 2020 at 7:37 AM
Cc: OpenSIPS users mailling list 
mailto:users@lists.opensips.org>>
Subject: Re: [OpenSIPS-Users] "opensipsctl fifo get_statistics 5xx_replies" - 
counter not incrementing

Hi,

I use opensips 2.4 and the command "opensipsctl fifo get_statistics 
5xx_replies" - as documented at:

https://www.opensips.org/Documentation/Interface-CoreMI-2-4#toc12

Thank you.

On Fri, 20 Mar 2020 at 11:22, Bogdan-Andrei Iancu 
mailto:bog...@opensips.org>> wrote:
https://opensips.org/html/docs/modules/3.0.x/tm.html#exported_statistics

Not sure where do you get these 5xx_replies stats - which module are they 
provided by ?

Regards,

Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com

OpenSIPS Summit, Amsterdam, May 2020

  
https://www.opensips.org/events/Summit-2020Amsterdam/


On 3/20/20 1:15 PM, solarmon wrote:
Hi,

I meant that the 5xx_transactions  counter value does not increment.

However, I have now found the stats counter "5xx_transactions". This does seem 
to increment appropriately.

So what is the difference between "5xx_replies" and "5xx_transactions"?

Thank you.

On Fri, 20 Mar 2020 at 10:55, Bogdan-Andrei Iancu 
mailto:bog...@opensips.org>> wrote:
Hi,

Do you do understand by "stuck" ? no reply to the "get_statistics" cmd? or the 
value of the statistic does not change ?

Both 4xx and 5xx stats count all transactions completed with such replies.

Regards,

Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com

OpenSIPS Summit, 

Re: [OpenSIPS-Users] db_mysql_convert_rows says no rows but there is one

2020-03-20 Thread Calvin Ellison
We developed a small patch to check if there is a second result set
when the first result set has zero rows. It's pretty specific and
probably shouldn't be merged, but might help someone else if they are
stuck in a similar situation.

modules/db_mysql/dbase.c | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/modules/db_mysql/dbase.c b/modules/db_mysql/dbase.c
index cb2abcff3..e487c2ed1 100644
--- a/modules/db_mysql/dbase.c
+++ b/modules/db_mysql/dbase.c
@@ -863,8 +863,17 @@ static int db_mysql_store_result(const db_con_t*
_h, db_res_t** _r)
return -2;
}

-   if (!CON_HAS_PS(_h))
-   CON_RESULT(_h) = mysql_store_result(CON_CONNECTION(_h));
+if (!CON_HAS_PS(_h)) {
+CON_RESULT(_h) = mysql_store_result(CON_CONNECTION(_h));
+int currentRes = mysql_num_rows(CON_RESULT(_h));
+if(currentRes == 0) {
+int next = mysql_next_result(CON_CONNECTION(_h));
+if(next == 0) {
+CON_RESULT(_h) =
mysql_store_result(CON_CONNECTION(_h));
+}
+}
+}
+
if (!CON_RESULT(_h)) {
if (mysql_errno(CON_CONNECTION(_h)) > 0) {
LM_ERR("driver error: %s\n",
mysql_error(CON_CONNECTION(_h)));
--


Regards,

Calvin Ellison
Senior Voice Operations Engineer
calvin.elli...@voxox.com

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


Re: [OpenSIPS-Users] "opensipsctl fifo get_statistics 5xx_replies" - counter not incrementing

2020-03-20 Thread solarmon
Hi Ben,

OK, but why is there already a counter value for  5xx_replies - it is non
zero.

Actually, what I have just done at the moment is to put my clusters in
'drain mode' - so all SIP Options pings to it will be responded with a 503.
When in this mode, the  5xx_replies counters are going up.

Thus, I believe  5xx_replies is for 503 replies coming *from *opensips, and
possibly 5xx_transactions is for 503 responses going *to* opensips.

Thank you.

On Fri, 20 Mar 2020 at 16:01, Ben Newlin  wrote:

> Apologies for the confusion.
>
>
>
> So that is expected if you are using the TM module and creating
> transactions for all of the 5xx responses, as far as I know.
>
>
>
> Ben Newlin
>
>
>
> *From: *Users  on behalf of solarmon <
> solar...@one-n.co.uk>
> *Reply-To: *OpenSIPS users mailling list 
> *Date: *Friday, March 20, 2020 at 10:49 AM
> *To: *OpenSIPS users mailling list 
> *Subject: *Re: [OpenSIPS-Users] "opensipsctl fifo get_statistics
> 5xx_replies" - counter not incrementing
>
>
>
> Hi Ben,
>
>
>
> Thanks for your input.
>
>
>
> It is the other way around - in my case, the transaction counters are
> incrementing, but not the replies counters.
>
>
>
> Thank you.
>
>
>
> On Fri, 20 Mar 2020 at 13:09, Ben Newlin  wrote:
>
> I believe the XXX_replies statistics only count StateLess (SL module)
> messages. XXX_transactions count transaction handled by the TM module.
>
>
>
> So if replies are incrementing but not transactions, it means you are not
> creating transactions for these messages.
>
>
>
> Ben Newlin
>
>
>
> *From: *Users  on behalf of solarmon <
> solar...@one-n.co.uk>
> *Reply-To: *OpenSIPS users mailling list 
> *Date: *Friday, March 20, 2020 at 7:37 AM
> *Cc: *OpenSIPS users mailling list 
> *Subject: *Re: [OpenSIPS-Users] "opensipsctl fifo get_statistics
> 5xx_replies" - counter not incrementing
>
>
>
> Hi,
>
>
>
> I use opensips 2.4 and the command "opensipsctl fifo get_statistics
> 5xx_replies" - as documented at:
>
>
>
> https://www.opensips.org/Documentation/Interface-CoreMI-2-4#toc12
>
>
>
> Thank you.
>
>
>
> On Fri, 20 Mar 2020 at 11:22, Bogdan-Andrei Iancu 
> wrote:
>
> https://opensips.org/html/docs/modules/3.0.x/tm.html#exported_statistics
>
> Not sure where do you get these 5xx_replies stats - which module are they
> provided by ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
>
>
> OpenSIPS Founder and Developer
>
>   https://www.opensips-solutions.com
>
> OpenSIPS Summit, Amsterdam, May 2020
>
>   https://www.opensips.org/events/Summit-2020Amsterdam/
>
>
>
> On 3/20/20 1:15 PM, solarmon wrote:
>
> Hi,
>
>
>
> I meant that the 5xx_transactions  counter value does not increment.
>
>
>
> However, I have now found the stats counter "5xx_transactions". This does
> seem to increment appropriately.
>
>
>
> So what is the difference between "5xx_replies" and "5xx_transactions"?
>
>
>
> Thank you.
>
>
>
> On Fri, 20 Mar 2020 at 10:55, Bogdan-Andrei Iancu 
> wrote:
>
> Hi,
>
> Do you do understand by "stuck" ? no reply to the "get_statistics" cmd? or
> the value of the statistic does not change ?
>
> Both 4xx and 5xx stats count all transactions completed with such replies.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
>
>
> OpenSIPS Founder and Developer
>
>   https://www.opensips-solutions.com
>
> OpenSIPS Summit, Amsterdam, May 2020
>
>   https://www.opensips.org/events/Summit-2020Amsterdam/
>
>
>
> On 3/19/20 2:56 PM, solarmon wrote:
>
> Hi,
>
>
>
> I'm trying to graph the 4xx and 5xx stats on my opensips cluster. I'm
> making use of the "opensipsctl fifo get_statistics" command to extract the
> 4xx and 5xx replies counters.
>
>
>
> The 4xx counter (opensipsctl fifo get_statistics 4xx_replies) seems to
> incrementing as expected.
>
>
>
> However, the 5xx counter (opensipsctl fifo get_statistics 5xx_replies)
> seems to stuck. One cluster the value is zero and the other clusters have
> an arbitrary high value. I'm expecting this counter to increase as I am
> seeing 5xx replies going to our opensips clusters.
>
>
>
> Are these reply counters for outbound or inbound or both directions?
>
>
>
> Why would the counter be stuck even when I can see such 5xx replies
> (inbound) in the logs and in SIP traces (using sngrep).
>
>
>
> Thank you.
>
>
>
> ___
>
> Users mailing list
>
> Users@lists.opensips.org
>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
>
> ___
>
> Users mailing list
>
> Users@lists.opensips.org
>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ___
> 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

Re: [OpenSIPS-Users] "opensipsctl fifo get_statistics 5xx_replies" - counter not incrementing

2020-03-20 Thread Ben Newlin
Apologies for the confusion.

So that is expected if you are using the TM module and creating transactions 
for all of the 5xx responses, as far as I know.

Ben Newlin

From: Users  on behalf of solarmon 

Reply-To: OpenSIPS users mailling list 
Date: Friday, March 20, 2020 at 10:49 AM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] "opensipsctl fifo get_statistics 5xx_replies" - 
counter not incrementing

Hi Ben,

Thanks for your input.

It is the other way around - in my case, the transaction counters are 
incrementing, but not the replies counters.

Thank you.

On Fri, 20 Mar 2020 at 13:09, Ben Newlin 
mailto:ben.new...@genesys.com>> wrote:
I believe the XXX_replies statistics only count StateLess (SL module) messages. 
XXX_transactions count transaction handled by the TM module.

So if replies are incrementing but not transactions, it means you are not 
creating transactions for these messages.

Ben Newlin

From: Users 
mailto:users-boun...@lists.opensips.org>> on 
behalf of solarmon mailto:solar...@one-n.co.uk>>
Reply-To: OpenSIPS users mailling list 
mailto:users@lists.opensips.org>>
Date: Friday, March 20, 2020 at 7:37 AM
Cc: OpenSIPS users mailling list 
mailto:users@lists.opensips.org>>
Subject: Re: [OpenSIPS-Users] "opensipsctl fifo get_statistics 5xx_replies" - 
counter not incrementing

Hi,

I use opensips 2.4 and the command "opensipsctl fifo get_statistics 
5xx_replies" - as documented at:

https://www.opensips.org/Documentation/Interface-CoreMI-2-4#toc12

Thank you.

On Fri, 20 Mar 2020 at 11:22, Bogdan-Andrei Iancu 
mailto:bog...@opensips.org>> wrote:
https://opensips.org/html/docs/modules/3.0.x/tm.html#exported_statistics

Not sure where do you get these 5xx_replies stats - which module are they 
provided by ?

Regards,

Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com

OpenSIPS Summit, Amsterdam, May 2020

  
https://www.opensips.org/events/Summit-2020Amsterdam/


On 3/20/20 1:15 PM, solarmon wrote:
Hi,

I meant that the 5xx_transactions  counter value does not increment.

However, I have now found the stats counter "5xx_transactions". This does seem 
to increment appropriately.

So what is the difference between "5xx_replies" and "5xx_transactions"?

Thank you.

On Fri, 20 Mar 2020 at 10:55, Bogdan-Andrei Iancu 
mailto:bog...@opensips.org>> wrote:
Hi,

Do you do understand by "stuck" ? no reply to the "get_statistics" cmd? or the 
value of the statistic does not change ?

Both 4xx and 5xx stats count all transactions completed with such replies.

Regards,

Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com

OpenSIPS Summit, Amsterdam, May 2020

  
https://www.opensips.org/events/Summit-2020Amsterdam/


On 3/19/20 2:56 PM, solarmon wrote:
Hi,

I'm trying to graph the 4xx and 5xx stats on my opensips cluster. I'm making 
use of the "opensipsctl fifo get_statistics" command to extract the 4xx and 5xx 
replies counters.

The 4xx counter (opensipsctl fifo get_statistics 4xx_replies) seems to 
incrementing as expected.

However, the 5xx counter (opensipsctl fifo get_statistics 5xx_replies) seems to 
stuck. One cluster the value is zero and the other clusters have an arbitrary 
high value. I'm expecting this counter to increase as I am seeing 5xx replies 
going to our opensips clusters.

Are these reply counters for outbound or inbound or both directions?

Why would the counter be stuck even when I can see such 5xx replies (inbound) 
in the logs and in SIP traces (using sngrep).

Thank you.


___

Users mailing list

Users@lists.opensips.org

http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___

Users mailing list

Users@lists.opensips.org

http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
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] "opensipsctl fifo get_statistics 5xx_replies" - counter not incrementing

2020-03-20 Thread solarmon
Hi Ben,

Thanks for your input.

It is the other way around - in my case, the transaction counters are
incrementing, but not the replies counters.

Thank you.

On Fri, 20 Mar 2020 at 13:09, Ben Newlin  wrote:

> I believe the XXX_replies statistics only count StateLess (SL module)
> messages. XXX_transactions count transaction handled by the TM module.
>
>
>
> So if replies are incrementing but not transactions, it means you are not
> creating transactions for these messages.
>
>
>
> Ben Newlin
>
>
>
> *From: *Users  on behalf of solarmon <
> solar...@one-n.co.uk>
> *Reply-To: *OpenSIPS users mailling list 
> *Date: *Friday, March 20, 2020 at 7:37 AM
> *Cc: *OpenSIPS users mailling list 
> *Subject: *Re: [OpenSIPS-Users] "opensipsctl fifo get_statistics
> 5xx_replies" - counter not incrementing
>
>
>
> Hi,
>
>
>
> I use opensips 2.4 and the command "opensipsctl fifo get_statistics
> 5xx_replies" - as documented at:
>
>
>
> https://www.opensips.org/Documentation/Interface-CoreMI-2-4#toc12
>
>
>
> Thank you.
>
>
>
> On Fri, 20 Mar 2020 at 11:22, Bogdan-Andrei Iancu 
> wrote:
>
> https://opensips.org/html/docs/modules/3.0.x/tm.html#exported_statistics
>
> Not sure where do you get these 5xx_replies stats - which module are they
> provided by ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
>
>
> OpenSIPS Founder and Developer
>
>   https://www.opensips-solutions.com
>
> OpenSIPS Summit, Amsterdam, May 2020
>
>   https://www.opensips.org/events/Summit-2020Amsterdam/
>
>
>
> On 3/20/20 1:15 PM, solarmon wrote:
>
> Hi,
>
>
>
> I meant that the 5xx_transactions  counter value does not increment.
>
>
>
> However, I have now found the stats counter "5xx_transactions". This does
> seem to increment appropriately.
>
>
>
> So what is the difference between "5xx_replies" and "5xx_transactions"?
>
>
>
> Thank you.
>
>
>
> On Fri, 20 Mar 2020 at 10:55, Bogdan-Andrei Iancu 
> wrote:
>
> Hi,
>
> Do you do understand by "stuck" ? no reply to the "get_statistics" cmd? or
> the value of the statistic does not change ?
>
> Both 4xx and 5xx stats count all transactions completed with such replies.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
>
>
> OpenSIPS Founder and Developer
>
>   https://www.opensips-solutions.com
>
> OpenSIPS Summit, Amsterdam, May 2020
>
>   https://www.opensips.org/events/Summit-2020Amsterdam/
>
>
>
> On 3/19/20 2:56 PM, solarmon wrote:
>
> Hi,
>
>
>
> I'm trying to graph the 4xx and 5xx stats on my opensips cluster. I'm
> making use of the "opensipsctl fifo get_statistics" command to extract the
> 4xx and 5xx replies counters.
>
>
>
> The 4xx counter (opensipsctl fifo get_statistics 4xx_replies) seems to
> incrementing as expected.
>
>
>
> However, the 5xx counter (opensipsctl fifo get_statistics 5xx_replies)
> seems to stuck. One cluster the value is zero and the other clusters have
> an arbitrary high value. I'm expecting this counter to increase as I am
> seeing 5xx replies going to our opensips clusters.
>
>
>
> Are these reply counters for outbound or inbound or both directions?
>
>
>
> Why would the counter be stuck even when I can see such 5xx replies
> (inbound) in the logs and in SIP traces (using sngrep).
>
>
>
> Thank you.
>
>
>
> ___
>
> Users mailing list
>
> Users@lists.opensips.org
>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
>
> ___
>
> Users mailing list
>
> Users@lists.opensips.org
>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ___
> 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] "opensipsctl fifo get_statistics 5xx_replies" - counter not incrementing

2020-03-20 Thread Ben Newlin
I believe the XXX_replies statistics only count StateLess (SL module) messages. 
XXX_transactions count transaction handled by the TM module.

So if replies are incrementing but not transactions, it means you are not 
creating transactions for these messages.

Ben Newlin

From: Users  on behalf of solarmon 

Reply-To: OpenSIPS users mailling list 
Date: Friday, March 20, 2020 at 7:37 AM
Cc: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] "opensipsctl fifo get_statistics 5xx_replies" - 
counter not incrementing

Hi,

I use opensips 2.4 and the command "opensipsctl fifo get_statistics 
5xx_replies" - as documented at:

https://www.opensips.org/Documentation/Interface-CoreMI-2-4#toc12

Thank you.

On Fri, 20 Mar 2020 at 11:22, Bogdan-Andrei Iancu 
mailto:bog...@opensips.org>> wrote:
https://opensips.org/html/docs/modules/3.0.x/tm.html#exported_statistics

Not sure where do you get these 5xx_replies stats - which module are they 
provided by ?

Regards,


Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com

OpenSIPS Summit, Amsterdam, May 2020

  
https://www.opensips.org/events/Summit-2020Amsterdam/


On 3/20/20 1:15 PM, solarmon wrote:
Hi,

I meant that the 5xx_transactions  counter value does not increment.

However, I have now found the stats counter "5xx_transactions". This does seem 
to increment appropriately.

So what is the difference between "5xx_replies" and "5xx_transactions"?

Thank you.

On Fri, 20 Mar 2020 at 10:55, Bogdan-Andrei Iancu 
mailto:bog...@opensips.org>> wrote:
Hi,

Do you do understand by "stuck" ? no reply to the "get_statistics" cmd? or the 
value of the statistic does not change ?

Both 4xx and 5xx stats count all transactions completed with such replies.

Regards,


Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com

OpenSIPS Summit, Amsterdam, May 2020

  
https://www.opensips.org/events/Summit-2020Amsterdam/


On 3/19/20 2:56 PM, solarmon wrote:
Hi,

I'm trying to graph the 4xx and 5xx stats on my opensips cluster. I'm making 
use of the "opensipsctl fifo get_statistics" command to extract the 4xx and 5xx 
replies counters.

The 4xx counter (opensipsctl fifo get_statistics 4xx_replies) seems to 
incrementing as expected.

However, the 5xx counter (opensipsctl fifo get_statistics 5xx_replies) seems to 
stuck. One cluster the value is zero and the other clusters have an arbitrary 
high value. I'm expecting this counter to increase as I am seeing 5xx replies 
going to our opensips clusters.

Are these reply counters for outbound or inbound or both directions?

Why would the counter be stuck even when I can see such 5xx replies (inbound) 
in the logs and in SIP traces (using sngrep).

Thank you.



___

Users mailing list

Users@lists.opensips.org

http://lists.opensips.org/cgi-bin/mailman/listinfo/users




___

Users mailing list

Users@lists.opensips.org

http://lists.opensips.org/cgi-bin/mailman/listinfo/users

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


Re: [OpenSIPS-Users] Registrar load branch flags

2020-03-20 Thread Ben Newlin
You could try saving the request uri prior to calling lookup() and then restore 
it after. There’s also the $ou variable which provides the original request uri 
for the message prior to any modifications.

Ben Newlin

From: Users  on behalf of Bogdan-Andrei Iancu 

Reply-To: OpenSIPS users mailling list 
Date: Friday, March 20, 2020 at 7:13 AM
To: OpenSIPS users mailling list , Grant Bagdasarian 

Subject: Re: [OpenSIPS-Users] Registrar load branch flags

Hi Grant,

The branch flags seems to be exposed only via the lookup() function.

Regards,


Bogdan-Andrei Iancu



OpenSIPS Founder and Developer

  https://www.opensips-solutions.com

OpenSIPS Summit, Amsterdam, May 2020

  
https://www.opensips.org/events/Summit-2020Amsterdam/


On 3/16/20 11:38 PM, Grant Bagdasarian wrote:
Hello,

I’m looking for a way to load the branch flags (set before calling save()) for 
a registered contact, without rewriting the request uri. Basically, test if the 
requested contact is registered, if so load its branch flags, but not rewrite 
the request uri. The lookup function provides the “B” flag, but this didn’t 
load the branch flags. I’ve also tried the other is_* functions exposed by the 
registrar module, but these also didn’t load the branch flags.

Are there ways to accomplish this using already exposed functions in opensips 
or should I get creative and for instance use the sql_cacher to load the branch 
flags myself?

Thanks and kind regards,

Grant



___

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] help on failover routing

2020-03-20 Thread johan

as for point 3, I will check.


On 20/03/2020 11:43, Liviu Chircu wrote:

On 20.03.2020 12:37, johan wrote:


Hence,

- when the softphone is registered, a call comes on that DID in udp 
(we do lookup_location) and we send it to the user in tls (this works)


- when the softphone is off for a long time, there is no record in 
location so then I route the call via the provider to his real mobile 
number (this works also)


- the problem is when the mobile looses his dataconnection, then I do 
have a record in location, I try to send the call, which will fail.   
Upon failure, I drop the record in subscriber. And here the problem 
begins.


The invite is adapted at this point already for tls => provider 
doesn't want it as he is udp.



So how can I have the original request back for routing to the real 
mobile number ? Or how can I check if the user is still connected 
(aka how can I send options to see if he's alive) before calling 
t_relay. 


Hi, Johan!

1.  this solution of calling remove() after a routing failure is 
nice.  Alexey Vasilyev put together a feature request [1] related to 
this problem, where he asks for an automated mechanism of deleting a 
contact whenever its TLS connection is found to be dead.


2.  Did you try to force the sending socket of the INVITE ($fs 
variable) to your "udp:1.2.3.4:5060" listener?  I think this should 
work inside a failure_route and should properly route to your provider 
via UDP.  Also, I believe Bogdan fixed this recently [2] (but master 
branch only?!), such that "$fs" is not set to the TLS listener inside 
failure_route - might wanna check.


3.  As a long-term solution to this problem, we are working on adding 
RFC 8599 Push Notification support via SIP in OpenSIPS 3.1.  The spec 
is still rather new, but I'm curious if your app's SIP stack supports 
it :)  Basically, this will allow you to wake up the phone so it 
re-registers whenever you need to deliver an INVITE to it, in a 
standards-approved way.


Best regards,

[1]: https://github.com/OpenSIPS/opensips/issues/1769

[2]: https://github.com/OpenSIPS/opensips/commit/f73abff9

[3]: https://tools.ietf.org/html/rfc8599



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


[OpenSIPS-Users] uri table

2020-03-20 Thread volga629 via Users

  
  
Hello Everyone,
I am trying migrate to 3.0 and I want keep
db_is_from_authorized("uri");, but can't understand where need
set use_uri_table


based on migration doc
function db_check_from() was
replaced by the AUTH_DB module with:

  if use_uri_table was
set, use db_is_from_authorized("uri")



volga629

  


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


Re: [OpenSIPS-Users] "opensipsctl fifo get_statistics 5xx_replies" - counter not incrementing

2020-03-20 Thread solarmon
Hi,

I use opensips 2.4 and the command "opensipsctl fifo get_statistics
5xx_replies" - as documented at:

https://www.opensips.org/Documentation/Interface-CoreMI-2-4#toc12

Thank you.

On Fri, 20 Mar 2020 at 11:22, Bogdan-Andrei Iancu 
wrote:

> https://opensips.org/html/docs/modules/3.0.x/tm.html#exported_statistics
>
> Not sure where do you get these 5xx_replies stats - which module are they
> provided by ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit, Amsterdam, May 2020
>   https://www.opensips.org/events/Summit-2020Amsterdam/
>
> On 3/20/20 1:15 PM, solarmon wrote:
>
> Hi,
>
> I meant that the 5xx_transactions  counter value does not increment.
>
> However, I have now found the stats counter "5xx_transactions". This does
> seem to increment appropriately.
>
> So what is the difference between "5xx_replies" and "5xx_transactions"?
>
> Thank you.
>
> On Fri, 20 Mar 2020 at 10:55, Bogdan-Andrei Iancu 
> wrote:
>
>> Hi,
>>
>> Do you do understand by "stuck" ? no reply to the "get_statistics" cmd?
>> or the value of the statistic does not change ?
>>
>> Both 4xx and 5xx stats count all transactions completed with such replies.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>> OpenSIPS Summit, Amsterdam, May 2020
>>   https://www.opensips.org/events/Summit-2020Amsterdam/
>>
>> On 3/19/20 2:56 PM, solarmon wrote:
>>
>> Hi,
>>
>> I'm trying to graph the 4xx and 5xx stats on my opensips cluster. I'm
>> making use of the "opensipsctl fifo get_statistics" command to extract the
>> 4xx and 5xx replies counters.
>>
>> The 4xx counter (opensipsctl fifo get_statistics 4xx_replies) seems to
>> incrementing as expected.
>>
>> However, the 5xx counter (opensipsctl fifo get_statistics 5xx_replies)
>> seems to stuck. One cluster the value is zero and the other clusters have
>> an arbitrary high value. I'm expecting this counter to increase as I am
>> seeing 5xx replies going to our opensips clusters.
>>
>> Are these reply counters for outbound or inbound or both directions?
>>
>> Why would the counter be stuck even when I can see such 5xx replies
>> (inbound) in the logs and in SIP traces (using sngrep).
>>
>> Thank you.
>>
>> ___
>> Users mailing 
>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] "opensipsctl fifo get_statistics 5xx_replies" - counter not incrementing

2020-03-20 Thread Bogdan-Andrei Iancu

https://opensips.org/html/docs/modules/3.0.x/tm.html#exported_statistics

Not sure where do you get these 5xx_replies stats - which module are 
they provided by ?


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit, Amsterdam, May 2020
  https://www.opensips.org/events/Summit-2020Amsterdam/

On 3/20/20 1:15 PM, solarmon wrote:

Hi,

I meant that the 5xx_transactions  counter value does not increment.

However, I have now found the stats counter "5xx_transactions". This 
does seem to increment appropriately.


So what is the difference between "5xx_replies" and "5xx_transactions"?

Thank you.

On Fri, 20 Mar 2020 at 10:55, Bogdan-Andrei Iancu > wrote:


Hi,

Do you do understand by "stuck" ? no reply to the "get_statistics"
cmd? or the value of the statistic does not change ?

Both 4xx and 5xx stats count all transactions completed with such
replies.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
OpenSIPS Summit, Amsterdam, May 2020
   https://www.opensips.org/events/Summit-2020Amsterdam/

On 3/19/20 2:56 PM, solarmon wrote:

Hi,

I'm trying to graph the 4xx and 5xx stats on my opensips cluster.
I'm making use of the "opensipsctl fifo get_statistics" command
to extract the 4xx and 5xx replies counters.

The 4xx counter (opensipsctl fifo get_statistics 4xx_replies)
seems to incrementing as expected.

However, the 5xx counter (opensipsctl fifo get_statistics
5xx_replies) seems to stuck. One cluster the value is zero and
the other clusters have an arbitrary high value. I'm expecting
this counter to increase as I am seeing 5xx replies going to our
opensips clusters.

Are these reply counters for outbound or inbound or both directions?

Why would the counter be stuck even when I can see such 5xx
replies (inbound) in the logs and in SIP traces (using sngrep).

Thank you.

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



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


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


Re: [OpenSIPS-Users] "opensipsctl fifo get_statistics 5xx_replies" - counter not incrementing

2020-03-20 Thread solarmon
Hi,

I meant that the 5xx_transactions  counter value does not increment.

However, I have now found the stats counter "5xx_transactions". This does
seem to increment appropriately.

So what is the difference between "5xx_replies" and "5xx_transactions"?

Thank you.

On Fri, 20 Mar 2020 at 10:55, Bogdan-Andrei Iancu 
wrote:

> Hi,
>
> Do you do understand by "stuck" ? no reply to the "get_statistics" cmd? or
> the value of the statistic does not change ?
>
> Both 4xx and 5xx stats count all transactions completed with such replies.
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit, Amsterdam, May 2020
>   https://www.opensips.org/events/Summit-2020Amsterdam/
>
> On 3/19/20 2:56 PM, solarmon wrote:
>
> Hi,
>
> I'm trying to graph the 4xx and 5xx stats on my opensips cluster. I'm
> making use of the "opensipsctl fifo get_statistics" command to extract the
> 4xx and 5xx replies counters.
>
> The 4xx counter (opensipsctl fifo get_statistics 4xx_replies) seems to
> incrementing as expected.
>
> However, the 5xx counter (opensipsctl fifo get_statistics 5xx_replies)
> seems to stuck. One cluster the value is zero and the other clusters have
> an arbitrary high value. I'm expecting this counter to increase as I am
> seeing 5xx replies going to our opensips clusters.
>
> Are these reply counters for outbound or inbound or both directions?
>
> Why would the counter be stuck even when I can see such 5xx replies
> (inbound) in the logs and in SIP traces (using sngrep).
>
> Thank you.
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registrar load branch flags

2020-03-20 Thread Bogdan-Andrei Iancu

Hi Grant,

The branch flags seems to be exposed only via the lookup() function.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit, Amsterdam, May 2020
  https://www.opensips.org/events/Summit-2020Amsterdam/

On 3/16/20 11:38 PM, Grant Bagdasarian wrote:

Hello,

I’m looking for a way to load the branch flags (set before calling 
save()) for a registered contact, without rewriting the request uri. 
Basically, test if the requested contact is registered, if so load its 
branch flags, but not rewrite the request uri. The lookup function 
provides the “B” flag, but this didn’t load the branch flags. I’ve 
also tried the other is_* functions exposed by the registrar module, 
but these also didn’t load the branch flags.


Are there ways to accomplish this using already exposed functions in 
opensips or should I get creative and for instance use the sql_cacher 
to load the branch flags myself?


Thanks and kind regards,

Grant

___
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 delete a line from pvar

2020-03-20 Thread Bogdan-Andrei Iancu

Hi,

Have you tried the the regexp based transformation?
    https://opensips.org/Documentation/Script-Tran-3-0#toc86

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit, Amsterdam, May 2020
  https://www.opensips.org/events/Summit-2020Amsterdam/

On 3/17/20 7:25 PM, Mark Farmer wrote:

Hi everyone

I am saving the SDP into a pvar using the sdp_pvar parameter in 
rtpengine_offer().


How do I now delete a line from the pvar before pushing the SDP into 
the message?


The line in question is:
a=setup:actpass

Many thanks!
Mark.


___
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] replace_body()

2020-03-20 Thread Bogdan-Andrei Iancu

Hi Mark,

You mentioned calling rtpengine before? if so, note that you cannot have 
more than one change over the same part of the body. And rtpengine is 
replacing the whole body, so you cannot change a prev change.
What you have to do is to tell rtpengine_offer() to provide the new body 
into a variable (rather then changing the msg), so you can change the 
value of the variable and push it into the msg afterwards.


PS: why do you do record_route_set() + record_route() in the same time ???

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit, Amsterdam, May 2020
  https://www.opensips.org/events/Summit-2020Amsterdam/

On 3/19/20 1:21 PM, Mark Farmer wrote:

Hi everyone

I am trying to remove a line from the SDP resulting from 
rtpengine_offer() but it's not working for me. Can anyone tell me what 
I am doing wrong please?


if (is_from_gw("2")) {
                remove_hf("Contact","g");
                insert_hf("Contact: 
\r\n");
                xlog("CUSTOM_LOG: Call to Microsoft - Adjusting SIP 
Headers & SDP");

set_advertised_address("$var(fqdn)");
record_route_preset("my.fqdn:5061;transport=tls", "XXX.XXX.XXX.XXX:5060");
                add_rr_param(";r2=on");
                record_route();
                if (replace_body("a=setup:actpass","")) {
                        xlog("CUSTOM_LOG: Removed a=setup:actpass line 
from SDP");

                }
}

I have also tried:

if (replace_body("a=setup:actpass\r",""))
and
if (replace_body("a=setup:actpass\r\n",""))

Many thanks
Mark.


___
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] help on failover routing

2020-03-20 Thread David Villasmil
I’ve never done it, but I understand there’s a route every time a TLS
socket is disconnected. You can probably use that to remove the contact.

On Fri, 20 Mar 2020 at 10:43, Liviu Chircu  wrote:

> On 20.03.2020 12:37, johan wrote:
> >
> > Hence,
> >
> > - when the softphone is registered, a call comes on that DID in udp
> > (we do lookup_location) and we send it to the user in tls (this works)
> >
> > - when the softphone is off for a long time, there is no record in
> > location so then I route the call via the provider to his real mobile
> > number (this works also)
> >
> > - the problem is when the mobile looses his dataconnection, then I do
> > have a record in location, I try to send the call, which will fail.
> > Upon failure, I drop the record in subscriber. And here the problem
> > begins.
> >
> > The invite is adapted at this point already for tls => provider
> > doesn't want it as he is udp.
> >
> >
> > So how can I have the original request back for routing to the real
> > mobile number ? Or how can I check if the user is still connected (aka
> > how can I send options to see if he's alive) before calling t_relay.
>
> Hi, Johan!
>
> 1.  this solution of calling remove() after a routing failure is nice.
> Alexey Vasilyev put together a feature request [1] related to this
> problem, where he asks for an automated mechanism of deleting a contact
> whenever its TLS connection is found to be dead.
>
> 2.  Did you try to force the sending socket of the INVITE ($fs variable)
> to your "udp:1.2.3.4:5060" listener?  I think this should work inside a
> failure_route and should properly route to your provider via UDP.  Also,
> I believe Bogdan fixed this recently [2] (but master branch only?!),
> such that "$fs" is not set to the TLS listener inside failure_route -
> might wanna check.
>
> 3.  As a long-term solution to this problem, we are working on adding
> RFC 8599 Push Notification support via SIP in OpenSIPS 3.1.  The spec is
> still rather new, but I'm curious if your app's SIP stack supports it
> :)  Basically, this will allow you to wake up the phone so it
> re-registers whenever you need to deliver an INVITE to it, in a
> standards-approved way.
>
> Best regards,
>
> [1]: https://github.com/OpenSIPS/opensips/issues/1769
>
> [2]: https://github.com/OpenSIPS/opensips/commit/f73abff9
>
> [3]: https://tools.ietf.org/html/rfc8599
>
> --
> Liviu Chircu
> www.twitter.com/liviuchircu | www.opensips-solutions.com
>
> OpenSIPS Summit, Amsterdam, May 2020
>www.opensips.org/events
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-- 
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] "opensipsctl fifo get_statistics 5xx_replies" - counter not incrementing

2020-03-20 Thread Bogdan-Andrei Iancu

Hi,

Do you do understand by "stuck" ? no reply to the "get_statistics" cmd? 
or the value of the statistic does not change ?


Both 4xx and 5xx stats count all transactions completed with such replies.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit, Amsterdam, May 2020
  https://www.opensips.org/events/Summit-2020Amsterdam/

On 3/19/20 2:56 PM, solarmon wrote:

Hi,

I'm trying to graph the 4xx and 5xx stats on my opensips cluster. I'm 
making use of the "opensipsctl fifo get_statistics" command to extract 
the 4xx and 5xx replies counters.


The 4xx counter (opensipsctl fifo get_statistics 4xx_replies) seems to 
incrementing as expected.


However, the 5xx counter (opensipsctl fifo get_statistics 5xx_replies) 
seems to stuck. One cluster the value is zero and the other clusters 
have an arbitrary high value. I'm expecting this counter to increase 
as I am seeing 5xx replies going to our opensips clusters.


Are these reply counters for outbound or inbound or both directions?

Why would the counter be stuck even when I can see such 5xx replies 
(inbound) in the logs and in SIP traces (using sngrep).


Thank you.

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


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


Re: [OpenSIPS-Users] help on failover routing

2020-03-20 Thread Liviu Chircu

On 20.03.2020 12:37, johan wrote:


Hence,

- when the softphone is registered, a call comes on that DID in udp 
(we do lookup_location) and we send it to the user in tls (this works)


- when the softphone is off for a long time, there is no record in 
location so then I route the call via the provider to his real mobile 
number (this works also)


- the problem is when the mobile looses his dataconnection, then I do 
have a record in location, I try to send the call, which will fail.   
Upon failure, I drop the record in subscriber. And here the problem 
begins.


The invite is adapted at this point already for tls => provider 
doesn't want it as he is udp.



So how can I have the original request back for routing to the real 
mobile number ? Or how can I check if the user is still connected (aka 
how can I send options to see if he's alive) before calling t_relay. 


Hi, Johan!

1.  this solution of calling remove() after a routing failure is nice.  
Alexey Vasilyev put together a feature request [1] related to this 
problem, where he asks for an automated mechanism of deleting a contact 
whenever its TLS connection is found to be dead.


2.  Did you try to force the sending socket of the INVITE ($fs variable) 
to your "udp:1.2.3.4:5060" listener?  I think this should work inside a 
failure_route and should properly route to your provider via UDP.  Also, 
I believe Bogdan fixed this recently [2] (but master branch only?!), 
such that "$fs" is not set to the TLS listener inside failure_route - 
might wanna check.


3.  As a long-term solution to this problem, we are working on adding 
RFC 8599 Push Notification support via SIP in OpenSIPS 3.1.  The spec is 
still rather new, but I'm curious if your app's SIP stack supports it 
:)  Basically, this will allow you to wake up the phone so it 
re-registers whenever you need to deliver an INVITE to it, in a 
standards-approved way.


Best regards,

[1]: https://github.com/OpenSIPS/opensips/issues/1769

[2]: https://github.com/OpenSIPS/opensips/commit/f73abff9

[3]: https://tools.ietf.org/html/rfc8599

--
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com

OpenSIPS Summit, Amsterdam, May 2020
  www.opensips.org/events


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


[OpenSIPS-Users] help on failover routing

2020-03-20 Thread johan
my systen will be used for aid in this corona crisis (remote diagnosis 
by doctors).


We use a softphone on a mobile phone, this softphone has a DID assigned 
to itself.


The mobile phone has a real mobile number also.

The idea is when a call comes in from the provider on the DID assigned 
to that user, we call the softphone via data connection. If that doesn't 
work, the user should be contacted on his real outbound number



so:

provider receives call on DID that belongs to the user -> provider sends 
call to our system -> we dial the softphone of the user who has that 
DID-> if that call fails or cannot be made, we send the call back to the 
provider as an INVITE to his real mobile number.



Hence,

- when the softphone is registered, a call comes on that DID in udp (we 
do lookup_location) and we send it to the user in tls (this works)


- when the softphone is off for a long time, there is no record in 
location so then I route the call via the provider to his real mobile 
number (this works also)


- the problem is when the mobile looses his dataconnection, then I do 
have a record in location, I try to send the call, which will fail.   
Upon failure, I drop the record in subscriber. And here the problem begins.


The invite is adapted at this point already for tls => provider doesn't 
want it as he is udp.



So how can I have the original request back for routing to the real 
mobile number ? Or how can I check if the user is still connected (aka 
how can I send options to see if he's alive) before calling t_relay.



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