[Serusers] how to determine if a user is already authenticated or not ?

Daniel-Constantin Mierla daniel at voice-system.ro
Mon May 9 10:46:38 CEST 2005


On 05/08/05 09:40, Stéphane Muller wrote:

>Sorry for my stupid questions, I'm still a newbee in the VoiP domain !
>
>I would like to allow only authenticated users to perform INVITE messages
>to special accounts.
>
>Form example : INVITE messages for "sip:conference at mydomain.com" 
>must be authenticated.
>  
>
You have to place a statement like the following in your config file:

if (method=="INVITE")
{
    if (!proxy_authorize("" /* realm */, "subscriber" /* table name */))
    {
        proxy_challenge("" /* realm */, "0" /* no qop */ );
        break;
    };
};

You can find an example in the SER sources: sip_router/examples/pstn.cfg

>Another "stupid" question : where are stored those SETFLAG() functions ?
>
>Is it posible for example to SETFLAG() a user just after is it authenticated, and
>after that use ISFLAGSET() for a particular INVITE ??
>  
>
The flag functions are in SER core and the flags are stored per SIP 
Request/transaction.

Daniel

>Thank you very much guys !
>
>
>-- Stéphane Muller -- SMuller at urbanet.ch le 08.05.2005 --
>
>_______________________________________________
>Serusers mailing list
>serusers at lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
>
>  
>




More information about the sr-users mailing list