Re: [OpenSIPS-Users] Ratelimit usage

2023-10-27 Thread Adrien LACOMME
I tried with SBT and it is way better, gonna stay with this one for CPS.

I did my tests by trying RED and TAILDROP algorithm, wasn't probably the good 
one to try for cps and with my type of traffic.

Thanks for your response and your time

Adrien


De : Users  de la part de Ben Newlin 

Envoyé : vendredi 27 octobre 2023 18:13
À : OpenSIPS users mailling list 
Objet : Re: [OpenSIPS-Users] Ratelimit usage


Have you read the description of the RED algorithm? Are you sure you are 
generating appropriate traffic to cause a drop? That algorithm seems like it 
would be difficult to control/predict the drops accurately for a test. If you 
are sending a constant traffic volume to it, it never will drop.



If you are just testing, you may want to go with a simpler algorithm where you 
can more easily control when/how many are being dropped.



The standard way to use the module for CPS is to use the SBT algorithm with a 
window_size of 1. [1]



[1] https://opensips.org/docs/modules/3.2.x/ratelimit.html#param_window_size



Ben Newlin



From: Users  on behalf of Adrien LACOMME 

Date: Friday, October 27, 2023 at 12:03 PM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] Ratelimit usage

 EXTERNAL EMAIL - Please use caution with links and attachments





Hello,



I added this line to my code, in fact it's better to decrease the counter if I 
drop the call.

But my problem is that the rl_check function never drop calls, I do not enter 
in the IF condition.



For the algorithm, I'm actually just trying the module, I will probably not 
stay with RED.





De : Users  de la part de Wadii ELMAJDI | 
Evenmedia 
Envoyé : vendredi 27 octobre 2023 17:39
À : OpenSIPS users mailling list 
Objet : Re: [OpenSIPS-Users] Ratelimit usage



Hello Adrien

Try :

if (!rl_check("test1", 1, "RED"))

{

   rl_dec_count("test1")

   send_reply(487, "Request Terminated: CPS limit exceeded");

   exit;

}

* If you are using ratelimit to limit only successful traffic, you need to 
explicitely decrease the counter for the declined calls using the 
rl_dec_count() function
also I’m not sure RED is the best algorithm for your usecase.



De : Users  De la part de Adrien LACOMME
Envoyé : vendredi 27 octobre 2023 17:06
À : users@lists.opensips.org
Objet : [OpenSIPS-Users] Ratelimit usage



Hi,



I'm trying to implement CPS limitation on OpenSIPS and I got some difficulties 
to understand how ratelimit module works.



Here is the setup (I want to limit cps to 1) :



if (!rl_check("test1", 1, "RED")) {

  send_reply(487, "Request Terminated: CPS limit exceeded");

}



I tried to make few calls simultaneously but rl_check return is always FALSE.



Here is the log I got :



2023-10-27T16:52:19.792337 SBC /usr/sbin/opensips[137782]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:1 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)

2023-10-27T16:52:19.804064 SBC /usr/sbin/opensips[137781]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:2 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)

2023-10-27T16:52:22.872991 SBC /usr/sbin/opensips[137782]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:3 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)

2023-10-27T16:52:22.918123 SBC /usr/sbin/opensips[137781]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:4 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)



Shouldn't the module block calls when the counter goes to 2 ? Or is he checking 
the load value to block ? If yes, why the load value isn't incremented ?



Regards,



Adrien LACOMME




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


Re: [OpenSIPS-Users] Ratelimit usage

2023-10-27 Thread Ben Newlin
Have you read the description of the RED algorithm? Are you sure you are 
generating appropriate traffic to cause a drop? That algorithm seems like it 
would be difficult to control/predict the drops accurately for a test. If you 
are sending a constant traffic volume to it, it never will drop.

If you are just testing, you may want to go with a simpler algorithm where you 
can more easily control when/how many are being dropped.

The standard way to use the module for CPS is to use the SBT algorithm with a 
window_size of 1. [1]

[1] https://opensips.org/docs/modules/3.2.x/ratelimit.html#param_window_size

Ben Newlin

From: Users  on behalf of Adrien LACOMME 

Date: Friday, October 27, 2023 at 12:03 PM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] Ratelimit usage
 EXTERNAL EMAIL - Please use caution with links and attachments


Hello,

I added this line to my code, in fact it's better to decrease the counter if I 
drop the call.
But my problem is that the rl_check function never drop calls, I do not enter 
in the IF condition.

For the algorithm, I'm actually just trying the module, I will probably not 
stay with RED.


