Re: [SR-Users] User accounting

2012-09-06 Thread Ali Jawad
Hi Alex Thanks again for walking the extra mile and bringing this to my attention, I did apply your fix. You are a Kamailio gold mine. Thanks again On Thu, Sep 6, 2012 at 5:08 PM, Alex Balashov wrote: > No problem! > > As always, be mindful of security; some of the parameters can be easily > spo

Re: [SR-Users] User accounting

2012-09-06 Thread Alex Balashov
No problem! As always, be mindful of security; some of the parameters can be easily spoofed or manipulated by someone who knows what they're doing. If you're taking their values and throwing them straight into a SQL statement unsanitised, these values can form the basis of a SQL injection a

Re: [SR-Users] User accounting

2012-09-06 Thread Ali Jawad
Thank you Alex, I got where I need to. Appreciated. Regards On Thu, Sep 6, 2012 at 4:30 PM, Alex Balashov wrote: > On 09/06/2012 09:25 AM, Ali Jawad wrote: > > How do I get the variables for username,agent and IP. >> > > This information comes from pseudovariables ("PVs"), which are basically >

Re: [SR-Users] User accounting

2012-09-06 Thread Alex Balashov
On 09/06/2012 09:25 AM, Ali Jawad wrote: How do I get the variables for username,agent and IP. This information comes from pseudovariables ("PVs"), which are basically parts of the SIP message that are parsed by Kamailio and exposed inside the config script environment as read-only (and in a

Re: [SR-Users] User accounting

2012-09-06 Thread Ali Jawad
Hi Alex Thanks to your pointers above, I am able to login into a custom table insert queries as needed. However, I am not sure how to define the correct variables, what I am doing now is the following : sql_query("cb", "insert into registrations (`user`,`agent`,`type`,`ip`,`unique`,`auth`) VALUES

Re: [SR-Users] User accounting

2012-09-05 Thread Alex Balashov
Sure, just pull it out with the $ua or $hdr(User-Agent) PVs. On 09/05/2012 07:53 AM, Ali Jawad wrote: Hi Alex Sounds good, thanks for the input so far, anyway I can add the useragent to the entry ? Regards On Wed, Sep 5, 2012 at 2:49 PM, Alex Balashov mailto:abalas...@evaristesys.com>> wrote:

Re: [SR-Users] User accounting

2012-09-05 Thread Ali Jawad
Hi Alex Sounds good, thanks for the input so far, anyway I can add the useragent to the entry ? Regards On Wed, Sep 5, 2012 at 2:49 PM, Alex Balashov wrote: > Hi Ali, > > > On 09/05/2012 07:18 AM, Ali Jawad wrote: > > Is it possible to store user logon/logout dates + user agent used. I >> know t

Re: [SR-Users] User accounting

2012-09-05 Thread Alex Balashov
Hi Ali, On 09/05/2012 07:18 AM, Ali Jawad wrote: Is it possible to store user logon/logout dates + user agent used. I know that the info is in the location table but it is not persistent, and I am using the accounting table to store calls. But I am not sure there is a way to store logon/logout/