file is created you must place it in your web directory on the server.<br> <br> I chained the command and also wrote the output to an xml file in the web directory. The command looks like this:<br> <br> ‘php /etc/asterisk/directory.php.txt > /var/www/html/directory.xml’<br> <br> <b><span style=3D'font-weight:bold'>System Speeddials using Services Button</span></b> <br> <br> For speed dials I modified the php code to look to a specific file in the asterisk directory called speeddials.conf. This file only contains attributes that the php script will look for. This is great because you only need to specify the number and name fields. Below is my example of speeddial.php.txt (php code) and speeddials.conf (speed dials):<br> <br> <i><span style=3D'font-style:italic'>Speeddial.php.txt<br> </span></i><?<br> header("Content-type: text/xml");<br> header("Connection: close");<br> header("Expires: -1");<br> <br> // location of asterisk config files<br> $location =3D "/etc/asterisk/";<br> $dirname =3D "System Speed Dial";<br> <br> // parse speeddials.conf<br> $ssd_array =3D parse_ini_file($location."speeddials.conf", true);<br> while ($v =3D current($ssd_array))<br> { if (isset($v['name']))<br> { $directory[] =3D "<Name>". $v['name']."</Name>\n".<br> "<Telephone>".key($ssd_array)."</Telephone>\n";<br> }<br> next($ssd_array);<br> }<br> <br> sort ($directory);<br> <br> echo "<CiscoIPPhoneDirectory>\n";<br> echo "<Title>".$dirname."</Title>\n";<br> foreach ($directory as $v) {<br> echo "\n<DirectoryEntry>\n";<br> echo $v;<br> echo "</DirectoryEntry>\n";<br> }<br> echo "\n<Prompt>Choose Name and Press Dial</Prompt>\n";<br> echo "</CiscoIPPhoneDirectory>\n";<br> ?><br> <br> <br> <i><span style=3D'font-style:italic'>Speeddials.conf<br> </span></i>;System Speed Dial File<br> ;This is used in conjuction with speeddial.php.txt<br> ;<br> [9,7234264]<br> name=3DMISD Admin Office<br> [9,7236205]<br> name=3DMISD Special Ed Office<br> [9,7233521]<br> name=3DMAPS Supintendent Office<br> [9,7232547]<br> name=3DMAPS MHS<br> <br> Once these files are create just run the php command:<br> ‘php speeddials.php.txt > /var/www/html/speeddial.xml’<o:p></o:p></span></font></p> <p class=3DMsoNormal style=3D'text-autospace:none'><font size=3D3 face=3DGeorgia><span style=3D'font-size:12.0pt;font-family:Georgia'>This will generate the speed dial file and place it in your web directory. <br> <br> You can also schedule this to run just like the extension directory script. <br> <br> <b><span style=3D'font-weight:bold'>Creating the Main Services Menu<br> </span></b>To display these two items when the user presses the Services button you first we need to create a file that contains the menus. I created a file called services.xml and placed in the web directory /var/www/html/.<br> <br> Then I wrote the menu structure using XML. I used the information found on the Cisco website as guide to do this. Below is my services.xml file:<br> <br> <CiscoIPPhoneMenu><br> <Title>Information Services</Title><br> <Prompt>Press to Enter</Prompt><br> <MenuItem><br> <Name>Extension Directory</Name><br> <URL>http://192.168.1.94/directory.xml</URL><br> </MenuItem><br> <SoftKeyItem><br> <Name>Dir</Name><br> <URL></URL><br> <Position></Position><br> </SoftKeyItem><br> <br> <Prompt>Press to Enter</Prompt><br> <MenuItem><br> <Name>System Speed Dial</Name><br> <URL>http://192.168.1.94/speeddial.xml</URL><br> </MenuItem><br> <SoftKeyItem><br> <Name>Dir</Name><br> <URL></URL><br> <Position></Position><br> </SoftKeyItem><br> <br> </CiscoIPPhoneMenu><br> <br> As you can see the example above uses the <CiscoIPPhoneMenu> tag. I created a couple of menu items called “Extension Directory” & “System Speed Dial” which points to the directory.xml and speeddial.xml files we created earlier. <o:p></o:p></span></font></p> <p class=3DMsoNormal style=3D'text-autospace:none'><font size=3D3 face=3DGeorgia><span style=3D'font-size:12.0pt;font-family:Georgia'> <o:p></o:p></span></font></p> <p class=3DMsoNormal style=3D'text-autospace:none'><font size=3D3 face=3DGeorgia><span style=3D'font-size:12.0pt;font-family:Georgia'>For photos of how this looks on the phone visit: <a href=3D"http://picasaweb.google.com/ranciso/AsteriskImagesCiscoPhones/photo">http://picasaweb.google.com/ranciso/AsteriskImagesCiscoPhones/photo#5135353621777248450</a><o:p></o:p></span></font></p> <p class=3DMsoNormal style=3D'text-autospace:none'><font size=3D3 face=3DGeorgia><span style=3D'font-size:12.0pt;font-family:Georgia'><br> One major caveat is for some reason Cisco has a limit on how many numbers you can display using the <CiscoIPPhoneDirectory> directive. I believe it is 32. So to keep things sane I created a directory "/etc/asterisk/sip" and departmentalized my sip registrations there. You can tell asterisk to load the sip config files by inserting the following in your main /etc/asterisk/sip.conf file under the general settings:<o:p></o:p></span></font></p> <p class=3DMsoNormal style=3D'text-autospace:none'><font size=3D3 face=3DGeorgia><span style=3D'font-size:12.0pt;font-family:Georgia'>#include "/etc/asterisk/sip/*.conf<o:p></o:p></span></font></p> <p class=3DMsoNormal style=3D'text-autospace:none'><font size=3D3 face=3DGeorgia><span style=3D'font-size:12.0pt;font-family:Georgia'> <o:p></o:p></span></font></p> <p class=3DMsoNormal style=3D'text-autospace:none'><font size=3D3 face=3DGeorgia><span style=3D'font-size:12.0pt;font-family:Georgia'>After creating separate sip files I also duplicated the php script to point to each sip file and adjusted the Cisco XML files accordingly. <o:p></o:p></span></font></p> <p class=3DMsoNormal style=3D'text-autospace:none'><font size=3D3 face=3DGeorgia><span style=3D'font-size:12.0pt;font-family:Georgia'> <o:p></o:p></span></font></p> <p class=3DMsoNormal style=3D'text-autospace:none'><font size=3D3 face=3DGeorgia><span style=3D'font-size:12.0pt;font-family:Georgia'><br> <b><span style=3D'font-weight:bold'>Cisco Resources & Links for SIP Configuration (You need a Cisco Login to Access)<br> <br> <o:p></o:p></span></b></span></font></p> <p class=3DMsoNormal style=3D'text-autospace:none'><font size=3D3 face=3DGeorgia><span style=3D'font-size:12.0pt;font-family:Georgia'>Description: This link is to the documentation for all the Cisco phones:<br> http://cisco.com/en/US/customer/products/hw/phones/ps379/prod_maintenance_guides_list.html<br> <br> Description: This link is for setting up the 7906 & 7911 phones with SIP <br> http://cisco.com/en/US/customer/products/hw/phones/ps379/products_administration_guide_book09186a00807307c8.html<o:p></o:p></span></font></p> <p class=3DMsoNormal style=3D'text-autospace:none'><font size=3D2 face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal style=3D'text-autospace:none'><font size=3D3 face=3D"Times New Roman"><span style=3D'font-size:12.0pt'><o:p> </o:p></span></font></p> <p class=3DMsoNormal style=3D'text-autospace:none'><font size=3D3 face=3D"Times New Roman"><span style=3D'font-size:12.0pt'><o:p> </o:p></span></font></p> <p class=3DMsoNormal style=3D'text-autospace:none'><font size=3D2 face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=3D'font-size: 10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=3D'font-size: 10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=3D'font-size: 10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=3D'font-size: 10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=3D'font-size: 10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span style=3D'font-size: 10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p> <div> <div class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><font size=3D3 face=3D"Times New Roman"><span style=3D'font-size:12.0pt'> <hr size=3D2 width=3D"100%" align=3Dcenter tabindex=3D-1> </span></font></div> <p class=3DMsoNormal><b><font size=3D2 face=3DTahoma><span style=3D'font-size:10.0pt; font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=3D2 face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'> asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] <b><span style=3D'font-weight: bold'>On Behalf Of </span></b>satish patel<br> <b><span style=3D'font-weight:bold'>Sent:</span></b> Sunday, January 06, 2008 9:58 AM<br> <b><span style=3D'font-weight:bold'>To:</span></b> email at mattruby.com; Asterisk Users Mailing List - Non-Commercial Discussion<br> <b><span style=3D'font-weight:bold'>Subject:</span></b> Re: [asterisk-users] Cisco 79xx XML services</span></font><o:p></o:p></p> </div> <p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=3D'font-size: 12.0pt'><o:p> </o:p></span></font></p> <div> <p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=3D'font-size: 12.0pt'>I am useing Cisco 7975 with Asterisk on SIP protocol and its working gr8 <o:p></o:p></span></font></p> </div> <div> <p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=3D'font-size: 12.0pt'> <o:p></o:p></span></font></p> </div> <div> <p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=3D'font-size: 12.0pt'>I have also implemeted SCCP but i got problem of Hangup and my asterisk got hang i dont know what was it but it is working fine with SIP <o:p></o:p></span></font></p> </div> <div> <p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=3D'font-size: 12.0pt'> <o:p></o:p></span></font></p> </div> <div> <p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=3D'font-size: 12.0pt'>I need LDAP base directory for my Cisco 7975 have u work on it ???<br> <br> <b><i><span style=3D'font-weight:bold;font-style:italic'>Matthew Rubenstein <email at mattruby.com></span></i></b> wrote:<o:p></o:p></span></font></p> </div> <blockquote style=3D'border:none;border-left:solid #1010FF 1.5pt;padding:0in 0in 0in 4.0pt; margin-left:3.75pt;margin-top:5.0pt;margin-bottom:5.0pt'> <p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=3D'font-size: 12.0pt'>I Googled for CMXML_App_Guide.pdf . The first result was the voip-info<br> wiki article "Asterisk phone cisco 79xx" at<br> http://www.voip-info.org/wiki-Asterisk+phone+cisco+79xx . That article<br> mentions CMXML_App_Guide.pdf in the "Company Telephone Directory"<br> section, with a link to the "Asterisk Cisco 79XX XML Services" wiki<br> article at http://www.voip-info.org/wiki/view/Asterisk+Cisco+79XX+XML<br> +Services . Which in turn mentions that the relevant Cisco doc is called<br> "Cisco IP Phone Services Application Development Notes (Cisco IP Phone<br> XML Objects)". So I Googled for "Cisco IP Phone XML Objects" which<br> turned up several results for a 2002 O'Reilly book, followed by the doc<br> itself at<br> http://www.cisco.com/univercd/cc/td/doc/product/voice/vpdd/cdd/5_0/5_0_1/ipphsv/ip503ch2.htm . Along the way there were several other docs and examples, including differences between SIP/SCCP version of the service.<br> <br> I'm interested to see how well the feature works on the 7970s with<br> Asterisk instead of CallManager. Please keep me posted on your progress.<br> <br> <br> On Fri, 2008-01-04 at 17:08 -0600,<br> asterisk-users-request at lists.digium.com wrote:<br> > Date: Fri, 04 Jan 2008 13:41:31 -0800<br> > From: Edwin Lam <br> <ELAM at OFFICEGENERAL.COM>> Subject: [asterisk-users] Cisco 79xx XML services<br> > To: Asterisk Users Mailing List - Non-Commercial Discussion<br> > <br> <ASTERISK-USERS at LISTS.DIGIUM.COM>> Message-ID: <477EA80B.5070302 at officegeneral.com><br> > Content-Type: text/plain; charset=3DUTF-8; format=3Dflowed<br> > <br> > <br> > hi guys.<br> > <br> > i'm writing some simple applications for the cisco 7970<br> > services button. i read the asterisk wiki and it mention<br> > there's a CMXML_App_Guide.pdf file but there's nowhere<br> > can i find a link for it. does anybody know where can<br> > i find it?<br> > <br> > regards.<br> > -- <br> > Edwin Lam <br> <EDWIN.LAM at OFFICEGENERAL.COM>-- <br> <br> (C) Matthew Rubenstein<br> <br> <br> _______________________________________________<br> --Bandwidth and Colocation Provided by http://www.api-digital.com--<br> <br> asterisk-users mailing list<br> To UNSUBSCRIBE or update options visit:<br> http://lists.digium.com/mailman/listinfo/asterisk-users<o:p></o:p></span></font></p> </blockquote> <p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=3D'font-size: 12.0pt'><br> <br> <br> ----PGP Signature--<br> <br> Satish Patel<br> mobile:- +91-9818875535<br> <br> http://www.linuxbug.org<o:p></o:p></span></font></p> <p><font size=3D3 face=3D"Times New Roman"><span style=3D'font-size:12.0pt'> <o:p></o:p></span></font></p> <div class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><font size=3D3 face=3D"Times New Roman"><span style=3D'font-size:12.0pt'> <hr size=3D1 width=3D"100%" align=3Dcenter> </span></font></div> <p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span style=3D'font-size: 12.0pt'>Never miss a thing. <a href=3D"http://us.rd.yahoo.com/evt=3D51438/*http:/www.yahoo.com/r/hs">Make Yahoo your homepage.</a> <o:p></o:p></span></font></p> </div> </body> </html> ------_=_NextPart_001_01C85172.9934E677--