Re: [OpenSIPS-Users] Opensips drouting probing

2017-03-23 Thread Bogdan-Andrei Iancu

Hi,

You should do :
if (!do_routing(...) ) {
send_reply("404","No Route");
exit;
}

Regards,

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

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html

On 03/23/2017 04:21 PM, Denis wrote:

Hello, Bogdan!
"test the return code for do_routing()".
How can i do that?
I tried
if (!do_routing("$avp(5)","W",,"$avp(300)","$avp(3)",)) {
  xlog ("Route4: Reason = $rc");
}
but can see in log only "INFO:drouting:do_routing: All the gateways 
are disabled".

Thank you.
--
С уважением, Денис.
Best regards, Denis
20.03.2017, 17:20, "Bogdan-Andrei Iancu" :
Failure route does not help you if your routing does not start at all 
- if do_routing() returns negative. Again, in request route, test the 
return code for do_routing() - it will return a negative code if no 
destination is available for routing.


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

OpenSIPS Summit May 2017 Amsterdam
   http://www.opensips.org/events/Summit-2017Amsterdam.html
On 03/20/2017 02:28 PM, Denis wrote:

Hello, Bogdan!
Yes, i know about that.
In failure_route i have
if (($DLG_status == 1) && t_check_status("408"))
action. And it works if i have multiple direction (using alternative 
mode) for the prefix.
But when i use only one direction for the prefix i have the problem 
described below.

Thank you.
--
С уважением, Денис.
Best regards, Denis
20.03.2017, 15:24, "Bogdan-Andrei Iancu"  
:

Hi Denis,

I suspect a scripting error on your side. If all the destinations 
are disabled, the do_routing() returns a negative code into the 
script - you need to handle this case and send back whatever 
negative reply you want. The Drouting modules does not do any SIP 
signalling for you.


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

OpenSIPS Summit May 2017 Amsterdam
   http://www.opensips.org/events/Summit-2017Amsterdam.html
On 03/17/2017 07:50 AM, Denis via Users wrote:

Hello!
According to drouting module documentation i am trying to 
introduce a probing feature to control destination SIP UA access.

Almost everything works correct, besides one thing.
If i have only one destination, which became inaccessible, 
Opensips "freezes" a call, i.e. it sends 100 trying (script 
logging) and after does not sent any code (i expected, that 
Opensips will sent 408 code in such situation after fr_timeout 
triggering).
Inaccessible destination has "probing" status and i see OPTIONS 
sent by Opensis to destination.

Server:: OpenSIPS (2.2.3 (x86_64/linux))
Thank you for any help.
--
С уважением, Денис.
Best regards, Denis
___
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 do you get list of dialog ids that are active for load balancer id?

2017-03-23 Thread Mundkowsky, Robert
Thanks for the response, but I think dlg_list  does not contain any information 
to know which load balancer gateway the dialog is using?

Basically trying to do this:

1)  Disable one of the gateways a load balancer is using

2)  Then wait a reasonable amount of time for all active calls over that 
gateway to finish

3)  Then if some calls are still active for that gateway, end them and make 
sure both sides get SIP BYE

Robert Mundkowsky

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
Sent: Wednesday, March 22, 2017 4:47 PM
To: OpenSIPS users mailling list ; Mundkowsky, Robert 

Subject: Re: [OpenSIPS-Users] How do you get list of dialog ids that are active 
for load balancer id?

Hi Robert,