De : Users  de la part de Wadii ELMAJDI | 
Evenmedia 
Envoyé : vendredi 27 octobre 2023 17:39
À : OpenSIPS users mailling list 
Objet : Re: [OpenSIPS-Users] Ratelimit usage


Hello Adrien

Try :

if (!rl_check("test1", 1, "RED"))

{

   rl_dec_count("test1")

   send_reply(487, "Request Terminated: CPS limit exceeded");

   exit;

}

* If you are using ratelimit to limit only successful traffic, you need to 
explicitely decrease the counter for the declined calls using the 
rl_dec_count() function
also I’m not sure RED is the best algorithm for your usecase.



De : Users  De la part de Adrien LACOMME
Envoyé : vendredi 27 octobre 2023 17:06
À : users@lists.opensips.org
Objet : [OpenSIPS-Users] Ratelimit usage



Hi,



I'm trying to implement CPS limitation on OpenSIPS and I got some difficulties 
to understand how ratelimit module works.



Here is the setup (I want to limit cps to 1) :



if (!rl_check("test1", 1, "RED")) {

  send_reply(487, "Request Terminated: CPS limit exceeded");

}



I tried to make few calls simultaneously but rl_check return is always FALSE.



Here is the log I got :



2023-10-27T16:52:19.792337 SBC /usr/sbin/opensips[137782]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:1 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)

2023-10-27T16:52:19.804064 SBC /usr/sbin/opensips[137781]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:2 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)

2023-10-27T16:52:22.872991 SBC /usr/sbin/opensips[137782]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:3 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)

2023-10-27T16:52:22.918123 SBC /usr/sbin/opensips[137781]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:4 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)



Shouldn't the module block calls when the counter goes to 2 ? Or is he checking 
the load value to block ? If yes, why the load value isn't incremented ?



Regards,



Adrien LACOMME




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


Re: [OpenSIPS-Users] Ratelimit usage

2023-10-27 Thread Adrien LACOMME
Hello,

I added this line to my code, in fact it's better to decrease the counter if I 
drop the call.
But my problem is that the rl_check function never drop calls, I do not enter 
in the IF condition.

For the algorithm, I'm actually just trying the module, I will probably not 
stay with RED.


De : Users  de la part de Wadii ELMAJDI | 
Evenmedia 
Envoyé : vendredi 27 octobre 2023 17:39
À : OpenSIPS users mailling list 
Objet : Re: [OpenSIPS-Users] Ratelimit usage


Hello Adrien

Try :

if (!rl_check("test1", 1, "RED"))

{

   rl_dec_count("test1")

   send_reply(487, "Request Terminated: CPS limit exceeded");

   exit;

}

* If you are using ratelimit to limit only successful traffic, you need to 
explicitely decrease the counter for the declined calls using the 
rl_dec_count() function
also I’m not sure RED is the best algorithm for your usecase.



De : Users  De la part de Adrien LACOMME
Envoyé : vendredi 27 octobre 2023 17:06
À : users@lists.opensips.org
Objet : [OpenSIPS-Users] Ratelimit usage



Hi,



I'm trying to implement CPS limitation on OpenSIPS and I got some difficulties 
to understand how ratelimit module works.



Here is the setup (I want to limit cps to 1) :



if (!rl_check("test1", 1, "RED")) {

  send_reply(487, "Request Terminated: CPS limit exceeded");

}



I tried to make few calls simultaneously but rl_check return is always FALSE.



Here is the log I got :



2023-10-27T16:52:19.792337 SBC /usr/sbin/opensips[137782]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:1 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)

2023-10-27T16:52:19.804064 SBC /usr/sbin/opensips[137781]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:2 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)

2023-10-27T16:52:22.872991 SBC /usr/sbin/opensips[137782]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:3 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)

2023-10-27T16:52:22.918123 SBC /usr/sbin/opensips[137781]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:4 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)



Shouldn't the module block calls when the counter goes to 2 ? Or is he checking 
the load value to block ? If yes, why the load value isn't incremented ?



Regards,



Adrien LACOMME




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


Re: [OpenSIPS-Users] Ratelimit usage

2023-10-27 Thread Wadii ELMAJDI | Evenmedia
Hello Adrien

Try :

if (!rl_check("test1", 1, "RED"))
{
   rl_dec_count("test1")
   send_reply(487, "Request Terminated: CPS limit exceeded");
   exit;
}

* If you are using ratelimit to limit only successful traffic, you need to 
explicitely decrease the counter for the declined calls using the 
rl_dec_count() function
also I’m not sure RED is the best algorithm for your usecase.

