<div dir="ltr">Hi John<div><br></div><div>I needed a dialplan solution so thank you very much for the pointer!</div><div><br></div><div>Regards</div><div><br></div><div>Ish</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 9 June 2015 at 17:27, John Kiniston <span dir="ltr"><<a href="mailto:johnkiniston@gmail.com" target="_blank">johnkiniston@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>You can use a custom device state to do it.<br><br>[dnd]<br>;DND Toggle<br>exten => *363,1,Answer()<br> same => n,Set(CURRENT_PRESENCE=${DEVICE_STATE(Custom:DND${CHANNEL(peername)})})<br> same => n,GotoIf($[${CURRENT_PRESENCE}=NOT_INUSE]?*78,1:*79,1)<br>;DND On<br>exten => *78,1,NoOP(Turning DND On)<br> same => n,Set(DEVICE_STATE(Custom:DND${CHANNEL(peername)})=BUSY)<br> same => n,Playback(do-not-disturb&enabled)<br> same => n,Hangup()<br>;DND Off<br>exten => *79,1,NoOP(Turning DND Off)<br> same => n,Set(DEVICE_STATE(Custom:DND${CHANNEL(peername)})=NOT_INUSE)<br> same => n,Playback(do-not-disturb&disabled)<br> same => n,Hangup()<br><br><br></div>Then you can simply hint on your device like:<br><br>exten => _70X,hint,SIP/${EXTEN}&Custom:DND${EXTEN}<br><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Jun 9, 2015 at 9:19 AM, Ishfaq Malik <span dir="ltr"><<a href="mailto:ish@pack-net.co.uk" target="_blank">ish@pack-net.co.uk</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi<div><br></div><div>Is there any way to set the presence state of a peer to in-use in asterisk 1.8? </div><div><br></div><div>The idea is to integrate DND buttons on phones to BLF.</div><div><br></div><div>Regards<br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><pre>Ishfaq Malik
Department: VOIP Support
Company: Packnet Limited
t: <a href="tel:%2B44%20%280%29161%20660%202350" value="+441616602350" target="_blank">+44 (0)161 660 2350</a>
f: <a href="tel:%2B44%20%280%29161%20660%209825" value="+441616609825" target="_blank">+44 (0)161 660 9825</a>
e: <a href="mailto:ish@pack-net.co.uk" target="_blank">ish@pack-net.co.uk</a>
w: <a href="http://www.pack-net.co.uk" target="_blank">http://www.pack-net.co.uk</a>
Registered Address: PACKNET LIMITED, Duplex 2, Ducie House
37 Ducie Street
Manchester, M1 2JW
COMPANY REG NO. 04920552
</pre></div></div></div></div>
</div></div>
<br></div></div><span class="HOEnZb"><font color="#888888">--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div>A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.<br>---Heinlein</div>
</font></span></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div class="gmail_signature"><div dir="ltr"><pre>Ishfaq Malik
Department: VOIP Support
Company: Packnet Limited
t: +44 (0)161 660 2350
f: +44 (0)161 660 9825
e: <a href="mailto:ish@pack-net.co.uk" target="_blank">ish@pack-net.co.uk</a>
w: <a href="http://www.pack-net.co.uk" target="_blank">http://www.pack-net.co.uk</a>
Registered Address: PACKNET LIMITED, Duplex 2, Ducie House
37 Ducie Street
Manchester, M1 2JW
COMPANY REG NO. 04920552
</pre></div></div></div></div>
</div>