[cisco-voip] Live Streaming Audio on a Cisco IP Phone

Robert Kulagowski rkulagow at gmail.com
Mon Apr 25 11:59:02 EDT 2011


For a few-hundred listener-only conference call we did the following.
Setup a multicast DN on a router:

ephone-dn  3
 number 221172
 name Conference Bridge
 feed ip 239.168.3.20 port 20480

Configured a linux host running php to serve up a web page with the
appropriate commands:
$ cat thcc.php
<?php

$ip_of_phone = $_SERVER['REMOTE_ADDR'] ;

// First, make sure that if it's already in a stream that we put a stop
// to that.

$post_data = "XML=". urlencode('<CiscoIPPhoneExecute>
     <ExecuteItem Priority="1" URL="RTPTx:Stop"/>
     </CiscoIPPhoneExecute>') ;


$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "http://" . $ip_of_phone . "/CGI/Execute");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_USERPWD, "confsuperuser:superuserpassword");
curl_exec($ch);
curl_close($ch);

// Give the phone a chance to react.

sleep(1) ;

// If the phone is going to be a multicast sender (based on IP address)
// then do this part:

if ($ip_of_phone == "10.255.23.74" or $ip_of_phone == "10.255.23.75")
{
$post_data = "XML=". urlencode('<CiscoIPPhoneExecute>
     <ExecuteItem Priority="1" URL="RTPMTx:239.168.3.20:20480"/>
     </CiscoIPPhoneExecute>') ;
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "http://" . $ip_of_phone . "/CGI/Execute");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_USERPWD, "confsuperuser:superuserpassword");
curl_exec($ch);
curl_close($ch);

}

// Otherwise, it's a multicast receiver:

$post_data = "XML=". urlencode('<CiscoIPPhoneExecute>
     <ExecuteItem Priority="1" URL="RTPMRx:239.168.3.20:20480"/>
     </CiscoIPPhoneExecute>') ;

// echo "Post data is " . $post_data ;

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "http://" . $ip_of_phone . "/CGI/Execute");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_USERPWD, "confsuperuser:superuserpassword");
curl_exec($ch);
curl_close($ch);

// sleep(5);


?>

Add an enterprise service on the phones: Device > Device Settings >
Phone services
Service Name: Town Hall Conference Call
Service URL: http://ip.of.linux.host/thcc.php
XML Service
Service Type: Standard IP Phone Service
Enable: Yes.

Add an application user "confsuperuser" that has all the phones as
controlled devices, set the password to whatever you have set in the
php script.

Configure whatever you need to do in your environment for multicast to
work.  We did multicast over GRE tunnels because our WAN backbone
isn't multicast capable and it worked great.  We had a few hundred
participants and saved about $500 just to the bridging service, as
well as hundreds of D channels.  Our next town hall can probably be
90% multicast to bring the costs down even more.

We assigned a DN so that we could bridge in external callers (the
external bridging service that we used for non-multicast offices).  We
had a concern that the linux host wouldn't be able to keep up, but
that wasn't a problem, because there weren't 100000 simultaneous
requests; even though it was on everyone's calendar that the call
starts at time "x", no one is that precise, so it was unusual if we
had even one-per-second pressing the "Town Hall" button on their
services menu.  And then send out the appropriate instructions for
users to access Services and press "Town Hall".


More information about the cisco-voip mailing list