[Users] Exported statistics and pseudo-variables
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Mon Feb 26 20:00:40 CET 2007
Hi Michel,
that is because the syntax I sent you is for 1.2.0 (the testing
version). For 1.1.x it is a bit more complicated:
if ( avp_check("$DLG_count", "gt/i:3") ) {
}
regards,
bogdan
Michel Bensoussan wrote:
> Hi Bogdan
>
> I already try this but it's not working. I have the following error:
> 0(14679) parse error (122,16-17): syntax error
> 0(14679) parse error (122,16-17): bad command (!!!attention: from
> v1.0.0+ use 'return' instead of 'break'!!!)
> 0(14679) parse error (122,16-17): bad command (!!!attention: from
> v1.0.0+ use 'return' instead of 'break'!!!)
> 0(14679) parse error (122,17-18): bad command (!!!attention: from
> v1.0.0+ use 'return' instead of 'break'!!!)
> 0(14679) parse error (122,18-19): bad command (!!!attention: from
> v1.0.0+ use 'return' instead of 'break'!!!)
> 0(14679) parse error (122,20-21): bad command (!!!attention: from
> v1.0.0+ use 'return' instead of 'break'!!!)
> 0(14679) parse error (126,3-5): syntax error
> 0(14679) parse error (126,3-5):
> ERROR: bad config file (8 errors)
>
> when line 122 is
> if ($DLG_count>3) {
>
> May be I don't have the good version (I'm using stable release 1.1.1)?
> If this is the case which version of dialog should I use and can I
> just upgrade the dialog module or should I upgrade all the openSER?
>
> Regards,
> Michel.
>
>
> Bogdan-Andrei Iancu wrote:
>> Hi Michel,
>>
>> simple - just do in the script:
>>
>> if ($DLG_count>10) {
>> sl_send_reply("403","no more calls accepted");
>> exit;
>> }
>>
>> regards,
>> bogdan
>>
>> Michel Bensoussan wrote:
>>> Hello
>>> Sorry but I still don't understand how can I read a pseudo variable
>>> in the config file.
>>> I'm using release 1.1.1.
>>> How can I write: if (dlg_count > 10) ?
>>> I tried several syntaxes and exported functions using avpops but I
>>> can't get it.
>>> Thanks.
>>>
>>> Regards,
>>> Michel.
>>>
>>> Bogdan-Andrei Iancu wrote:
>>>> Hi Michel,
>>>>
>>>> the statistics are to be used from outside openser (via fifo or
>>>> xmlrpc for example) to get a glimpse inside openser. Pseudo
>>>> variables are used from script to provide information from SIP
>>>> messages or modules.
>>>>
>>>> so, use from script the PV $dlg_count exactly you suspected ;).
>>>>
>>>> regards,
>>>> bogdan
>>>>
>>>> Michel Bensoussan wrote:
>>>>> Hello
>>>>> I didn't understand how to use the exported statistics and the
>>>>> pseudo-variables.
>>>>> In module dialog, active_dialogs is an exported statistic and
>>>>> $dlg_count a pseudo variable.
>>>>> How can I get them in code and in cfg file?
>>>>> Can I write in cfg file something like: if ($dlg_count > 10){...}?
>>>>> (not in this way of course but that's the idea).
>>>>>
>>>>> Thanks,
>>>>> Michel.
>>>>>
>>>>> PS: I didn't understand the example in
>>>>> http://www.openser.org/dokuwiki/doku.php/pseudovariables:1.1.x
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>
More information about the sr-users
mailing list