[Users] Custom header field use || getting original IP from dispatcher

Daniel-Constantin Mierla daniel at voice-system.ro
Mon Mar 6 11:38:17 CET 2006


Rick Richardson wrote:
> On Thu, 2006-02-23 at 11:20 +0200, Daniel-Constantin Mierla wrote:
>   
>> Hello,
>>
>> On 02/23/06 05:17, Rick Richardson wrote:
>>     
>>> I am needing to use the source IP for a few routines in my proxy server,
>>> but the problem is that it is being forwarded to me by a dispatcher. I
>>> am definitely needing the IP address. 
>>>
>>> My first inclination was to append a header field with the IP address.
>>> This is quite easy. However, the hard part is using that passed in IP
>>> address. I'm not sure what the best way would be to get that value into
>>> the hands of several module functions like permissions =>
>>> allow_trusted(), etc..
>>>
>>> Any ideas?
>>>   
>>>       
>> one solution would be to do some development to introduce 
>> pseudo-variable support in the modules you want. But maybe you can do 
>> the check using only avpops module, via avp_check() and avp_db_load().
>>
>>     
> Could you point me in the direction of modules that have the
> psuedo-variable support that would be easy to emulate? The module I'll
> need to modify is registrar. Specifically the lookup and save functions.
>   
the group module has support for avps in is_user_in() function.
> Also, is there a way in-script to take a custom header value and load it
> into a pseudo-variable? And is there any documentation or example source
> for this?
>   
you can use avp_write() to write the body of an header in an avp.

Cheers,
Daniel

>   
>> Cheers,
>> Daniel
>>
>>     
>>> thanks,
>>>
>>> Rick
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at openser.org
>>> http://openser.org/cgi-bin/mailman/listinfo/users
>>>
>>>   
>>>       
>
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
>   




More information about the sr-users mailing list