[sr-dev] [permissions module] allow_source_address_group() drops the request if it returns 0

Daniel-Constantin Mierla miconda at gmail.com
Mon Feb 8 23:34:54 CET 2010


Hello,

On 2/8/10 6:41 PM, Iñaki Baz Castillo wrote:
> Hi, using Kamailio 1.5 rev 5834 with permissions module.
>
> I do "$avp(i:10) = allow_source_address_group()" for a request whose source
> address matches a row in "address" table with "grp=0". I expect that
> allow_source_address_group() would return 0.
>
> However the request is dropped in silence!! How is it possible?
>    
returnin 0 from a module function means 'exit':
http://www.asipto.com/pub/kamailio-devel-guide/#c16return_values

> It seems that allow_source_address_group() behaves as "return(0)" when the
> returned value is 0. But this is not documented and IMHO it cannot be the
> expected behavior, am I right?
>    
You mean 'return 0' is not documented or this particular function's 
behavior with group id 0?

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
eLearning class for Kamailio 3.0.0
* http://www.asipto.com/




More information about the sr-dev mailing list