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