[Asterisk-Users] Version 0.80 of IPS released

Adam Goryachev mailinglists at websitemanagers.com.au
Tue Apr 12 16:59:15 MST 2005


On Tue, 2005-04-12 at 20:15 +0200, Thorben Jensen wrote:
> | Some others, would it be possible to pass a message to a phone (onto the
> | display) ???
> | 
> | 
> | bye
> | 
> | Ronald
> 
> Hi Ronald,
> 
> Good idea, any ideas on how to do that? I think it would depend a lot on the
> phone being used.
> 
> Thanks for your interest in IPS.

This was the reason I wrote the SetVar patch for the manager interface.
You can set a variable name, and also cause that (the setvar) to be sent
as a manager event to all other manager's...

ie, you don't support it on the phone, but as a screen pop when the call
comes in.

I think perhaps the entire patch wasn't included...
here is the extra portion which I last applied to my CVS Stable version:
diff -urN asterisk/manager.c asterisk.mine/manager.c
--- asterisk/manager.c  2005-02-27 13:14:15.000000000 +1100
+++ asterisk.mine/manager.c     2005-03-30 00:05:39.000000000 +1000
@@ -588,6 +588,7 @@
         char *name = astman_get_header(m, "Channel");
         char *varname = astman_get_header(m, "Variable");
         char *varval = astman_get_header(m, "Value");
+       char *event = astman_get_header(m, "Event");

        if (!strlen(name)) {
                astman_send_error(s, m, "No channel specified");
@@ -614,6 +615,13 @@
        pbx_builtin_setvar_helper(c,varname,varval);

        ast_mutex_unlock(&c->lock);
+
+       if(*event == '1')
+       {
+               manager_event(EVENT_FLAG_CALL, "Setvar",
+                               "Channel: %s\r\nVariable: %s\r\nValue: %
s\r\nUniqueid: %s\r\n",
+                               c->name, varname, varval, c->uniqueid);
+       }
        astman_send_ack(s, m, "Variable Set");
        return 0;
 }

Obviously, this adds the ability to have your setvar command be sent as
an event to the other manager's....

Regards,
Adam

-- 
 -- 
Adam Goryachev
Website Managers
Ph:  +61 2 8304 0000                        adam at websitemanagers.com.au
Fax: +61 2 9345 4396                        www.websitemanagers.com.au




More information about the asterisk-users mailing list