Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

Intercom ASP Sample

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
New Member

Re: Intercom ASP Sample

It seems that RTPRx:Stop only stops the transmit, not the service. Is there a way to send a remote Softkey:Services ?

Eg. <%RemoteIP%>:Softkey:Services?

The softkey:services does exactly what I want on the local phone...

Cheers,

Re: Intercom ASP Sample

A little more info on the scenario could've helped.. I don't know if you're refering to the situation on the phone that initiates the intercom, the remote phone, and what we have on screen.

I'm assuming you're refering to the remote phone that receives the RTP stream and that upon pressing some button on the phone that initiated the intercom, you want to terminate the applications on both ends. So, on the remote end, instead of sending a CiscoIPPhoneExecute with one item containing RTPRx:Stop, you add another item containing Key:Services.

You can adapt this for the scenario on the local phone.

New Member

Re: Intercom ASP Sample

Sorry, to be more specific, for my Exit key I want the intercom service to stop on both phones, not just the phone that presses exit. In the CiscoIPPhoneText for the Exit softkey I have:

Exit

Key:Services

4

This closes it on the local phone, but not the remote phone.

Does creating a new function (similar to phonepush in phonepush.asp) that has an CiscoIPPhoneExecute URI of the remote phone IP and Key:services sound like a reasonable idea?

And how would I get this to run when someone pressed the Exit softkey? Cheers,

New Member

Re: Intercom ASP Sample

Mattiep - were you ever able to get the one exit press to stop the service on both phones? Thanks!

New Member

Re: Intercom ASP Sample

Hi,

No I didn't, I moved on to something else and never came back to it. I'll give it another go and see how - I'm sure its not difficult (once you know how to do it!)

Cheers,

Matt

Re: Intercom ASP Sample

>>Does creating a new function (similar to phonepush in phonepush.asp) that has an CiscoIPPhoneExecute URI of the remote phone IP and Key:services sound like a reasonable idea?

And how would I get this to run when someone pressed the Exit softkey? Cheers,

You would rewrite the exit softkey so that it calls an url of your application, instead of SoftKey:Exit. When the call comes, you do what you described in the paragraph above (pusha CiscoIPPhoneExecute to the remote phone.. ), and then you respond with the same CiscoIPPhoneExecute so that the service will be terminated on the calling phone as well.

New Member

Re: Intercom ASP Sample

thanks again - finally got it to work! Also added the hands-free softkey option as a bonus.

New Member

Re: Intercom ASP Sample

Thats awesome - any chance of getting a snippet of your code to Matthew.Pook@PSNWorld.com?

New Member

Re: Intercom ASP Sample

So,

what?s the solution?.. pushing softkey:exit to the phone? that?s possible?

New Member

Re: Intercom ASP Sample

Does anyone have any snippets of modified intercom.asp code for multicasting?

CCM 4.1, 79xx Series IP Phones.

New Member

Re: Intercom ASP Sample

<%@ Language=JavaScript %>

<%

var pushuserid = "password";

var pushpassword = "password";

Response.ContentType = "text/xml";

Response.Expires = -1;

//Declaring Variables

ipAddr = Request.ServerVariables("REMOTE_HOST");

toIPAddr1 = "172.23.40.23";

toIPAddr2 = "172.23.40.11";

toIPAddr3 = "172.23.40.4";

// 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

Intercom to A6NA

Talk

RTPMTx:Stop

RTPMTx:239.0.0.45:20482

1

Shout

RTPMTx:239.0.0.45:20482

RTPMTx:Stop

2

Mute

RTPMTx:Stop

3

Exit

SoftKey:Exit

4

%>

New Member

Re: Intercom ASP Sample

Where can i find

var pushuserid = "password";

var pushpassword = "password";

on my ccm ?

thanks ;-)

New Member

Re: Intercom ASP Sample

Create an account on you CCM

Associate the phones with the account

Create an IP service and point the url to where you intercom script resides

Subscribe the phones to this service

Replace "password" with the user/pass of the user you created in the CCM

Replace the IPs in the script with the IPs of the phones you want in the intercom group

Make a new script and IP service for each intercom group

New Member

Re: Intercom ASP Sample

Well ...

Many thanks ;-)

It work well :-D

best regards

New Member

Re: Intercom ASP Sample

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

New Member

Re: Intercom ASP Sample

Is multicast enabled on all your interfaces?

ip pim sparse-dense mode

New Member

Re: Intercom ASP Sample

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.

New Member

Re: Intercom ASP Sample

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

New Member

Re: Intercom ASP Sample

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

New Member

Re: Intercom ASP Sample

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

New Member

Re: Intercom ASP Sample

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.

New Member

Re: Intercom ASP Sample

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

%>

New Member

Re: Intercom ASP Sample

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

New Member

Re: Intercom ASP Sample

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?

New Member

Re: Intercom ASP Sample

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];

}

}

Re: Intercom ASP Sample

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

816
Views
20
Helpful
26
Replies
CreatePlease to create content