diff options
| -rw-r--r-- | cmessageman.cpp | 1 | ||||
| -rw-r--r-- | etc/synapse/asterisk.conf | 6 | ||||
| -rw-r--r-- | modules/asterisk.module/module.cpp | 19 | ||||
| -rw-r--r-- | modules/asterisk_marquee.module/module.cpp | 16 | ||||
| -rw-r--r-- | wwwdir/asterisk.html | 10 | ||||
| -rw-r--r-- | wwwdir/asterisk_admin.html | 2 |
6 files changed, 31 insertions, 23 deletions
diff --git a/cmessageman.cpp b/cmessageman.cpp index 36d881d..eba413f 100644 --- a/cmessageman.cpp +++ b/cmessageman.cpp @@ -286,6 +286,7 @@ void CmessageMan::sendMessage(const CmodulePtr &module, const CmsgPtr & msg, in } else { + //TODO: move mapping functionality back to modules. current implementation is kind of a hack and not compatible with future expantions in the no-broadcast branch. //when we're done send a special mapping message that shows us what is mapped. //used by the mapper GUI. CmsgPtr mappedMsg=CmsgPtr(new Cmsg()); diff --git a/etc/synapse/asterisk.conf b/etc/synapse/asterisk.conf index d2b1bbe..ba8f4c1 100644 --- a/etc/synapse/asterisk.conf +++ b/etc/synapse/asterisk.conf @@ -6,9 +6,9 @@ "password" :"f39tgvp095vcnek3" }, "datux":{ - "host" :"192.168.13.2", + "host" :"localhost", "port" :"5038", - "username" :"synapse", - "password" :"f39tgvp095vcnek3" + "username" :"manager", + "password" :"insecure" } } diff --git a/modules/asterisk.module/module.cpp b/modules/asterisk.module/module.cpp index a6f0d0b..60a28df 100644 --- a/modules/asterisk.module/module.cpp +++ b/modules/asterisk.module/module.cpp @@ -362,21 +362,20 @@ namespace asterisk if (isFiltered()) return(false); - Cmsg out; - out.event="asterisk_updateDevice"; - out.dst=forceDst; - out["id"]=id; - out["callerId"]=callerId; - out["callerIdName"]=callerIdName; - out["online"]=online; - out["trunk"]=trunk; - if (groupPtr!=NULL) { + Cmsg out; + out.event="asterisk_updateDevice"; + out.dst=forceDst; + out["id"]=id; + out["callerId"]=callerId; + out["callerIdName"]=callerIdName; + out["online"]=online; + out["trunk"]=trunk; out["groupId"]=groupPtr->getId(); + groupPtr->send(sessionMap,out); } - groupPtr->send(sessionMap,out); return(true); } diff --git a/modules/asterisk_marquee.module/module.cpp b/modules/asterisk_marquee.module/module.cpp index 1990422..abc8928 100644 --- a/modules/asterisk_marquee.module/module.cpp +++ b/modules/asterisk_marquee.module/module.cpp @@ -31,11 +31,19 @@ SYNAPSE_REGISTER(module_Init) out.clear(); out.event="core_LoadModule"; - out["path"]="modules/asterisk.module/libasterisk.so"; + out["name"]="marquee_m500"; out.send(); } -//TODO: load libmarquee in between + +SYNAPSE_REGISTER(marquee_m500_Ready) +{ + Cmsg out; + out.clear(); + out.event="core_LoadModule"; + out["name"]="asterisk"; + out.send(); +} SYNAPSE_REGISTER(asterisk_Ready) { @@ -129,7 +137,7 @@ void updateMarquee() } Cmsg out; out.event="marquee_Set"; - out["text"]="%C0"+text; + out["text"]="%S1%C0"+text; out.send(); } //nothing ringing, show active calls @@ -160,7 +168,7 @@ SYNAPSE_REGISTER(asterisk_authCall) { Cmsg out; out.event="marquee_Set"; - out["text"]="Call "+msg["number"].str() + " to login..."; + out["text"]="%S1Call "+msg["number"].str() + " to login..."; out.send(); } diff --git a/wwwdir/asterisk.html b/wwwdir/asterisk.html index af6d1b3..22dea49 100644 --- a/wwwdir/asterisk.html +++ b/wwwdir/asterisk.html @@ -17,7 +17,7 @@ </script> --> - <script type="text/javascript" src="synapse.js"></script> + <script type="text/javascript" src="synapse/synapse.js"></script> <script type="text/javascript"> @@ -56,8 +56,8 @@ loginDeviceId=msg["deviceId"]; //store the device and authcookie in a browser cookie, so the user doesnt have to relogin everytime. - $.setCookie('asterisk_authCookie',msg["authCookie"], {}); - $.setCookie('asterisk_deviceId',msg["deviceId"], {}); + $.setCookie('asterisk_authCookie',msg["authCookie"], {duration:365, path:"/"}); + $.setCookie('asterisk_deviceId',msg["deviceId"], {duration:365, path:"/"}); //request a refresh, to learn about all objects send(0,"asterisk_refresh", { @@ -106,6 +106,7 @@ else $('#deviceList').append(html); + } @@ -125,7 +126,6 @@ // $('#statusLoginUser').text(msg["callerId"]); // } - $(escapeId(msg["id"])+":hidden").slideDown(); }); @@ -142,6 +142,7 @@ synapse_register("asterisk_debugChannel",function(msg_src, msg_dst, msg_event, msg) { + //TODO: make it possible to disable debugging, its slow //add debug dom object? if ($(escapeId("debug_"+msg["id"])).length==0) { @@ -419,7 +420,6 @@ .device { - display: none; float: left; width: 20em; min-height: 3em; diff --git a/wwwdir/asterisk_admin.html b/wwwdir/asterisk_admin.html index 3e690a9..b79c0b4 100644 --- a/wwwdir/asterisk_admin.html +++ b/wwwdir/asterisk_admin.html @@ -6,7 +6,7 @@ <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <title>Asterisk admin page</title> - <script type="text/javascript" src="synapse.js"></script> + <script type="text/javascript" src="synapse/synapse.js"></script> <script type="text/javascript"> |