De : Users  De la part de Adrien LACOMME
Envoyé : vendredi 27 octobre 2023 17:06
À : users@lists.opensips.org
Objet : [OpenSIPS-Users] Ratelimit usage

Hi,

I'm trying to implement CPS limitation on OpenSIPS and I got some difficulties 
to understand how ratelimit module works.

Here is the setup (I want to limit cps to 1) :

if (!rl_check("test1", 1, "RED")) {
  send_reply(487, "Request Terminated: CPS limit exceeded");
}

I tried to make few calls simultaneously but rl_check return is always FALSE.

Here is the log I got :

2023-10-27T16:52:19.792337 SBC /usr/sbin/opensips[137782]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:1 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)
2023-10-27T16:52:19.804064 SBC /usr/sbin/opensips[137781]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:2 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)
2023-10-27T16:52:22.872991 SBC /usr/sbin/opensips[137782]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:3 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)
2023-10-27T16:52:22.918123 SBC /usr/sbin/opensips[137781]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:4 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)

Shouldn't the module block calls when the counter goes to 2 ? Or is he checking 
the load value to block ? If yes, why the load value isn't incremented ?

Regards,

Adrien LACOMME


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


[OpenSIPS-Users] Ratelimit usage

2023-10-27 Thread Adrien LACOMME
Hi,

I'm trying to implement CPS limitation on OpenSIPS and I got some difficulties 
to understand how ratelimit module works.

Here is the setup (I want to limit cps to 1) :

if (!rl_check("test1", 1, "RED")) {
  send_reply(487, "Request Terminated: CPS limit exceeded");
}

I tried to make few calls simultaneously but rl_check return is always FALSE.

Here is the log I got :

2023-10-27T16:52:19.792337 SBC /usr/sbin/opensips[137782]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:1 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)
2023-10-27T16:52:19.804064 SBC /usr/sbin/opensips[137781]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:2 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)
2023-10-27T16:52:22.872991 SBC /usr/sbin/opensips[137782]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:3 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)
2023-10-27T16:52:22.918123 SBC /usr/sbin/opensips[137781]: 
DBG:ratelimit:w_rl_check: Pipe test1 counter:4 load:0 limit:1 should NOT be 
blocked (0x7fcae1504888)

Shouldn't the module block calls when the counter goes to 2 ? Or is he checking 
the load value to block ? If yes, why the load value isn't incremented ?

Regards,

Adrien LACOMME

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


Re: [OpenSIPS-Users] I need some help in attr matching while forming the Branch .

2023-10-27 Thread Ben Newlin
Just wanted to add that with the solution I recommended below, you would want 
to make sure you properly handle the case where all branches were dropped 
because none matched. The proper handling in that case for your system would be 
defined by your requirements.

Ben Newlin

From: Users  on behalf of Ben Newlin 

Date: Friday, October 27, 2023 at 9:33 AM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] I need some help in attr matching while forming 
the Branch .

Without seeing the specific exact code, I can’t say what is causing that error. 
It seems like it may be a syntax issue. For example, in your email you are 
missing the semicolon after the line setting the count. I don’t know if it is 
that way in your config script. I recommend double checking all your syntax, 
and if you still get the error please provide the exact code from your script 
for review.

For #2, I can’t really be very specific there because I don’t know all of your 
logic, nor am I very knowledgeable about the registrar module. My first thought 
is to not do any filtering/checking in the request route. Just allow the 
registrar module to load all contacts in branches, but arm a branch_route. Then 
perform the check in the branch route for each branch. If the Contact for the 
branch doesn’t match what you want, you can drop the branch [1].

[1] 
https://www.opensips.org/Documentation/Script-Routes-3-2#toc2

Ben Newlin

From: Users  on behalf of Sasmita Panda 

Date: Friday, October 27, 2023 at 6:17 AM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] I need some help in attr matching while forming 
the Branch .

Ahhh , Ok .
Now it's very  complicated . When you said a loop that's looping in my mind . 
Sorry for the bad joke .

In case , the number of elements in each Invite won't be fixed . So the number 
of loops will vary from one Invite to another .
I was thinking of counting the number of elements first , then as the index 
starts from 0 I will loop till count-1 to fetch every element properly .

Example :
$var(count) = $(hdr(Call-Info){csv.count})## if the number is 3 then loop 
will be for 3 times starting from 0 to 2

 $var(i) = 0;
