I have a Yealink ip phone on my desk and I want to remote control it so that I can place the calls from my computer instead than by typing the numbers directly on the phone. This link explains how to do it:
There are 2 ways of doing it. One is sending a http request to the phone. And the other option is by sending a SIP notify message.
A) Sending HTTP request (Works!)
- First make sure the phone is configured to allow remote connections
Then just make this
wget --user admin --password PASSWORD_PHONE http://IP_OF_PHONE/servlet?key=SPEAKER
After making that request the phone speaker key is pressed!
B) Sending SIP Notify Message (Does NOT work)
This is the option I want to use because I do not want to store usernames and passwords. Also the ip address of the phone might change. Anyways here is what I have tried and for some reason I cannot make this option work:
I perform the first step that I did on part (A) by allowing the phone to be remote controled.
Now that the SIP peer Eduardo is connected I need to send it a SIP Notify Message with the body containing key=SPEAKER.
/etc/asterisk/sip_notify.confand add the following context:
[test] Event=>ACTION-URI Content=>key=SPEAKER
I restart asterisk because I do not know how to reload sip_notify.conf
asterisk -rx "core restart gracefully"
Then on asterisk CLI I type the following command in order to send the sip notify message:
sip notify test Eduardo
when I run that command asterisk says:
Sending NOTIFY of type 'test' to 'Eduardo'but the phone never presses the SPEAKER key! What could I be doing wrong?
Here is the sip message captured by Wireshark!
- Even though I am following the directions the SPEAKER key is not being pressed! What could I be doing wrong?