How to get call duration ( AcctSessionTime ) in OPENSIPS

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get call duration ( AcctSessionTime ) in OPENSIPS

Tao Vu Hoang
Hi All!

     I configure Opensips send Accounting to Steel Belt Radius 4, but i
can't get call duration time ( AcctSessionTime ) , i don't know variable
of opensips container call duration time to definition in file :
opensips.cfg like this :
             modparam("acc", "aaa_extra",       "User-Name=$Au; \
                                        Calling-Station-Id=$from; \
                                        Called-Station-Id=$to; \
                                        Sip-Translated-Request-URI=$ru; \
                                        Sip-RPid=$avp(s:rpid); \
                                        Source-IP=$avp(s:source_ip); \
                                        Source-Port=$avp(s:source_port); \
                                        SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
                                        Canonical-URI=$avp(s:can_uri); \

Billing-Party=$avp(s:billing_party); \

Divert-Reason=$avp(s:divert_reason); \
                                        User-Agent=$hdr(user-agent); \
                                        Contact=$hdr(contact); \
                                        Event=$hdr(event); \
                                        ENUM-TLD=$avp(s:enum_tld)")

    I use Opensips 1.6.3 to use function :
get_dialog_info("start_time","$avp(s:starttime)","callid","$ci");
to get Startime&  Stoptime of one Call from table DIALOG in database
OPENIPS  but don't success, maybe i don't know how to use it.
     I also use module : EXEC to get  Starttime&  Stoptime  from
external cammand but don't success.
Can someone help me ?  Or recommend me how to get  call duaration
(AcctSessionTime).
Thanks a lot.



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to get call duration ( AcctSessionTime ) in OPENSIPS

Bogdan-Andrei Iancu
Hi Tao,

the accounting in opensips is transaction based and not call base -
which means opensips will generate (for each call) a START and STOP acc
events (when the call starts and when the call ends).

There is no variable to automatically provide the call duration (as
there is no call state) - each acc event has its own timestamp, so the
RADIUS server can calculate the duration based on the INVITE and BYE
timestamps.

Regards,
Bogdan

Tao Vu Hoang wrote:

> Hi All!
>
>      I configure Opensips send Accounting to Steel Belt Radius 4, but i
> can't get call duration time ( AcctSessionTime ) , i don't know variable
> of opensips container call duration time to definition in file :
> opensips.cfg like this :
>              modparam("acc", "aaa_extra",       "User-Name=$Au; \
>                                         Calling-Station-Id=$from; \
>                                         Called-Station-Id=$to; \
>                                         Sip-Translated-Request-URI=$ru; \
>                                         Sip-RPid=$avp(s:rpid); \
>                                         Source-IP=$avp(s:source_ip); \
>                                         Source-Port=$avp(s:source_port); \
>                                         SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
>                                         Canonical-URI=$avp(s:can_uri); \
>
> Billing-Party=$avp(s:billing_party); \
>
> Divert-Reason=$avp(s:divert_reason); \
>                                         User-Agent=$hdr(user-agent); \
>                                         Contact=$hdr(contact); \
>                                         Event=$hdr(event); \
>                                         ENUM-TLD=$avp(s:enum_tld)")
>
>     I use Opensips 1.6.3 to use function :
> get_dialog_info("start_time","$avp(s:starttime)","callid","$ci");
> to get Startime&  Stoptime of one Call from table DIALOG in database
> OPENIPS  but don't success, maybe i don't know how to use it.
>      I also use module : EXEC to get  Starttime&  Stoptime  from
> external cammand but don't success.
> Can someone help me ?  Or recommend me how to get  call duaration
> (AcctSessionTime).
> Thanks a lot.
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  


--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to get call duration ( AcctSessionTime ) in OPENSIPS

Alex Massover
Hi,

$DLG_lifetime will not work?

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Bogdan-Andrei Iancu
Sent: Tuesday, August 10, 2010 1:17 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] How to get call duration ( AcctSessionTime ) in OPENSIPS

Hi Tao,

the accounting in opensips is transaction based and not call base -
which means opensips will generate (for each call) a START and STOP acc
events (when the call starts and when the call ends).

There is no variable to automatically provide the call duration (as
there is no call state) - each acc event has its own timestamp, so the
RADIUS server can calculate the duration based on the INVITE and BYE
timestamps.

Regards,
Bogdan

Tao Vu Hoang wrote:

> Hi All!
>
>      I configure Opensips send Accounting to Steel Belt Radius 4, but i
> can't get call duration time ( AcctSessionTime ) , i don't know variable
> of opensips container call duration time to definition in file :
> opensips.cfg like this :
>              modparam("acc", "aaa_extra",       "User-Name=$Au; \
>                                         Calling-Station-Id=$from; \
>                                         Called-Station-Id=$to; \
>                                         Sip-Translated-Request-URI=$ru; \
>                                         Sip-RPid=$avp(s:rpid); \
>                                         Source-IP=$avp(s:source_ip); \
>                                         Source-Port=$avp(s:source_port); \
>                                         SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
>                                         Canonical-URI=$avp(s:can_uri); \
>
> Billing-Party=$avp(s:billing_party); \
>
> Divert-Reason=$avp(s:divert_reason); \
>                                         User-Agent=$hdr(user-agent); \
>                                         Contact=$hdr(contact); \
>                                         Event=$hdr(event); \
>                                         ENUM-TLD=$avp(s:enum_tld)")
>
>     I use Opensips 1.6.3 to use function :
> get_dialog_info("start_time","$avp(s:starttime)","callid","$ci");
> to get Startime&  Stoptime of one Call from table DIALOG in database
> OPENIPS  but don't success, maybe i don't know how to use it.
>      I also use module : EXEC to get  Starttime&  Stoptime  from
> external cammand but don't success.
> Can someone help me ?  Or recommend me how to get  call duaration
> (AcctSessionTime).
> Thanks a lot.
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  


--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

This mail was received via Mail-SeCure System.



This mail was sent via Mail-SeCure System.
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to get call duration ( AcctSessionTime ) in OPENSIPS

Matthew Lehner
$DLG_lifetime is actually the number of seconds before the dialog will
timeout, or something along those lines. I also thought it might be
the actual session duration.

Matt

On Tue, Aug 10, 2010 at 8:26 AM, Alex Massover <[hidden email]> wrote:

> Hi,
>
> $DLG_lifetime will not work?
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Bogdan-Andrei Iancu
> Sent: Tuesday, August 10, 2010 1:17 PM
> To: OpenSIPS users mailling list
> Subject: Re: [OpenSIPS-Users] How to get call duration ( AcctSessionTime ) in OPENSIPS
>
> Hi Tao,
>
> the accounting in opensips is transaction based and not call base -
> which means opensips will generate (for each call) a START and STOP acc
> events (when the call starts and when the call ends).
>
> There is no variable to automatically provide the call duration (as
> there is no call state) - each acc event has its own timestamp, so the
> RADIUS server can calculate the duration based on the INVITE and BYE
> timestamps.
>
> Regards,
> Bogdan
>
> Tao Vu Hoang wrote:
>> Hi All!
>>
>>      I configure Opensips send Accounting to Steel Belt Radius 4, but i
>> can't get call duration time ( AcctSessionTime ) , i don't know variable
>> of opensips container call duration time to definition in file :
>> opensips.cfg like this :
>>              modparam("acc", "aaa_extra",       "User-Name=$Au; \
>>                                         Calling-Station-Id=$from; \
>>                                         Called-Station-Id=$to; \
>>                                         Sip-Translated-Request-URI=$ru; \
>>                                         Sip-RPid=$avp(s:rpid); \
>>                                         Source-IP=$avp(s:source_ip); \
>>                                         Source-Port=$avp(s:source_port); \
>>                                         SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
>>                                         Canonical-URI=$avp(s:can_uri); \
>>
>> Billing-Party=$avp(s:billing_party); \
>>
>> Divert-Reason=$avp(s:divert_reason); \
>>                                         User-Agent=$hdr(user-agent); \
>>                                         Contact=$hdr(contact); \
>>                                         Event=$hdr(event); \
>>                                         ENUM-TLD=$avp(s:enum_tld)")
>>
>>     I use Opensips 1.6.3 to use function :
>> get_dialog_info("start_time","$avp(s:starttime)","callid","$ci");
>> to get Startime&  Stoptime of one Call from table DIALOG in database
>> OPENIPS  but don't success, maybe i don't know how to use it.
>>      I also use module : EXEC to get  Starttime&  Stoptime  from
>> external cammand but don't success.
>> Can someone help me ?  Or recommend me how to get  call duaration
>> (AcctSessionTime).
>> Thanks a lot.
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS Bootcamp
> 20 - 24 September 2010, Frankfurt, Germany
> www.voice-system.ro
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> This mail was received via Mail-SeCure System.
>
>
>
> This mail was sent via Mail-SeCure System.
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to get call duration ( AcctSessionTime ) in OPENSIPS

Bogdan-Andrei Iancu
In reply to this post by Alex Massover
Hi Alex,

Of course, if you use the dialog support - anyhow, we have a ready patch
for acc module to do accounting based on dialog support (directly CDRs).

Regards,
Bogdan

Alex Massover wrote:

> Hi,
>
> $DLG_lifetime will not work?
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Bogdan-Andrei Iancu
> Sent: Tuesday, August 10, 2010 1:17 PM
> To: OpenSIPS users mailling list
> Subject: Re: [OpenSIPS-Users] How to get call duration ( AcctSessionTime ) in OPENSIPS
>
> Hi Tao,
>
> the accounting in opensips is transaction based and not call base -
> which means opensips will generate (for each call) a START and STOP acc
> events (when the call starts and when the call ends).
>
> There is no variable to automatically provide the call duration (as
> there is no call state) - each acc event has its own timestamp, so the
> RADIUS server can calculate the duration based on the INVITE and BYE
> timestamps.
>
> Regards,
> Bogdan
>
> Tao Vu Hoang wrote:
>  
>> Hi All!
>>
>>      I configure Opensips send Accounting to Steel Belt Radius 4, but i
>> can't get call duration time ( AcctSessionTime ) , i don't know variable
>> of opensips container call duration time to definition in file :
>> opensips.cfg like this :
>>              modparam("acc", "aaa_extra",       "User-Name=$Au; \
>>                                         Calling-Station-Id=$from; \
>>                                         Called-Station-Id=$to; \
>>                                         Sip-Translated-Request-URI=$ru; \
>>                                         Sip-RPid=$avp(s:rpid); \
>>                                         Source-IP=$avp(s:source_ip); \
>>                                         Source-Port=$avp(s:source_port); \
>>                                         SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
>>                                         Canonical-URI=$avp(s:can_uri); \
>>
>> Billing-Party=$avp(s:billing_party); \
>>
>> Divert-Reason=$avp(s:divert_reason); \
>>                                         User-Agent=$hdr(user-agent); \
>>                                         Contact=$hdr(contact); \
>>                                         Event=$hdr(event); \
>>                                         ENUM-TLD=$avp(s:enum_tld)")
>>
>>     I use Opensips 1.6.3 to use function :
>> get_dialog_info("start_time","$avp(s:starttime)","callid","$ci");
>> to get Startime&  Stoptime of one Call from table DIALOG in database
>> OPENIPS  but don't success, maybe i don't know how to use it.
>>      I also use module : EXEC to get  Starttime&  Stoptime  from
>> external cammand but don't success.
>> Can someone help me ?  Or recommend me how to get  call duaration
>> (AcctSessionTime).
>> Thanks a lot.
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>  
>>    
>
>
>  


--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to get call duration ( AcctSessionTime ) in OPENSIPS

Bogdan-Andrei Iancu
In reply to this post by Matthew Lehner
Hi Matt,

not at all , $DLG_lifetime returns the time passed since the dialog was
established -> at BYE time, it will return the dialog duration.

Regards,
Bogdan


Matt lehner wrote:

> $DLG_lifetime is actually the number of seconds before the dialog will
> timeout, or something along those lines. I also thought it might be
> the actual session duration.
>
> Matt
>
> On Tue, Aug 10, 2010 at 8:26 AM, Alex Massover <[hidden email]> wrote:
>  
>> Hi,
>>
>> $DLG_lifetime will not work?
>>
>> -----Original Message-----
>> From: [hidden email] [mailto:[hidden email]] On Behalf Of Bogdan-Andrei Iancu
>> Sent: Tuesday, August 10, 2010 1:17 PM
>> To: OpenSIPS users mailling list
>> Subject: Re: [OpenSIPS-Users] How to get call duration ( AcctSessionTime ) in OPENSIPS
>>
>> Hi Tao,
>>
>> the accounting in opensips is transaction based and not call base -
>> which means opensips will generate (for each call) a START and STOP acc
>> events (when the call starts and when the call ends).
>>
>> There is no variable to automatically provide the call duration (as
>> there is no call state) - each acc event has its own timestamp, so the
>> RADIUS server can calculate the duration based on the INVITE and BYE
>> timestamps.
>>
>> Regards,
>> Bogdan
>>
>> Tao Vu Hoang wrote:
>>    
>>> Hi All!
>>>
>>>      I configure Opensips send Accounting to Steel Belt Radius 4, but i
>>> can't get call duration time ( AcctSessionTime ) , i don't know variable
>>> of opensips container call duration time to definition in file :
>>> opensips.cfg like this :
>>>              modparam("acc", "aaa_extra",       "User-Name=$Au; \
>>>                                         Calling-Station-Id=$from; \
>>>                                         Called-Station-Id=$to; \
>>>                                         Sip-Translated-Request-URI=$ru; \
>>>                                         Sip-RPid=$avp(s:rpid); \
>>>                                         Source-IP=$avp(s:source_ip); \
>>>                                         Source-Port=$avp(s:source_port); \
>>>                                         SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
>>>                                         Canonical-URI=$avp(s:can_uri); \
>>>
>>> Billing-Party=$avp(s:billing_party); \
>>>
>>> Divert-Reason=$avp(s:divert_reason); \
>>>                                         User-Agent=$hdr(user-agent); \
>>>                                         Contact=$hdr(contact); \
>>>                                         Event=$hdr(event); \
>>>                                         ENUM-TLD=$avp(s:enum_tld)")
>>>
>>>     I use Opensips 1.6.3 to use function :
>>> get_dialog_info("start_time","$avp(s:starttime)","callid","$ci");
>>> to get Startime&  Stoptime of one Call from table DIALOG in database
>>> OPENIPS  but don't success, maybe i don't know how to use it.
>>>      I also use module : EXEC to get  Starttime&  Stoptime  from
>>> external cammand but don't success.
>>> Can someone help me ?  Or recommend me how to get  call duaration
>>> (AcctSessionTime).
>>> Thanks a lot.
>>>
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>      
>> --
>> Bogdan-Andrei Iancu
>> OpenSIPS Bootcamp
>> 20 - 24 September 2010, Frankfurt, Germany
>> www.voice-system.ro
>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>> This mail was received via Mail-SeCure System.
>>
>>
>>
>> This mail was sent via Mail-SeCure System.
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>    
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  


--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to get call duration ( AcctSessionTime ) in OPENSIPS

Matthew Lehner
I will have to look at this again. This was not the result I saw when
playing with dialog for doing accounting. $DLG_liftime always showed a
timeout value. I actually wrote my own module to do accounting using
hooks from the dialog module.

Matt

On Tue, Aug 10, 2010 at 8:58 AM, Bogdan-Andrei Iancu
<[hidden email]> wrote:

> Hi Matt,
>
> not at all , $DLG_lifetime returns the time passed since the dialog was
> established -> at BYE time, it will return the dialog duration.
>
> Regards,
> Bogdan
>
>
> Matt lehner wrote:
>> $DLG_lifetime is actually the number of seconds before the dialog will
>> timeout, or something along those lines. I also thought it might be
>> the actual session duration.
>>
>> Matt
>>
>> On Tue, Aug 10, 2010 at 8:26 AM, Alex Massover <[hidden email]> wrote:
>>
>>> Hi,
>>>
>>> $DLG_lifetime will not work?
>>>
>>> -----Original Message-----
>>> From: [hidden email] [mailto:[hidden email]] On Behalf Of Bogdan-Andrei Iancu
>>> Sent: Tuesday, August 10, 2010 1:17 PM
>>> To: OpenSIPS users mailling list
>>> Subject: Re: [OpenSIPS-Users] How to get call duration ( AcctSessionTime ) in OPENSIPS
>>>
>>> Hi Tao,
>>>
>>> the accounting in opensips is transaction based and not call base -
>>> which means opensips will generate (for each call) a START and STOP acc
>>> events (when the call starts and when the call ends).
>>>
>>> There is no variable to automatically provide the call duration (as
>>> there is no call state) - each acc event has its own timestamp, so the
>>> RADIUS server can calculate the duration based on the INVITE and BYE
>>> timestamps.
>>>
>>> Regards,
>>> Bogdan
>>>
>>> Tao Vu Hoang wrote:
>>>
>>>> Hi All!
>>>>
>>>>      I configure Opensips send Accounting to Steel Belt Radius 4, but i
>>>> can't get call duration time ( AcctSessionTime ) , i don't know variable
>>>> of opensips container call duration time to definition in file :
>>>> opensips.cfg like this :
>>>>              modparam("acc", "aaa_extra",       "User-Name=$Au; \
>>>>                                         Calling-Station-Id=$from; \
>>>>                                         Called-Station-Id=$to; \
>>>>                                         Sip-Translated-Request-URI=$ru; \
>>>>                                         Sip-RPid=$avp(s:rpid); \
>>>>                                         Source-IP=$avp(s:source_ip); \
>>>>                                         Source-Port=$avp(s:source_port); \
>>>>                                         SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
>>>>                                         Canonical-URI=$avp(s:can_uri); \
>>>>
>>>> Billing-Party=$avp(s:billing_party); \
>>>>
>>>> Divert-Reason=$avp(s:divert_reason); \
>>>>                                         User-Agent=$hdr(user-agent); \
>>>>                                         Contact=$hdr(contact); \
>>>>                                         Event=$hdr(event); \
>>>>                                         ENUM-TLD=$avp(s:enum_tld)")
>>>>
>>>>     I use Opensips 1.6.3 to use function :
>>>> get_dialog_info("start_time","$avp(s:starttime)","callid","$ci");
>>>> to get Startime&  Stoptime of one Call from table DIALOG in database
>>>> OPENIPS  but don't success, maybe i don't know how to use it.
>>>>      I also use module : EXEC to get  Starttime&  Stoptime  from
>>>> external cammand but don't success.
>>>> Can someone help me ?  Or recommend me how to get  call duaration
>>>> (AcctSessionTime).
>>>> Thanks a lot.
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> [hidden email]
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>>
>>> --
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Bootcamp
>>> 20 - 24 September 2010, Frankfurt, Germany
>>> www.voice-system.ro
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>> This mail was received via Mail-SeCure System.
>>>
>>>
>>>
>>> This mail was sent via Mail-SeCure System.
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS Bootcamp
> 20 - 24 September 2010, Frankfurt, Germany
> www.voice-system.ro
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to get call duration ( AcctSessionTime ) in OPENSIPS

Brett Nemeroff
In reply to this post by Bogdan-Andrei Iancu

On Tue, Aug 10, 2010 at 7:57 AM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Alex,

Of course, if you use the dialog support - anyhow, we have a ready patch
for acc module to do accounting based on dialog support (directly CDRs).

Regards,
Bogdan


 Bogdan,
When can we see that? I've been anxiously hoping to see it. :) Can I add custom avps? :) :)
-Brett

 

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to get call duration ( AcctSessionTime ) in OPENSIPS

Bogdan-Andrei Iancu
In reply to this post by Matthew Lehner
Matt,

I was looking at the code and the  $DLG_lifetime return the difference
between the current time and the "start_time" (which the moment when the
dialog was confirmed with 200 OK ).

Regards,
bogdan

Matt lehner wrote:

> I will have to look at this again. This was not the result I saw when
> playing with dialog for doing accounting. $DLG_liftime always showed a
> timeout value. I actually wrote my own module to do accounting using
> hooks from the dialog module.
>
> Matt
>
> On Tue, Aug 10, 2010 at 8:58 AM, Bogdan-Andrei Iancu
> <[hidden email]> wrote:
>  
>> Hi Matt,
>>
>> not at all , $DLG_lifetime returns the time passed since the dialog was
>> established -> at BYE time, it will return the dialog duration.
>>
>> Regards,
>> Bogdan
>>
>>
>> Matt lehner wrote:
>>    
>>> $DLG_lifetime is actually the number of seconds before the dialog will
>>> timeout, or something along those lines. I also thought it might be
>>> the actual session duration.
>>>
>>> Matt
>>>
>>> On Tue, Aug 10, 2010 at 8:26 AM, Alex Massover <[hidden email]> wrote:
>>>
>>>      
>>>> Hi,
>>>>
>>>> $DLG_lifetime will not work?
>>>>
>>>> -----Original Message-----
>>>> From: [hidden email] [mailto:[hidden email]] On Behalf Of Bogdan-Andrei Iancu
>>>> Sent: Tuesday, August 10, 2010 1:17 PM
>>>> To: OpenSIPS users mailling list
>>>> Subject: Re: [OpenSIPS-Users] How to get call duration ( AcctSessionTime ) in OPENSIPS
>>>>
>>>> Hi Tao,
>>>>
>>>> the accounting in opensips is transaction based and not call base -
>>>> which means opensips will generate (for each call) a START and STOP acc
>>>> events (when the call starts and when the call ends).
>>>>
>>>> There is no variable to automatically provide the call duration (as
>>>> there is no call state) - each acc event has its own timestamp, so the
>>>> RADIUS server can calculate the duration based on the INVITE and BYE
>>>> timestamps.
>>>>
>>>> Regards,
>>>> Bogdan
>>>>
>>>> Tao Vu Hoang wrote:
>>>>
>>>>        
>>>>> Hi All!
>>>>>
>>>>>      I configure Opensips send Accounting to Steel Belt Radius 4, but i
>>>>> can't get call duration time ( AcctSessionTime ) , i don't know variable
>>>>> of opensips container call duration time to definition in file :
>>>>> opensips.cfg like this :
>>>>>              modparam("acc", "aaa_extra",       "User-Name=$Au; \
>>>>>                                         Calling-Station-Id=$from; \
>>>>>                                         Called-Station-Id=$to; \
>>>>>                                         Sip-Translated-Request-URI=$ru; \
>>>>>                                         Sip-RPid=$avp(s:rpid); \
>>>>>                                         Source-IP=$avp(s:source_ip); \
>>>>>                                         Source-Port=$avp(s:source_port); \
>>>>>                                         SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
>>>>>                                         Canonical-URI=$avp(s:can_uri); \
>>>>>
>>>>> Billing-Party=$avp(s:billing_party); \
>>>>>
>>>>> Divert-Reason=$avp(s:divert_reason); \
>>>>>                                         User-Agent=$hdr(user-agent); \
>>>>>                                         Contact=$hdr(contact); \
>>>>>                                         Event=$hdr(event); \
>>>>>                                         ENUM-TLD=$avp(s:enum_tld)")
>>>>>
>>>>>     I use Opensips 1.6.3 to use function :
>>>>> get_dialog_info("start_time","$avp(s:starttime)","callid","$ci");
>>>>> to get Startime&  Stoptime of one Call from table DIALOG in database
>>>>> OPENIPS  but don't success, maybe i don't know how to use it.
>>>>>      I also use module : EXEC to get  Starttime&  Stoptime  from
>>>>> external cammand but don't success.
>>>>> Can someone help me ?  Or recommend me how to get  call duaration
>>>>> (AcctSessionTime).
>>>>> Thanks a lot.
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> [hidden email]
>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>>
>>>>>
>>>>>
>>>>>          
>>>> --
>>>> Bogdan-Andrei Iancu
>>>> OpenSIPS Bootcamp
>>>> 20 - 24 September 2010, Frankfurt, Germany
>>>> www.voice-system.ro
>>>>
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> [hidden email]
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>> This mail was received via Mail-SeCure System.
>>>>
>>>>
>>>>
>>>> This mail was sent via Mail-SeCure System.
>>>> _______________________________________________
>>>> Users mailing list
>>>> [hidden email]
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>>        
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>      
>> --
>> Bogdan-Andrei Iancu
>> OpenSIPS Bootcamp
>> 20 - 24 September 2010, Frankfurt, Germany
>> www.voice-system.ro
>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>    
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  


--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to get call duration ( AcctSessionTime ) in OPENSIPS

Bogdan-Andrei Iancu
In reply to this post by Brett Nemeroff
Brett Nemeroff wrote:

>
> On Tue, Aug 10, 2010 at 7:57 AM, Bogdan-Andrei Iancu
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi Alex,
>
>     Of course, if you use the dialog support - anyhow, we have a ready
>     patch
>     for acc module to do accounting based on dialog support (directly
>     CDRs).
>
>     Regards,
>     Bogdan
>
>
>  Bogdan,
> When can we see that? I've been anxiously hoping to see it. :) Can I
> add custom avps? :) :)
Next days and yes, you can do extra_acc :)

Regards,
Bogdan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users