The dlg_end_dlg MI function ( 
http://www.opensips.org/html/docs/modules/2.2.x/dialog.html#dlg_end_dlg ) can 
be triggered via any of the MI backends.

Also, instead of looking in the "dialog" table (which has older information), 
better use the "dlg_list" MI function to get the realtime list of ongoing calls.

Regards,


Bogdan-Andrei Iancu

  OpenSIPS Founder and Developer

  http://www.opensips-solutions.com



OpenSIPS Summit May 2017 Amsterdam

  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 03/08/2017 10:28 PM, Mundkowsky, Robert wrote:
Argh, but there is no way to call dlg_end_dlg since it is not an MI function?

Robert Mundkowsky

From: Mundkowsky, Robert
Sent: Wednesday, March 8, 2017 3:22 PM
To: 'OpenSIPS users mailling list' 

Subject: RE: How do you get list of dialog ids that are active for load 
balancer id?

Think I figured it out. Info is in Dialog table in database in to_uri column

Robert Mundkowsky

From: Mundkowsky, Robert
Sent: Wednesday, March 8, 2017 2:24 PM
To: 'OpenSIPS users mailling list' 
>
Subject: RE: How do you get list of dialog ids that are active for load 
balancer id?

Forgot to mention I am trying to do this from Python script using XMLRPC to 
OpenSIPS server.

Robert Mundkowsky

From: Mundkowsky, Robert
Sent: Wednesday, March 8, 2017 1:24 PM
To: OpenSIPS users mailling list 
>
Subject: How do you get list of dialog ids that are active for load balancer id?

How do you get list of dialog ids that are active for load balancer id?


For example, if I want to end a call on a specific load balancer gateway, I 
want to invoke “dlg_end_dlg(dlg_id).  But I don’t see any information that can 
help me get mapping between dlg_id  and Load Balancer gateway id.


Robert Mundkowsky



This e-mail and any files transmitted with it may contain privileged or 
confidential information. It is solely for use by the individual for whom it is 
intended, even if addressed incorrectly. If you received this e-mail in error, 
please notify the sender; do not disclose, copy, distribute, or take any action 
in reliance on the contents of this information; and delete it from your 
system. Any other use of this e-mail is prohibited.


Thank you for your compliance.






___

Users mailing list

Users@lists.opensips.org

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




This e-mail and any files transmitted with it may contain privileged or 
confidential information. It is solely for use by the individual for whom it is 
intended, even if addressed incorrectly. If you received this e-mail in error, 
please notify the sender; do not disclose, copy, distribute, or take any action 
in reliance on the contents of this information; and delete it from your 
system. Any other use of this e-mail is prohibited.


Thank you for your compliance.


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


Re: [OpenSIPS-Users] Opensips drouting probing

2017-03-23 Thread Denis via Users
Hello, Bogdan! "test the return code for do_routing()".How can i do that? I triedif (!do_routing("$avp(5)","W",,"$avp(300)","$avp(3)",)) {
 xlog ("Route4: Reason = $rc");
}but can see in log only "INFO:drouting:do_routing: All the gateways are disabled". Thank you. -- С уважением, Денис.Best regards, Denis   20.03.2017, 17:20, "Bogdan-Andrei Iancu" :Failure route does not help you if your routing does not start at all - if do_routing() returns negative. Again, in request route, test the return code for do_routing() - it will return a negative code if no destination is available for routing.Regards,Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 03/20/2017 02:28 PM, Denis wrote:Hello, Bogdan! Yes, i know about that.In failure_route i haveif (($DLG_status == 1) && t_check_status("408"))action. And it works if i have multiple direction (using alternative mode) for the prefix.But when i use only one direction for the prefix i have the problem described below. Thank you. -- С уважением, Денис.Best regards, Denis   20.03.2017, 15:24, "Bogdan-Andrei Iancu" :Hi Denis,I suspect a scripting error on your side. If all the destinations are disabled, the do_routing() returns a negative code into the script - you need to handle this case and send back whatever negative reply you want. The Drouting modules does not do any SIP signalling for you.Best regards,Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
  http://www.opensips.org/events/Summit-2017Amsterdam.html
On 03/17/2017 07:50 AM, Denis via Users wrote:Hello! According to drouting module documentation i am trying to introduce a probing feature to control destination SIP UA access.Almost everything works correct, besides one thing.If i have only one destination, which became inaccessible, Opensips "freezes" a call, i.e. it sends 100 trying (script logging) and after does not sent any code (i expected, that Opensips will sent 408 code in such situation after fr_timeout triggering).Inaccessible destination has "probing" status and i see OPTIONS sent by Opensis to destination. Server:: OpenSIPS (2.2.3 (x86_64/linux)) Thank you for any help. -- С уважением, Денис.Best regards, Denis___
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] Possible Drouting bug

2017-03-23 Thread John Nash
I am using drouting and recently tried to use gateway attribute. I call ...

do_routing("$avp(int_grp_id)","WF","$avp(gw_whitelist)" ,
"$avp(rules_attributes)","$avp(gw_attributes)"))

After this call I can see $avp(gw_attributes) is populated frp, attr column
of dr_gateways table.

but when i call following ...
use_next_gw(,"$avp(rules_attributes)","$avp(gw_attributes)")

$avp(gw_attributes) becomes empty


If i call next_routing() instead of use_next_gw then $avp(gw_attributes)
retains old value but does not populate new value
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users