<div dir="ltr">I know many people run/use a PBX of some sort, and I figured I'd share what I discovered:<div>I have a mobile phone that gets a lot of calls directly, but I wanted to log those calls to a CRM.</div><div>
<br></div><div>This is a partial solution.. Android Notifier (<a href="http://code.google.com/p/android-notifier/">http://code.google.com/p/android-notifier/</a>) is an app that can be installed on the android and send a UDP message to a server (or also to a desktop client) when calls come in. The desktop client can launch a website to pull data for a screen pop of some sort....</div>
<div>It seemed to sometimes lose sync (when wifi went off and then came back..) but it's got the last 10 messages or so.</div><div><br></div><div>I have it send to UDP, and this small node.js script saves the time-stamped messages to a file. (Note: timestamp is in milliseconds..)</div>
<div><br></div><div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
//<a href="http://code.google.com/p/android-notifier/wiki/NotificationProtocol">http://code.google.com/p/android-notifier/wiki/NotificationProtocol</a><br>//DEVICE_ID/NOTIFICATION_ID/EVENT_TYPE/EVENT_CONTENTS<br>var fs = require('fs');<br>
var log = fs.createWriteStream("incoming_call_log.txt", {'flags': 'a'} );<br>var dgram = require("dgram");<br>var server = dgram.createSocket("udp4");<br>server.on("message", function (msg, rinfo) {<br>
// console.log("server got: " + msg + " from " + rinfo.address + ":" + rinfo.port);<br>// console.log("Got: " + Date.now() + "/" + rinfo.address +"/" + rinfo.port + "/" + msg);<br>
log.write(Date.now() + "/" + rinfo.address +"/" + rinfo.port + "/" + msg + "\n");<br>});<br>server.on("listening", function () {<br> var address = server.address();<br>
console.log("server listening " + address.address + ":" + address.port);<br>});<br>server.bind(10600, "YOUR IP");</blockquote><div><br></div><div>And you can background and disown it, so it stays running.. after you launch node.js.</div>
<div>Due to the abnormal method of submitting - not HTTP - I didn't know how to write anything in another language to do this. I suppose you could do it with python twisted.</div><div><br></div><div>And for a screenpop.. set the desktop notifier to launch:</div>
<div>/home/folder/web.sh "deviceId={deviceId}&id={id}&type={type}&data={data}"</div><div><br></div><div>web.sh contains:</div><div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
#!/bin/bash<br>echo "$*"; #>> /tmp/websh.log; #logging...<br>var=$*<br>/usr/bin/chromium-browser "<a href="http://website.com/script.php?$var">http://website.com/script.php?$var</a>"</blockquote>
</div><div><br></div><div>Anyway, this is just the basics. Feel free to share how you integrate it.</div><div>I didn't see the specs on how to decrypt the signal algorithimically, but it's part of the desktop app.</div>
<div><br></div><div dir="ltr"><span style="font-family:Verdana, Arial, Helvetica, sans-serif"><span style="font-size:small">-Avi Marcus</span></span></div>
</div></div>