Yate Community Forum
General Category => Yate users hangout place => Topic started by: jamie on February 01, 2015, 04:26:55 PM
-
Hi,
Please could someone help me ?
I'm not convinced this make sense to have or should be possible , but ....
a) Is it ok to install a handler from within a global script ?
For example:
Yate::Install("chan.notify",100,"targetid",$chan_id );
b) If yes, how would you Uninstall it without perhaps uninstalling all e.g chan.notify handlers ?
For Example:
Yate::Uninstall("chan.notify");
Would this not uninstall everything ? How does it know which filter ?
Looking at libyate.php, it doesn't look as though it's implemented:
/**
* Uninstall a Yate message handler
* @param $name Name of the messages to stop handling
*/
static function Uninstall($name)
{
$name=Yate::Escape($name);
_yate_print("%%>uninstall:$name\n");
}
or directly from an Ext module...
Keyword: %%>uninstall
%%>uninstall:<name>
Direction: Application to engine
Thank you!
-
Hi,
You can't install same handler for different filters in the same script. You would need to install
Yate::Install("chan.notify",100)
and then from the script you would keep an additional structure that adds/removes $chan_ids that you are interested in.
-
Hi Monica,
I thought that would be the case.
Thank you !