Flags and Mask on carrierroute module

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Flags and Mask on carrierroute module

Ricardo Martins
Hi al! I realy tried to find how flags and mask on carrierroute modulo
works but could not get a clue.

I know that the mask column will be "applied" to the flags setted on
scripting, before trying to match the flags on the rule. That's ok. But,
in this case, what "applied" means?

Let's consider the example at the module documentation, where we find a
route with flags=2048 and mask=2112 (both decimal values). How can we
interpret those values? For which possible values of message flags
(scripting flags) this match will be true?

I apreciate if someone could help me on that, and I'm sure that this
help will be an important add to the list files, helping lots of people
for now on.

Regards to all! Long life to opensips!

Ricardo Poppi.
Brasil.



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Flags and Mask on carrierroute module

Bogdan-Andrei Iancu
Hi Ricardo,

I cannot help you with CR stuff, but I can give you a hand with Dynamic
Routing module
(http://www.opensips.org/html/docs/modules/1.5.x/drouting.html) - more
or less, you can do the same with it.

Regards,
Bogdan

Ricardo Martins wrote:

> Hi al! I realy tried to find how flags and mask on carrierroute modulo
> works but could not get a clue.
>
> I know that the mask column will be "applied" to the flags setted on
> scripting, before trying to match the flags on the rule. That's ok. But,
> in this case, what "applied" means?
>
> Let's consider the example at the module documentation, where we find a
> route with flags=2048 and mask=2112 (both decimal values). How can we
> interpret those values? For which possible values of message flags
> (scripting flags) this match will be true?
>
> I apreciate if someone could help me on that, and I'm sure that this
> help will be an important add to the list files, helping lots of people
> for now on.
>
> Regards to all! Long life to opensips!
>
> Ricardo Poppi.
> Brasil.
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Flags and Mask on carrierroute module

Robert Dyck
In reply to this post by Ricardo Martins
Is it masks in general that you do not understand? Using KCalc for example we
see that 2112 decimal is 100001000000 in binary and 2048 is 100000000000.
"Apply" usually means AND the two values. In this example the flag will match
one of the bits in the mask.


On Thursday 21 May 2009, Ricardo Martins wrote:

> Hi al! I realy tried to find how flags and mask on carrierroute modulo
> works but could not get a clue.
>
> I know that the mask column will be "applied" to the flags setted on
> scripting, before trying to match the flags on the rule. That's ok. But,
> in this case, what "applied" means?
>
> Let's consider the example at the module documentation, where we find a
> route with flags=2048 and mask=2112 (both decimal values). How can we
> interpret those values? For which possible values of message flags
> (scripting flags) this match will be true?
>
> I apreciate if someone could help me on that, and I'm sure that this
> help will be an important add to the list files, helping lots of people
> for now on.
>
> Regards to all! Long life to opensips!
>
> Ricardo Poppi.
> Brasil.
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users