while($var(i) < $var(count) )
{
xlog("counter: $var(i)\n");
$var(i) = $var(i) + 1;
}

This was my initial thought . But while finding the count it gave me an error . 
 $var(count) = $(hdr(Call-Info){csv.count})  Is this not in the correct format ?

parse error in /usr/local/etc/opensips/opensips-p2p.cfg:267:26-55: unknown 
script variable

As I have earlier mentioned my header will look like .
Call-Info: sales,en,level20,en (this can be anything but format will be like 
this . )  . How do I count the number of values ?

2. As I am doing this matching to filter out contacts, where should I do this ? 
If I am doing this while giving a call to the contacts , for the 1st 
transaction it is doing the comparison , after that for the next branch it 
processes the call without matching . Which is not right . For every contact 
this comparison should loop

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


On Thu, Oct 26, 2023 at 7:19 PM Ben Newlin 
mailto:ben.new...@genesys.com>> wrote:
Sasmita,

Apologies, I replied yesterday but the message is being held by the list as the 
quoted replies have made it too large. I’ve removed some of the quoted replies 
and I’m copying my response below:

Yes, a substring match means the exact complete string exists somewhere in the 
string being searched . In your example, the $avp(attr) does not contain any 
substring that matches $hdr(Call-Info), so it is correctly failing.

If you want to check for the presence of each element, you need to loop through 
the elements in $hdr(Call-Info) and check for each one in the $avp(attr) using 
the s.index mechanism.

The best options for looping on the header are probably s.select [1] or the csv 
tranformations [2].

[1] 
https://www.opensips.org/Documentation/Script-Tran-3-2#toc7
[2] 
https://www.opensips.org/Documentation/Script-Tran-3-2#toc82

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


Re: [OpenSIPS-Users] I need some help in attr matching while forming the Branch .

2023-10-27 Thread Ben Newlin
Without seeing the specific exact code, I can’t say what is causing that error. 
It seems like it may be a syntax issue. For example, in your email you are 
missing the semicolon after the line setting the count. I don’t know if it is 
that way in your config script. I recommend double checking all your syntax, 
and if you still get the error please provide the exact code from your script 
for review.

For #2, I can’t really be very specific there because I don’t know all of your 
logic, nor am I very knowledgeable about the registrar module. My first thought 
is to not do any filtering/checking in the request route. Just allow the 
registrar module to load all contacts in branches, but arm a branch_route. Then 
perform the check in the branch route for each branch. If the Contact for the 
branch doesn’t match what you want, you can drop the branch [1].

[1] https://www.opensips.org/Documentation/Script-Routes-3-2#toc2

Ben Newlin

From: Users  on behalf of Sasmita Panda 

Date: Friday, October 27, 2023 at 6:17 AM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] I need some help in attr matching while forming 
the Branch .
 EXTERNAL EMAIL - Please use caution with links and attachments


Ahhh , Ok .
Now it's very  complicated . When you said a loop that's looping in my mind . 
Sorry for the bad joke .

In case , the number of elements in each Invite won't be fixed . So the number 
of loops will vary from one Invite to another .
I was thinking of counting the number of elements first , then as the index 
starts from 0 I will loop till count-1 to fetch every element properly .

Example :
$var(count) = $(hdr(Call-Info){csv.count})## if the number is 3 then loop 
will be for 3 times starting from 0 to 2

 $var(i) = 0;
while($var(i) < $var(count) )
{
xlog("counter: $var(i)\n");
$var(i) = $var(i) + 1;
}

This was my initial thought . But while finding the count it gave me an error . 
 $var(count) = $(hdr(Call-Info){csv.count})  Is this not in the correct format ?

parse error in /usr/local/etc/opensips/opensips-p2p.cfg:267:26-55: unknown 
script variable

As I have earlier mentioned my header will look like .
Call-Info: sales,en,level20,en (this can be anything but format will be like 
this . )  . How do I count the number of values ?

2. As I am doing this matching to filter out contacts, where should I do this ? 
If I am doing this while giving a call to the contacts , for the 1st 
transaction it is doing the comparison , after that for the next branch it 
processes the call without matching . Which is not right . For every contact 
this comparison should loop

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


On Thu, Oct 26, 2023 at 7:19 PM Ben Newlin 
mailto:ben.new...@genesys.com>> wrote:
Sasmita,

Apologies, I replied yesterday but the message is being held by the list as the 
quoted replies have made it too large. I’ve removed some of the quoted replies 
and I’m copying my response below:

