cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2216
Views
20
Helpful
26
Replies

Intercom ASP Sample

mattiep00
Level 1
Level 1

Hello,

Just wondering if anyone else out there has successfully got their Intercom ASP service to close the connections when one user presses Exit? I have been trying this for a while, and don't know how to send a remote RTPRx:Stop

All help appreciated!!

26 Replies 26

I have been able to get the service to work great in our main office, but if I try to use it to intercom another office on the WAN the audio does not transfer (the speaker and mute buttons will activate though) I am connected to this remote site via Frame Relay, is this the reason I am not able to use the service to talk to these sites? Thanks

Is multicast enabled on all your interfaces?

ip pim sparse-dense mode

It wasnt, so I went ahead and did that following this document:

http://www.cisco.com/univercd/cc/td/doc/cisintwk/intsolns/mcst_sol/frm_rlay.htm#99498

I followed the example configs for point 2 point subinterfaces and I still get the same results, no voice. Any other ideas? I'm no expert so I may have overlooked something. Thanks again.

So the question still stands. How do we turn off the Receive port on the remote phones once we press the exit button on our transmitting phone? Can we put multiple URL's in the one URL tag of the button we press?

I guess we could make another page that just closes the IPs and ports forwarded to it. So we could collect the IPs and ports from this script and use them as variables being passed to the URL we're calling, and all that web page does is execute the push to RTPMRx:Stop of those phones IPs.

Sound good? I'm going to work on that.

Szia,

Mark

sisqocracker
Level 1
Level 1

Here's a working version where it does close the session once you're done. It does this via pulling a second web page which closes those sessions. It then has the final Exit button on that page.

First file is the intercom, which has been changed from a 'Text' to a 'Menu', this allows us to kick off another page. the second page allows you to return back to the intercom or just exit out.

The second page is the page that stops the remotes from listening. Enjoy!

<%@ Language=JavaScript %>

<%

var pushuserid = "ipservicesdk";

var pushpassword = "cisco123";

Response.ContentType = "text/xml";

Response.Expires = -1;

//Declaring Variables

ipAddr = Request.ServerVariables("REMOTE_HOST");

toIPAddr1 = "10.128.40.74";

toIPAddr2 = "10.128.40.108";

toIPAddr3 = "10.128.40.68";

// Starting the Transmission

phonePush(ipAddr,"RTPMTx:Stop",pushuserid,pushpassword);

//phonePush(ipAddr,"RTPMTx:239.0.0.45:20482",pushuserid,pushpassword);

// Start the Receiving on the first terminal

phonePush(toIPAddr1,"RTPMRx:Stop",pushuserid,pushpassword);

phonePush(toIPAddr1,"RTPMRx:239.0.0.45:20482",pushuserid,pushpassword);

//Start the Receiving on the second terminal

phonePush(toIPAddr2,"RTPMRx:Stop",pushuserid,pushpassword);

phonePush(toIPAddr2,"RTPMRx:239.0.0.45:20482",pushuserid,pushpassword);

//Start the Receiving on the third terminal

phonePush(toIPAddr3,"RTPMRx:Stop",pushuserid,pushpassword);

phonePush(toIPAddr3,"RTPMRx:239.0.0.45:20482",pushuserid,pushpassword);

%>

Office Intercom

Press and Hold to Talk

Talk to Group

Stop Talking to Group

Talk

RTPMTx:Stop

RTPMTx:239.0.0.45:20482

1

Shout

RTPMTx:239.0.0.45:20482

RTPMTx:Stop

2

Mute

RTPMTx:Stop

3

Quit

http://10.128.13.186/ciscoipservices/intercom/stopintercomgvl.asp

4

%>

------------------------------------------------------------------

==================================================================

------------------------------------------------------------------

<%@ Language=JavaScript %>

<%

var pushuserid = "ipservicesdk";

var pushpassword = "cisco123";

Response.ContentType = "text/xml";

Response.Expires = -1;

//Declaring Variables

ipAddr = Request.ServerVariables("REMOTE_HOST");

toIPAddr1 = "10.128.40.74";

toIPAddr2 = "10.128.40.108";

toIPAddr3 = "10.128.40.68";

// Starting the Transmission

phonePush(ipAddr,"RTPMTx:Stop",pushuserid,pushpassword);

//phonePush(ipAddr,"RTPMTx:239.0.0.45:20482",pushuserid,pushpassword);

// Start the Receiving on the first terminal

phonePush(toIPAddr1,"RTPMRx:Stop",pushuserid,pushpassword);

//phonePush(toIPAddr1,"RTPMRx:239.0.0.45:20482",pushuserid,pushpassword);

//Start the Receiving on the second terminal

phonePush(toIPAddr2,"RTPMRx:Stop",pushuserid,pushpassword);

//phonePush(toIPAddr2,"RTPMRx:239.0.0.45:20482",pushuserid,pushpassword);

//Start the Receiving on the third terminal

phonePush(toIPAddr3,"RTPMRx:Stop",pushuserid,pushpassword);

//phonePush(toIPAddr3,"RTPMRx:239.0.0.45:20482",pushuserid,pushpassword);

%>

Office Intercom

Returning to Intercom?

Return

http://10.128.13.186/ciscoipservices/intercom/newintercom.asp

1

Exit

SoftKey:Exit

4

%>

Thanks.

Szia,

Mark

I found this post, used the script and it worked!!

One more think to ask though.

Is it possible to have the Talk buttom on the target phones?

If you guys have the script please let me know.

Thank you.

Zeek

Yes, it is possible to have Talk button on the target phone to make it sort of push to talk application. All you have to do is to add a softkey with RTPTx URI.

Thanks for your reply.

