Author Topic: Uninstalling msg handlers that were Installed with Filters (Windows Global Scr )  (Read 7141 times)

jamie

  • Newbie
  • *
  • Posts: 38
    • View Profile

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:


Code: [Select]
    /**
     * 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!

Monica Tepelus

  • Administrator
  • Full Member
  • *****
  • Posts: 198
    • View Profile
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.

jamie

  • Newbie
  • *
  • Posts: 38
    • View Profile

Hi Monica,

I thought that would be the case.

Thank you !