Yes, a substring match means the exact complete string exists somewhere in the 
string being searched . In your example, the $avp(attr) does not contain any 
substring that matches $hdr(Call-Info), so it is correctly failing.

If you want to check for the presence of each element, you need to loop through 
the elements in $hdr(Call-Info) and check for each one in the $avp(attr) using 
the s.index mechanism.

The best options for looping on the header are probably s.select [1] or the csv 
tranformations [2].

[1] 
https://www.opensips.org/Documentation/Script-Tran-3-2#toc7
[2] 
https://www.opensips.org/Documentation/Script-Tran-3-2#toc82

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


Re: [OpenSIPS-Users] I need some help in attr matching while forming the Branch .

2023-10-27 Thread Sasmita Panda
Ahhh , Ok .
Now it's very  complicated . When you said a loop that's looping in my mind
. Sorry for the bad joke .

In case , the number of elements in each Invite won't be fixed . So the
number of loops will vary from one Invite to another .
I was thinking of counting the number of elements first , then as the index
starts from 0 I will loop till *count-1* to fetch every element properly .

Example :
$var(count) = $(hdr(Call-Info){csv.count})## if the number is 3 then
loop will be for 3 times starting from 0 to 2

 $var(i) = 0;
while($var(i) < $var(count) )
{
xlog("counter: $var(i)\n");
$var(i) = $var(i) + 1;
}

This was my initial thought . But while finding the count it gave me an
error . * $var(count) = $(hdr(Call-Info){csv.count})  Is this not in the
correct format ? *

*parse error in /usr/local/etc/opensips/opensips-p2p.cfg:267:26-55: unknown
script variable*

*As I have earlier mentioned my header will look like . *
*Call-Info: sales,en,level20,en (this can be anything but format will be
like this . )  . How do I count the number of values ?*

*2. As I am doing this matching to filter out contacts, where should I do
this ? If I am doing this while giving a call to the contacts , for the 1st
transaction it is doing the comparison , after that for the next branch it
processes the call without matching . Which is not right . For every
contact this comparison should loop *

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


On Thu, Oct 26, 2023 at 7:19 PM Ben Newlin  wrote:

> Sasmita,
>
>
>
> Apologies, I replied yesterday but the message is being held by the list
> as the quoted replies have made it too large. I’ve removed some of the
> quoted replies and I’m copying my response below:
>
>
>
> Yes, a substring match means the exact complete string exists somewhere in
> the string being searched . In your example, the $avp(attr) does not
> contain any substring that matches $hdr(Call-Info), so it is correctly
> failing.
>
>
>
> If you want to check for the presence of each element, you need to loop
> through the elements in $hdr(Call-Info) and check for each one in the
> $avp(attr) using the s.index mechanism.
>
>
>
> The best options for looping on the header are probably s.select [1] or
> the csv tranformations [2].
>
>
>
> [1] https://www.opensips.org/Documentation/Script-Tran-3-2#toc7
>
> [2] https://www.opensips.org/Documentation/Script-Tran-3-2#toc82
>
>
>
> Ben Newlin
>
>
>
> *From: *Users  on behalf of Sasmita
> Panda 
> *Date: *Thursday, October 26, 2023 at 8:46 AM
> *To: *OpenSIPS users mailling list 
> *Subject: *Re: [OpenSIPS-Users] I need some help in attr matching while
> forming the Branch .
>
> * EXTERNAL EMAIL - Please use caution with links and attachments *
>
>
> --
>
> Is there any update on this ?
>
>
>
> On Wed, 25 Oct 2023, 19:27 Sasmita Panda,  wrote:
>
> Hi Ben ,
>
>
>
> Please correct me if I am wrong .
>
>
>
> *$avp(attr) : sales,level20,en,true*
>
> *$hdr(Call-Info) : sales,en*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> * if ($(avp(attr){s.index, $hdr(Call-Info)}) != NULL)
>   {xlog("found $hdr(Call-Info)  in
> $avp(attr) \n"); if (next_branches()){
> t_on_failure("1");
> }   }  else {
>  sl_send_reply(500,"Unable to load contacts");
> exit;  }*
>
>
>
> In this case , although $hdr(Call-Info) is a substring of $avp(attr) still
> it's going in the else block and giving me *500  Unable to load contacts*
> .
>
>
>
> Does the substring must contain continuous values ?
>
>
>
>
>
>
>
>
>
> *Thanks & Regards*
>
> *Sasmita Panda*
>
> *Senior Network Testing and Software Engineer*
>
> *3CLogic , ph:07827611765*
>
> ___
> 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