<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Want to send SIP notify to Yealink Phone to make it press a button]]></title><description><![CDATA[<p dir="auto">I have a scenario where I need the FOP2 panel to send a notify to Yealink phones to have the PHONE press DND. Not just have the FOP panel set DND as it does.<br />
I've put some custom code in the FOP2 presence file and it works, but it is cludgy for certain.<br />
This is a FreePBX 14 standard install otherwise.<br />
I think this would be better as a plug in, but I'm not sure how to handle that.<br />
File: <code>/var/www/html/fop2/admin/plugins/presencedndfpbx/presencedndfpbx.pl</code><br />
I added this</p>
<pre><code>    if($key eq "fop2state") {
        if($data ne "") {
            $return  = "Action: Command\r\n";
            $return .= "Command: pjsip send notify dndon-yealink endpoint $exten\r\n";
            $return .= "\r\n";
            push @allreturn, $return;
</code></pre>
<p dir="auto">and this</p>
<pre><code>        } else {
            $return  = "Action: Command\r\n";
            $return .= "Command: pjsip send notify dndoff-yealink endpoint $exten\r\n";
            $return .= "\r\n";
            push @allreturn, $return;
</code></pre>
<p dir="auto">File: <code>/etc/asterisk/sip_notify_custom.conf</code><br />
i added</p>
<pre><code>[dndon-yealink]
Content-Type=&gt;message/sipfrag
Event=&gt;ACTION-URI
Content=&gt;key=DNDOn

[dndoff-yealink]
Content-Type=&gt;message/sipfrag
Event=&gt;ACTION-URI
Content=&gt;key=DNDOff
</code></pre>
]]></description><link>http://localhost:4567/topic/2732/want-to-send-sip-notify-to-yealink-phone-to-make-it-press-a-button</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 02:54:08 GMT</lastBuildDate><atom:link href="http://localhost:4567/topic/2732.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 29 Sep 2019 04:29:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Want to send SIP notify to Yealink Phone to make it press a button on Thu, 15 Oct 2020 18:49:51 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kirk_s" aria-label="Profile: Kirk_S">@<bdi>Kirk_S</bdi></a> said:<br />
Great feedback JaredBusch! The exact scenario "Having an operator change it in FOP2 and then have the phone reflect the same status." works for us on hundreds of systems with the setup I described.   Good luck with your "cludgy" code.</p>
</blockquote>
<p dir="auto">Changing the DND status in FOP2 does not cause the phone to to come off of DND. It does cause the PBX to not see the extension in DND.</p>
]]></description><link>http://localhost:4567/post/11559</link><guid isPermaLink="true">http://localhost:4567/post/11559</guid><dc:creator><![CDATA[JaredBusch]]></dc:creator><pubDate>Thu, 15 Oct 2020 18:49:51 GMT</pubDate></item><item><title><![CDATA[Reply to Want to send SIP notify to Yealink Phone to make it press a button on Tue, 06 Oct 2020 23:17:29 GMT]]></title><description><![CDATA[<p dir="auto">Great feedback JaredBusch! The exact scenario "Having an operator change it in FOP2 and then have the phone reflect the same status." works for us on hundreds of systems with the setup I described.   Good luck with your "cludgy" code.</p>
]]></description><link>http://localhost:4567/post/11558</link><guid isPermaLink="true">http://localhost:4567/post/11558</guid><dc:creator><![CDATA[Kirk_S]]></dc:creator><pubDate>Tue, 06 Oct 2020 23:17:29 GMT</pubDate></item><item><title><![CDATA[Reply to Want to send SIP notify to Yealink Phone to make it press a button on Thu, 30 Jul 2020 17:39:31 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kirk_s" aria-label="Profile: Kirk_S">@<bdi>Kirk_S</bdi></a> said:<br />
If you change your Yealink to use the system feature codes then the handset and FOP2 DND status will be synced and there is no need to virtually press the DND button remotely on the device.</p>
</blockquote>
<p dir="auto">That is standard, and does nothing for the point of the post. Having an operator change it in FOP2 and then have the phone reflect the same status.</p>
]]></description><link>http://localhost:4567/post/11557</link><guid isPermaLink="true">http://localhost:4567/post/11557</guid><dc:creator><![CDATA[JaredBusch]]></dc:creator><pubDate>Thu, 30 Jul 2020 17:39:31 GMT</pubDate></item><item><title><![CDATA[Reply to Want to send SIP notify to Yealink Phone to make it press a button on Thu, 27 Feb 2020 16:27:13 GMT]]></title><description><![CDATA[<p dir="auto">If you change your Yealink to use the system feature codes then the handset and FOP2 DND status will be synced and there is no need to virtually press the DND button remotely on the device.</p>
]]></description><link>http://localhost:4567/post/11556</link><guid isPermaLink="true">http://localhost:4567/post/11556</guid><dc:creator><![CDATA[Kirk_S]]></dc:creator><pubDate>Thu, 27 Feb 2020 16:27:13 GMT</pubDate></item><item><title><![CDATA[Reply to Want to send SIP notify to Yealink Phone to make it press a button on Mon, 30 Sep 2019 22:57:55 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
The .conf file for sip notifications is not dialplan, so we cannot included it there, and you cannot use just any file unless is #included in sip_notify.conf. So the need for modification of a file is still present, and permission issues might arise, and it is always something 'sensitive'. We can create a new plugin using the presencedndfpbx one as a base, so you won't lose anything if you upgrade the plugin in the future. I will see if I find the time to maybe extend the plugin or write a new one for firing up notifications on presence change in a 'general' way.</p>
<p dir="auto">Best regards,</p>
]]></description><link>http://localhost:4567/post/11555</link><guid isPermaLink="true">http://localhost:4567/post/11555</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Mon, 30 Sep 2019 22:57:55 GMT</pubDate></item><item><title><![CDATA[Reply to Want to send SIP notify to Yealink Phone to make it press a button on Mon, 30 Sep 2019 21:34:44 GMT]]></title><description><![CDATA[<p dir="auto">Yeah, what I posted works great. But every time I update FOP2 I'm worried I will lose my changes to <code>/var/www/html/fop2/admin/plugins/presencedndfpbx/presencedndfpbx.pl</code>. That is why I was wondering if there was a way to make this into a plugin.<br />
I get the issue with creating contexts. Why not have the plugin create its own conf file in <code>/etc/asterisk</code> and then have the plugin modify <code>/etc/asterisk/extensions_override_freepbx.conf</code> to include it.</p>
<p dir="auto">This is definitely not something everyone will use. But I have found it quite helpful for places where users only have their dsk phone and the operator has the FOP2 panel.</p>
]]></description><link>http://localhost:4567/post/11554</link><guid isPermaLink="true">http://localhost:4567/post/11554</guid><dc:creator><![CDATA[JaredBusch]]></dc:creator><pubDate>Mon, 30 Sep 2019 21:34:44 GMT</pubDate></item><item><title><![CDATA[Reply to Want to send SIP notify to Yealink Phone to make it press a button on Sun, 29 Sep 2019 21:06:17 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
Thanks for sharing. Your code looks alright, I think this can be done as a plugin, or maybe as a toggle setting in the presence dnd plugin.</p>
<p dir="auto">Although  plugins can write into configuration files via AMI functions, those are a bit dangerous as anything written to conf files by hand might be lost in some cases (I have seen that happen) and I think its not safe. And now that I think of it, you can write dialplans in the form of extension,priority and I do not know fi you can write header sections and the like.</p>
<p dir="auto">Asking users to write some custom dialplan is a bit of an issue here. I might try to hack it into generate_override_contexts, but this is a bit too specific, like 90% of users won't need this at all either because they are not using Yealinks, or they do but they do not care nor configure them to get this working. And many users, quite a lot, are still using ancient Asterisk versions when PJSIP did not exists at all.</p>
<p dir="auto">I am not sure how to handle it either.. but I am keen on making something if other users find it useful. Any idea or suggestion is welcome.</p>
]]></description><link>http://localhost:4567/post/11553</link><guid isPermaLink="true">http://localhost:4567/post/11553</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Sun, 29 Sep 2019 21:06:17 GMT</pubDate></item><item><title><![CDATA[Reply to Want to send SIP notify to Yealink Phone to make it press a button on Sun, 29 Sep 2019 04:31:25 GMT]]></title><description><![CDATA[<p dir="auto">The reason for this is to have the phone show DND with the built in icon when the operator sets a user's presence via FOP2.</p>
]]></description><link>http://localhost:4567/post/11552</link><guid isPermaLink="true">http://localhost:4567/post/11552</guid><dc:creator><![CDATA[JaredBusch]]></dc:creator><pubDate>Sun, 29 Sep 2019 04:31:25 GMT</pubDate></item></channel></rss>