No subject


Thu Jul 12 09:23:04 CDT 2007


file is
created you must place it in your web directory on the server.<br>
&nbsp;<br>
I chained the command and also wrote the output to an xml file in the =
web
directory.&nbsp; The command looks like this:<br>
&nbsp;<br>
&#8216;php /etc/asterisk/directory.php.txt &gt;
/var/www/html/directory.xml&#8217;<br>
&nbsp;<br>
<b><span style=3D'font-weight:bold'>System Speeddials using Services =
Button</span></b>&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;<br>
For speed dials I modified the php code to look to a specific file in =
the
asterisk directory called speeddials.conf.&nbsp; This file only contains
attributes that the php script will look for.&nbsp; This is great =
because you
only need to specify the number and name fields.&nbsp; Below is my =
example of
speeddial.php.txt (php code)&nbsp;and speeddials.conf (speed dials):<br>
&nbsp;<br>
<i><span style=3D'font-style:italic'>Speeddial.php.txt<br>
</span></i>&lt;?<br>
header(&quot;Content-type: text/xml&quot;);<br>
header(&quot;Connection: close&quot;);<br>
header(&quot;Expires: -1&quot;);<br>
&nbsp;<br>
// location of asterisk config files<br>
$location =3D &quot;/etc/asterisk/&quot;;<br>
$dirname =3D &quot;System Speed Dial&quot;;<br>
&nbsp;<br>
// parse speeddials.conf<br>
$ssd_array =3D parse_ini_file($location.&quot;speeddials.conf&quot;, =
true);<br>
while ($v =3D current($ssd_array))<br>
{ if (isset($v['name']))<br>
{ $directory[] =3D &quot;&lt;Name&gt;&quot;. =
$v['name'].&quot;&lt;/Name&gt;\n&quot;.<br>
&nbsp;&nbsp;&nbsp;
&quot;&lt;Telephone&gt;&quot;.key($ssd_array).&quot;&lt;/Telephone&gt;\n&=
quot;;<br>
}<br>
next($ssd_array);<br>
}<br>
&nbsp;<br>
sort ($directory);<br>
&nbsp;<br>
echo &quot;&lt;CiscoIPPhoneDirectory&gt;\n&quot;;<br>
echo =
&quot;&lt;Title&gt;&quot;.$dirname.&quot;&lt;/Title&gt;\n&quot;;<br>
foreach ($directory as $v) {<br>
&nbsp; echo &quot;\n&lt;DirectoryEntry&gt;\n&quot;;<br>
&nbsp; echo $v;<br>
&nbsp; echo &quot;&lt;/DirectoryEntry&gt;\n&quot;;<br>
}<br>
echo &quot;\n&lt;Prompt&gt;Choose Name and Press =
Dial&lt;/Prompt&gt;\n&quot;;<br>
echo &quot;&lt;/CiscoIPPhoneDirectory&gt;\n&quot;;<br>
?&gt;<br>
<br>
&nbsp;<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>
&nbsp;<br>
Once these files are create just run the php command:<br>
&#8216;php speeddials.php.txt &gt; =
/var/www/html/speeddial.xml&#8217;<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.&nbsp;&nbsp;<br>
&nbsp;<br>
You can also schedule this to run just like the extension directory
script.&nbsp;&nbsp;&nbsp;<br>
&nbsp;<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.&nbsp; I =
created a
file called services.xml and placed in the web directory =
/var/www/html/.<br>
&nbsp;<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>
&nbsp;<br>
&lt;CiscoIPPhoneMenu&gt;<br>
&lt;Title&gt;Information Services&lt;/Title&gt;<br>
&lt;Prompt&gt;Press to Enter&lt;/Prompt&gt;<br>
&lt;MenuItem&gt;<br>
&lt;Name&gt;Extension Directory&lt;/Name&gt;<br>
&lt;URL&gt;http://192.168.1.94/directory.xml&lt;/URL&gt;<br>
&lt;/MenuItem&gt;<br>
&lt;SoftKeyItem&gt;<br>
&lt;Name&gt;Dir&lt;/Name&gt;<br>
&lt;URL&gt;&lt;/URL&gt;<br>
&lt;Position&gt;&lt;/Position&gt;<br>
&lt;/SoftKeyItem&gt;<br>
&nbsp;<br>
&lt;Prompt&gt;Press to Enter&lt;/Prompt&gt;<br>
&lt;MenuItem&gt;<br>
&lt;Name&gt;System Speed Dial&lt;/Name&gt;<br>
&lt;URL&gt;http://192.168.1.94/speeddial.xml&lt;/URL&gt;<br>
&lt;/MenuItem&gt;<br>
&lt;SoftKeyItem&gt;<br>
&lt;Name&gt;Dir&lt;/Name&gt;<br>
&lt;URL&gt;&lt;/URL&gt;<br>
&lt;Position&gt;&lt;/Position&gt;<br>
&lt;/SoftKeyItem&gt;<br>
&nbsp;<br>
&lt;/CiscoIPPhoneMenu&gt;<br>
&nbsp;<br>
As you can see the example above uses the &lt;CiscoIPPhoneMenu&gt; =
tag.&nbsp; I
created a couple of menu items called &#8220;Extension Directory&#8221; =
&amp;
&#8220;System Speed Dial&#8221; which points to the directory.xml and
speeddial.xml files we created earlier.&nbsp; =
<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'>&nbsp;<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&nbsp;on the phone visit: <a
href=3D"http://picasaweb.google.com/ranciso/AsteriskImagesCiscoPhones/pho=
to">http://picasaweb.google.com/ranciso/AsteriskImagesCiscoPhones/photo#5=
135353621777248450</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&nbsp;for some reason Cisco has a limit on how
many&nbsp;numbers you can display using the =
&lt;CiscoIPPhoneDirectory&gt;
directive.&nbsp; I believe it is 32.&nbsp;So to keep things&nbsp;sane I =
created
a directory &quot;/etc/asterisk/sip&quot; and departmentalized my sip
registrations there.&nbsp; 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
&quot;/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'>&nbsp;<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.&nbsp; <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'>&nbsp;<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 &amp; 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>
&nbsp;<br>
Description: This link is for setting up the 7906 &amp; 7911 phones with =
SIP <br>
http://cisco.com/en/US/customer/products/hw/phones/ps379/products_adminis=
tration_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>&nbsp;</o:p></span></fo=
nt></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>&nbsp;</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>&nbsp;</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>&nbsp;</o:p></span></fo=
nt></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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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'>&nbsp;<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'>&nbsp;<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&nbsp;u work on =
it ???<br>
<br>
<b><i><span style=3D'font-weight:bold;font-style:italic'>Matthew =
Rubenstein
&lt;email at mattruby.com&gt;</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 &quot;Asterisk phone cisco 79xx&quot; at<br>
http://www.voip-info.org/wiki-Asterisk+phone+cisco+79xx . That =
article<br>
mentions CMXML_App_Guide.pdf in the &quot;Company Telephone =
Directory&quot;<br>
section, with a link to the &quot;Asterisk Cisco 79XX XML Services&quot; =
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>
&quot;Cisco IP Phone Services Application Development Notes (Cisco IP =
Phone<br>
XML Objects)&quot;. So I Googled for &quot;Cisco IP Phone XML =
Objects&quot;
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>
&gt; Date: Fri, 04 Jan 2008 13:41:31 -0800<br>
&gt; From: Edwin Lam <br>
<ELAM at OFFICEGENERAL.COM>&gt; Subject: [asterisk-users] Cisco 79xx XML =
services<br>
&gt; To: Asterisk Users Mailing List - Non-Commercial Discussion<br>
&gt; <br>
<ASTERISK-USERS at LISTS.DIGIUM.COM>&gt; Message-ID:
&lt;477EA80B.5070302 at officegeneral.com&gt;<br>
&gt; Content-Type: text/plain; charset=3DUTF-8; format=3Dflowed<br>
&gt; <br>
&gt; <br>
&gt; hi guys.<br>
&gt; <br>
&gt; i'm writing some simple applications for the cisco 7970<br>
&gt; services button. i read the asterisk wiki and it mention<br>
&gt; there's a CMXML_App_Guide.pdf file but there's nowhere<br>
&gt; can i find a link for it. does anybody know where can<br>
&gt; i find it?<br>
&gt; <br>
&gt; regards.<br>
&gt; -- <br>
&gt; 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'>&nbsp; <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">Mak=
e Yahoo your
homepage.</a> <o:p></o:p></span></font></p>

</div>

</body>

</html>

------_=_NextPart_001_01C85172.9934E677--



More information about the asterisk-users mailing list