on 01-24-2014 01:58 AM
I use this script and it works great, however, it joins the phone to a multicast group even while the phone is on an active call so you are hearing both the phone conversation and the multicast page. Is there a way to have the script ignore the phone if it is in an active call?
Not with this script. IPPhoneExecute always acts immediately (ignores priority) for Internal URIs, which is what is being invoked here.
Since CiscoIPPhoneExecute items that are URL requests do obey the 'Priority' attribute (which can be set to ignore if on a call), you could make this a two-step sequence:
- POST a CiscoIPPhoneExecute to the phone with an Item that is a unique URL to your webserver, with Priority of 2 (Only if Idle)
- If/when your webserver receives the request to this URL, reply with the CiscoIPPhoneExecute including the multicast receive Item
Thank you dstaudt, I am pretty new to programming and I'm having to do it out of necessity. I have a old Valcom FXO paging adapter that operates traditional overhead speakers and a group of Cisco IP phones. So to make it all work for my operators "on the cheap" they call an Asterisk extension, it records to a wav file, then calls the extension of the Valcom paging adapter and plays the messages and hangs up then executes the above script to make the IP phones join the multicast group, streams the message and then disconnects the phones.
Of course I always have users that will always find something to complain about, first it was "I can't hear the pages" so I gave them the pages. Now the pages come across their phones while they are on calls. Could you possibly give me an example of the code you are talking about that would ignore a phone in use.
Thank you!!
For the first POST, something like this:
<CiscoIPPhoneExecute>
<ExecuteItem Priority="2" URL=”http://a_web_server/join_mc?group=12345”/>
</CiscoIPPhoneExecute>
Priority="2" should ensure that the phone will not actually request the specified URL unless it is Idle (not in a call). If the phone is Idle, then the URL http://a_web_server/join_mc?group=12345 will be requested, and the app can respond (via 200 OK) with the multicast command:
<CiscoIPPhoneExecute>
<ExecuteItem URL="RTPMRx:239.168.3.20:20480"/>
<ExecuteItem URL="http://a_web_server/joinc_mc/confirmation"/>
</CiscoIPPhoneExecute>
Also note that you should probably return a secondary execute Item that points to a URL that gives an actual displayable XML response (e.g. CiscoIPPhoneText 'Alert: Page announcement playing'), so that the phones is not left in 'Requesting...' status due to the 2nd Execute object not being displayable.
I will give this a try. Thank you very much!
for some reason pri 2 still makes the phone request the multicast join in a call or not.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: