[OpenSIPS-Users] Can I count the number of active calls in a particular time interval through opensips.

Surabhi Garg surabhi.garg at vvdntech.in
Mon Aug 1 14:45:37 CEST 2016


Hi Sasmita,

For this you can use Exported Pseudo Variable *"$DLG_Count"* of Dialog
Module in your OpenSIPS configuration file.



*Below is the sample snippet:*






*if (!has_totag() && is_method("INVITE")                         &&
$DLG_count > <max_threashold>) {                 send_reply("503", "Service
Unavailable");                 exit;}*
In above snippet, *max_threashold* you can replace with your desired limit.






*With Best Regards,Surabhi GargVVDN Technologies Pvt LtdCell : +91
<%2B91%209910100290>8130321886| Skype : surabhi.garg9*



On Mon, Aug 1, 2016 at 5:54 PM, Sasmita Panda <spanda at 3clogic.com> wrote:

> I am aware about the command . But I wanted to do something inside
> opensips script .
>
>         My aim is to do something like this . I wanted to count the total
> number of active call and ll compare that with a fixed value, if will
> become greater than this then I may drop the next call by sending some
> error code . Is this possible any way with dialog module ?
>
>       By the way , thanks for your quick reply .
>
>
> *Thanks & Regards*
> *Sasmita Panda*
> *Network Testing and Software Engineer*
> *3CLogic , ph:07827611765*
>
> On Mon, Aug 1, 2016 at 5:48 PM, Surabhi Garg <surabhi.garg at vvdntech.in>
> wrote:
>
>> Hi Sasmita,
>>
>> OpenSIPS dialog module provide exported statistics which could give you
>> 'Number of Current Active Dialogs' (at the instant command is fired).
>>
>>
>> *Below is the opensipsctl command to get active dialog statistics:*
>> <opensips_install_dir>/opensipsctl fifo get_statistics active_dialogs
>>
>> In case you require active dialogs in a particular interval of time I
>> would suggest that you could make either some script or some program which
>> calculates the data fetched using above command.
>>
>> For instance; will give you required statistics
>> (active dialog at timestamp X) - (active dialog at timestamp Y); where X
>> > Y.
>>
>> Hope that helps.
>>
>>
>>
>>
>>
>> *With Best Regards,Surabhi GargCell : +91
>> <%2B91%209910100290>8130321886| Skype : surabhi.garg9*
>>
>>
>>
>> On Mon, Aug 1, 2016 at 5:15 PM, Sasmita Panda <spanda at 3clogic.com> wrote:
>>
>>> Hi All ,
>>>
>>>         We are facing some network bandwidth when there is high load in
>>> the opensips server . And that time some of the calls getting dropped .
>>>
>>>       Is there any module in opensips which  can give me the active call
>>> count in a perticualr interval of time and it may get updated automatically
>>> . So that I may set some alert when the load become maximum .
>>>
>>>       If I can get the call count basing on a particular user agent then
>>> also I will be helpful .
>>>
>>>      I have gone through "*statistics module*" . I am not sure but I
>>> think this is possible using this module . If there is any other way then
>>> let me know .
>>>
>>>       Thanks in advance for any type of help .
>>>
>>> *Thanks & Regards*
>>> *Sasmita Panda*
>>> *Network Testing and Software Engineer*
>>> *3CLogic , ph:07827611765*
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160801/6e312c8c/attachment.htm>


More information about the Users mailing list