[Kamailio-Users] Send MaxCallDuration and UserCredit for freeradius-cdrtool

DanB danb at sms4sip.com
Tue Sep 30 20:15:16 CEST 2008


Hi Diego,

fixed now in pre2.

Cheers,
DanB

On Tue, Sep 30, 2008 at 5:58 PM, Diego Zuaneti Arruda <
diego at fasternet.com.br> wrote:

>    DanB,
>
>    I'm testing the freeradius-cdrtool, and found a possible problem.
>    When I turn off the call before answer, the session is not finished.
>    Here's a part of the logs:
>
> rlm_python [freeradius-cdrtool]: Entering accounting section
> rlm_python [freeradius-cdrtool]: Got the following params:
> (('Acct-Status-Type', 'Failed'), ('Service-Type', 'Sip-Session'),
> ('Sip-Response-Code', '503'), ('Sip-Method', 'Invite'), ('X-Ascend-Bridge',
> '0x694de248a0b22d087cf199b7'), ('Sip-From-Tag',
> '"000d6570880e01462b3c62f9-0908d279"'), ('Acct-Session-Id', '"
> 000d6570-880e0028-2a382841-1ef5c833 at 200.187.80.9"'<000d6570-880e0028-2a382841-1ef5c833 at 200.187.80.9%22%27>),
> ('User-Name', '"87001 at fastervoip.com.br"' <87001 at fastervoip.com.br%22%27>),
> ('Calling-Station-Id', '"sip:87001 at fastervoip.com.br<sip%3A87001 at fastervoip.com.br>"'),
> ('Called-Station-Id', '"sip:01591184701 at fastervoip.com.br<sip%3A01591184701 at fastervoip.com.br>"'),
> ('Sip-Translated-Request-URI', '"sip:01591184701 at 200.187.80.17:5060;transport=udp"'),
> ('Sip-Rpid', '"87001"'), ('Source-IP', '"200.187.80.9"'), ('Source-Port',
> '"5070"'), ('Acct-Authentic', '49'), ('SIP-Proxy-IP', '"127.0.0.1"'),
> ('Canonical-URI', '"sip:01591184701 at fastervoip.com.br<sip%3A01591184701 at fastervoip.com.br>"'),
> ('Billing-Party', '"87001 at fastervoip.com.br"'<87001 at fastervoip.com.br%22%27>),
> ('Contact', '"<sip:87001 at 200.187.80.9:5070;transport=udp>"'), ('NAS-Port',
> '5060'), ('Acct-Delay-Time', '0'), ('NAS-IP-Address', '127.0.0.1'),
> ('Client-IP-Address', '127.0.0.1'), ('Acct-Unique-Session-Id',
> '"3db548b64d9445ce"'))
> rlm_python [freeradius-cdrtool]: Extracted atribute <Acct-Status-Type> with
> value <Failed>
> rlm_python [freeradius-cdrtool]: Extracted atribute <User-Name> with value
> <87001 at fastervoip.com.br>
> rlm_python [freeradius-cdrtool]: Extracted atribute <Canonical-URI> with
> value <sip:01591184701 at fastervoip.com.br<sip%3A01591184701 at fastervoip.com.br>
> >
> rlm_python [freeradius-cdrtool]: Extracted atribute <Called-Station-Id>
> with value <sip:01591184701 at fastervoip.com.br<sip%3A01591184701 at fastervoip.com.br>
> >
> rlm_python [freeradius-cdrtool]: Extracted atribute <Acct-Session-Id> with
> value <000d6570-880e0028-2a382841-1ef5c833 at 200.187.80.9>
> *rlm_python:EXCEPT:<type 'exceptions.TypeError'>: end_session() takes
> exactly 6 arguments (4 given)*
>   modcall[accounting]: module "python" returns ?? for request 261
> modcall: leaving group accounting (returns ok) for request 261
> Sending Accounting-Response of id 147 to 127.0.0.1 port 41560
> Finished request 261
>
>
> Diego.
>
> ----- Original Message -----
> *From:* DanB <danb at sms4sip.com>
> *To:* Diego Zuaneti Arruda <diego at fasternet.com.br>
> *Cc:* users at lists.kamailio.org
> *Sent:* Tuesday, September 30, 2008 11:54 AM
> *Subject:* Re: [Kamailio-Users] Send MaxCallDuration and UserCredit for
> freeradius-cdrtool
>
> "The avps received will be available in openser as: callMaxDur and credit,
> where callMaxDur is the maximum duration the user is allowed to be connected
> with the destination and credit represents the amount of credit available at
> starting of the call. This info can be used later in an bbua able to timeout
> calls based on duration.
> "
>
> On Tue, Sep 30, 2008 at 4:38 PM, Diego Zuaneti Arruda <
> diego at fasternet.com.br> wrote:
>
>>    Thanks DanB, the problem was solved.
>>   How send BYE when expires credit in conversation?
>>
>>
>> Thanks.
>> Diego.
>>
>>  ----- Original Message -----
>> *From:* DanB <danb at sms4sip.com>
>> *To:* Diego Zuaneti Arruda <diego at fasternet.com.br>
>> *Cc:* users at lists.kamailio.org
>>   *Sent:* Tuesday, September 30, 2008 11:19 AM
>> *Subject:* Re: [Kamailio-Users] Send MaxCallDuration and UserCredit for
>> freeradius-cdrtool
>>
>> Here is an already patched version:
>> http://frad-cdrtool.sourceforge.net/rlm_digest.c
>> You should replace your rlm_digest.c with this one and recompile the
>> server.
>>
>> DanB
>>
>> On Tue, Sep 30, 2008 at 4:14 PM, Diego Zuaneti Arruda <
>> diego at fasternet.com.br> wrote:
>>
>>>    I'm using the freeradius 1.1.7, and not patched the rlm_digest.
>>>   Where to find the patch rlm_digest ?
>>>
>>>
>>> Diego.
>>>
>>>  ----- Original Message -----
>>> *From:* DanB <danb at sms4sip.com>
>>> *To:* Diego Zuaneti Arruda <diego at fasternet.com.br>
>>> *Cc:* users at lists.kamailio.org
>>>   *Sent:* Tuesday, September 30, 2008 11:08 AM
>>> *Subject:* Re: [Kamailio-Users] Send MaxCallDuration and UserCredit for
>>> freeradius-cdrtool
>>>
>>> Diego,
>>>
>>> the problem is with your digest module which is sanitizing the
>>> parameters in authentication phase only, therefore the parameters like
>>> Username, Digest-URI are not available in the authorization phase (no way
>>> for the connector to read them).
>>> Did u patch your rlm_digest as per the README.txt? What version of
>>> freeradius are u using?
>>>
>>> DanB
>>>
>>> On Tue, Sep 30, 2008 at 3:56 PM, Diego Zuaneti Arruda <
>>> diego at fasternet.com.br> wrote:
>>>
>>>>    DanB,
>>>>
>>>>    Yes, I changed the kamailio.cfg.
>>>>    I´m sending the full log of radius attached.
>>>>
>>>>
>>>> Diego.
>>>>
>>>>  ----- Original Message -----
>>>> *From:* DanB <danb at sms4sip.com>
>>>> *To:* Diego Zuaneti Arruda <diego at fasternet.com.br>
>>>> *Cc:* users at lists.kamailio.org
>>>>   *Sent:* Tuesday, September 30, 2008 10:34 AM
>>>> *Subject:* Re: [Kamailio-Users] Send MaxCallDuration and UserCredit for
>>>> freeradius-cdrtool
>>>>
>>>> Diego,
>>>>
>>>> looks like there was no session started at first place.
>>>> Did u change the openser.cfg config? You need to add callid into
>>>> radius_proxy_authorize so that the callid should be used (example in
>>>> README.txt of the freeradius-cdrtool sources).
>>>>
>>>> Also, can u post a full authorize/account_start/account_stop sequence as
>>>> logged by "radiusd -X".
>>>>
>>>> DanB
>>>> On Tue, Sep 30, 2008 at 3:00 PM, Diego Zuaneti Arruda <
>>>> diego at fasternet.com.br> wrote:
>>>>
>>>>>    Hi DanB,
>>>>>
>>>>> I updated the CDRTool to version 6.6.8 and freeradius-cdrtool to
>>>>> version 1.2-pre.
>>>>> I'm getting this log and not doing the Debit.
>>>>>
>>>>> Sep 30 09:57:22 sipserver1 cdrtool[12948]: DebitBalance
>>>>> CallId=000d6570-880e0035-39c8f267-5c77e9d2 at 192.168.0.1
>>>>> From=87001 at mydomain.com.br To=sip:00551599998888 at mydomain.com.br<sip%3A00551599998888 at mydomain.com.br>Gateway=
>>>>> 127.0.0.1 Duration=11
>>>>> Sep 30 09:57:22 sipserver1 cdrtool[12948]: ConnectFee=0.00 Span=1
>>>>> Duration=60 DestId=55159 domain=mydomain.com.br Profile=551
>>>>> Period=weekday Rate=551 Interval=0-24 Cost=0.85/60 Price=0.8500
>>>>> Sep 30 09:57:22 sipserver1 cdrtool[12948]: Error: session
>>>>> 000d6570-880e0035-39c8f267-5c77e9d2 at 192.168.0.1 for
>>>>> 87001 at mydomain.com.br does not exist
>>>>>
>>>>>
>>>>> Thanks.
>>>>> Diego.
>>>>>
>>>>> ----- Original Message -----
>>>>> *From:* DanB <danb at sms4sip.com>
>>>>> *To:* Diego Zuaneti Arruda <diego at fasternet.com.br>
>>>>> *Cc:* users at lists.kamailio.org
>>>>> *Sent:* Tuesday, September 30, 2008 5:47 AM
>>>>> *Subject:* Re: [Kamailio-Users] Send MaxCallDuration and UserCredit
>>>>> for freeradius-cdrtool
>>>>>
>>>>> Hi Diego,
>>>>>
>>>>> you don't need to set anything in Users file. The connector does that
>>>>> for you dynamically, based on the responses received from cdrtool. Your
>>>>> configuration will be static and always limit the user to the same call
>>>>> duration. For more information, see the README file within
>>>>> freeradius-cdrtool source directory.
>>>>>
>>>>> Cheers,
>>>>> DanB
>>>>>
>>>>> On Mon, Sep 29, 2008 at 10:49 PM, Diego Zuaneti Arruda <
>>>>> diego at fasternet.com.br> wrote:
>>>>>
>>>>>>    Hi all,
>>>>>>
>>>>>>    How I send to freeradius-cdrtool the maxCallDuration and
>>>>>> UserCredit?
>>>>>>    On the /etc/raddb/users I have:
>>>>>>
>>>>>> 87001 at mydomain.com.br Auth-Type := Digest, User-Password ==
>>>>>> "mypassword"
>>>>>>         Reply-Message = "Authenticated",
>>>>>>         SIP-AVP = "authentic#1",
>>>>>>         SIP-AVP = "callMaxDur:60",
>>>>>>         SIP-AVP = "credit:25"
>>>>>>
>>>>>>    Is this correct ?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks.
>>>>>> Diego.
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Users mailing list
>>>>>> Users at lists.kamailio.org
>>>>>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20080930/3cf94b3e/attachment.htm>


More information about the sr-users mailing list