Hello! I have an Asterisk@home instalation with 7 users working OK, and I'ld like to implement either a -- Web dial feature, where the user would fill one form field with a phone number and a connection would be created between his extention and the entered number. OR -- Dial using an URI (callto:xxxxx link in a web page), having AstTapi installed and configured in all workstations. Considering we spend all day manually dialing numbers from our database, one of those solutions would be GREAT ! The second solution should be easier but the windows dialer app just won't do... Thanks in advance M.G.
Michiel van Baak
2005-Jul-26 11:56 UTC
[Asterisk-Users] Dial using URI(web) or using FORM(web)
On 17:48, Tue 26 Jul 05, JunkMail wrote:> Hello! > > I have an Asterisk@home instalation with 7 users working OK, and I'ld like > to implement either a > -- Web dial feature, where the user would fill one form field with a phone > number and a connection would be created between his extention and the > entered number. > OR > -- Dial using an URI (callto:xxxxx link in a web page), having AstTapi > installed and configured in all workstations. > > Considering we spend all day manually dialing numbers from our database, one > of those solutions would be GREAT ! > The second solution should be easier but the windows dialer app just won't > do... > > Thanks in advance > > M.G.Hi, We have implemented something that looks like option 1 We have a webbased addressbook. As soon as you login the system will know your extension. When you click on a phonenr in the webapp it will connect to the manager API and originate a call for you. Your phone rings, you pick up, and the system calls the number. Works like a charm and never failed on us. If this is what you are looking for I can provide some more indepth info :))) -- Michiel van Baak http://michiel.vanbaak.info michiel@vanbaak.info GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7E0B9A2D "Why is it drug addicts and computer afficionados are both called users?"
Colin Anderson
2005-Jul-27 14:24 UTC
[Asterisk-Users] Dial using URI(web) or using FORM(web)
I am currently doing this in IIS/ASP, you can modify to your tastes. Prerequisites are SAMBA on the Asterisk server, a temp folder shared out in Samba that the anonymous IIS user has rights to, and a WATCH statement in /etc/rc.d/rc.local that will execute a batch file that chmod's the .CALL file so that it has rights to the file and moves it from the temp directory to the /var/spool/asterisk/outgoing directory every 2s: <% PhoneNumber=Request.Querystring("PhoneNumber") 'Can use request.form if posting a form Context=request.querystring("Context") 'or hardcode a context Extension=request.querystring("Extension") 'Extension to terminate the call to once the guy picks up PhonePrefix=Left(PhoneNumber,3) 'Determine the prefix If PhonePrefix="780" then 'My CLEC will not complete calls with a local area code, so strip out NumberToCall=Right(PhoneNumber,7) Else NumberToCall= "1" & PhoneNumber 'if it's not local, append a 1 in front of it for LD End If Randomize set fs = CreateObject("Scripting.FileSystemObject") set file = fs.CreateTextFile("\\<MyAsteriskServerIP>\outgoing\" & int(Rnd * 1000) & ".call", true, false) file.WriteLine("Channel: ZAP/g0/" & NumberToCall) 'Pick a line from group 0 file.WriteLine("SetVar: CALLINGPARTY=" & NumberToCall) 'Set variable so Asterisk can present the CallerID to the extension, reference as SetCallerID(${CALLINGPARTY}) in the context of the extension's phone file.WriteLine("CallerID: <MyCallerIDIWantToPresent>") file.WriteLine("MaxRetries: 2") file.WriteLine("RetryTime: 60") file.WriteLine("WaitTime: 60") file.WriteLine("Context: " & Context) file.WriteLine("Extension: " & Extension) file.WriteLine("Priority: 1") file.Close response.write "Call in progress, please wait..." 'or insert whatever HTML you want or response.redirect to whatever target page you want %> This file gets href'd as something like "http://foo.com/call.asp?PhoneNumber=1115551212&Context=from-pstn&Extension1000" Works like a hot damn. hth.