I'm not really good at scripts, so i'd rather copy and paste one and maybe make changes, but i don't really know how to add a softket to the script i already have.

This is the script i use to intercom multiple ip's.

Please let me know if you know the way to add the reply key.

<%@ Language=JavaScript %>

<%

var pushuserid = "push2phone";

var pushpassword = "12345";

Response.ContentType = "text/xml";

Response.Expires = -1;

//Declaring Variables

ipAddr = Request.ServerVariables("REMOTE_HOST");

toIPAddr1 = "192.168.128.53";

toIPAddr2 = "192.168.128.68";

toIPAddr3 = "192.168.128.56";

toIPAddr4 = "192.168.128.171";

toIPAddr5 = "192.168.128.59";

toIPAddr6 = "192.168.128.60";

toIPAddr7 = "192.168.128.58";

toIPAddr8 = "192.168.128.56";

// Starting the Transmission

phonePush(ipAddr,"RTPMTx:Stop",pushuserid,pushpassword);

//phonePush(ipAddr,"RTPMTx:239.0.0.45:20482",pushuserid,pushpassword);

// Start the Receiving on the first terminal

phonePush(toIPAddr1,"RTPMRx:Stop",pushuserid,pushpassword);

phonePush(toIPAddr1,"RTPMRx:239.0.0.45:20482",pushuserid,pushpassword);

//Start the Receiving on the second terminal

phonePush(toIPAddr2,"RTPMRx:Stop",pushuserid,pushpassword);

phonePush(toIPAddr2,"RTPMRx:239.0.0.45:20482",pushuserid,pushpassword);

//Start the Receiving on the third terminal

phonePush(toIPAddr3,"RTPMRx:Stop",pushuserid,pushpassword);

phonePush(toIPAddr3,"RTPMRx:239.0.0.45:20482",pushuserid,pushpassword);

//Start the Receiving on the third terminal

phonePush(toIPAddr4,"RTPMRx:Stop",pushuserid,pushpassword);

phonePush(toIPAddr4,"RTPMRx:239.0.0.45:20482",pushuserid,pushpassword);

//Start the Receiving on the third terminal

phonePush(toIPAddr5,"RTPMRx:Stop",pushuserid,pushpassword);

phonePush(toIPAddr5,"RTPMRx:239.0.0.45:20482",pushuserid,pushpassword);

//Start the Receiving on the third terminal

phonePush(toIPAddr6,"RTPMRx:Stop",pushuserid,pushpassword);

phonePush(toIPAddr6,"RTPMRx:239.0.0.45:20482",pushuserid,pushpassword);

//Start the Receiving on the third terminal

phonePush(toIPAddr7,"RTPMRx:Stop",pushuserid,pushpassword);

phonePush(toIPAddr7,"RTPMRx:239.0.0.45:20482",pushuserid,pushpassword);

//Start the Receiving on the third terminal

phonePush(toIPAddr8,"RTPMRx:Stop",pushuserid,pushpassword);

phonePush(toIPAddr8,"RTPMRx:239.0.0.45:20482",pushuserid,pushpassword);

%>

Office Intercom

Press and Hold to Talk

Talk to Group

Stop Talking to Group

Talk

RTPMTx:Stop

RTPMTx:239.0.0.45:20482

1

Shout

RTPMTx:239.0.0.45:20482

RTPMTx:Stop

2

Mute

RTPMTx:Stop

3

Quit

http://172.16.1.15/ciscoipservices/ASP/intercom/stopintercomgvl.asp

4

%>

This type of broadcast isn't meant or designed to be two way. Because I have created a second page, this could be leveraged to make something that works in the other direction, but it would be static like this is designed to be. Where you can only respond to something that is hard coded. I don't have the time for it right now, but can work on it before a whole lot longer. Holidays are coming up, usually a slow time and can write code. But it isn't as easy as adding a button.

Glad I could help people with what I had done so far (along with the original contributers).

Thanks,

Mark Cooper

Thanks for the script. I did try it and I can get the phones to go off hook but no audio on my local LAN. Any suggestions?

Thanks for the script at least I know it almost works. What I had a question on is if someone knew how to load the devicelist.xml from call manager and then let it get the IP addresses, if the array in the asp file has the SEP0123456789456(mac) address in it.

We are trying to create a way to add phones without knowing the IP address. Also the devicelist.xml file is updated from callmanager every hour.

Here is the code I have let me know if I made a mistake. Thanks

----------------------------------------

var devices = new Array;

Response.ContentType = "text/xml";

Response.Expires = -1;

//Declaring Variables

ipAddr = Request.ServerVariables("REMOTE_HOST");

//declares device list

devices[0] = "SEP012345678943"; //Scott

devices[1] = "SEP012345678945"; //Test1

devices[2] = "SEP012345678944"; //Test2

function getXMLDoc (file) {

var xmlDoc = new ActiveXObject('Microsoft.XMLDOM');

xmlDoc.async = false;

xmlDoc.load(file);

return xmlDoc;

}

var xmlDoc1 = getXMLDoc('devicelist.xml');

//Get the IP's for each device.

for (var i=0; i

XMLNode = xmlDoc1.selectSingleNode("/DeviceList/Device[@n='" + devices[i] + "']/@i");

if (XMLNode == null)

ips[i] = "";

else

ips[i] = XMLNode.value;

}

// Parse the IPs and remove the requestor and any non-existant.

var parsedIPS = new Array;

for (var i=0; i

if (ips[i] != thisIP) {

if (ips[i] != "") {

parsedIPS[parsedIPS.length] = ips[i];

}

}

No idea why but My phone open the sript as a text, any idea why ?..I feel newbie on that.