Actually, I'd love to see the whole(?) API which is available to us in Hooks
documented in an appendix to the venerable "manual" :) A few are mentioned
throughout already, like get_attr(). But for most you have to look through
the source.

Dave
:O

> -----Original Message-----
> From: Simon Hackett [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 18, 2001 11:12 AM
> To: [EMAIL PROTECTED]
> Subject: (RADIATOR) Re: Returning avpairs with a an Access-Reject?
> 
> 
> To follow up my own posting... I found one way that works, a 
> PostAuthHook:
> 
> # drop an h323 return code of 1 (auth failed) into the reply if it is
> # an access reject or reject_immediate - SWH hack for debitcard script
> 
> PostAuthHook sub { ${$_[1]}->add_attr('cisco-h323-return-code', \
>                                              'h323-return-code=1') \
>                                                if (${$_[2]} 
> == $main::REJECT) \
>                                                  || (${$_[2]} == 
> $main::REJECT_IMMEDIATE)}
> 
> Which gets the job done, but I don't see why attributes generated as 
> part of a reject shouldn't wind up in the return packet. Maybe it's 
> how I'm rejecting the user (a DEFAULT entry in a users file which 
> says 'Auth-Type = Reject')?
> 
> Also, as a comment about the docs (Hi Mike), the example PostAuthHook 
> in the manual (which the above is a shameless copy/adaptation of) 
> doesn't mention that the REJECT code might be REJECT_IMMEDIATE, not 
> just plain old REJECT. That had me fooled for a while! :)
> 
> Perhaps the docs could make a reference in that section to a complete 
> list of possible values of x for $main::x ...
> 
> Cheers,
>    Simon
> 
> ---
> Simon Hackett, Technical Director, Internode Systems Pty Ltd
> 31 York St [PO Box 284, Rundle Mall], Adelaide, SA 5000 Australia
> Email: [EMAIL PROTECTED]  Web: http://www.on.net
> Phone: +61-8-8223-2999          Fax: +61-8-8223-1777
> 
> 
> ===
> Archive at http://www.starport.net/~radiator/
> Announcements on [EMAIL PROTECTED]
> To unsubscribe, email '[EMAIL PROTECTED]' with
> 'unsubscribe radiator' in the body of the message.
> 

===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to