<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">I currently run an Asterisk 10 system with hotdesking functionality set up.&nbsp; Several of the users have worked with a system in the past that supported BLF on their IP phones, and would like their current phones to behave in a similar fashion.&nbsp;
 Right now I have a really kludgy system that mostly works, but doesn&#8217;t consistently trigger the cleanup macro to &#8220;clear&#8221; the device state on the end of a call.&nbsp; Rather than continue to beat my head against the wall playing &#8220;which context isn&#8217;t firing an h
 extension to dump calls into the cleanup macro&#8221;, I decided to investigate Asterisk 11 for the new Dial() b function and the new hangup handler CHANNEL variable.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I have the hints working more or less correctly on direct calls to/from the phones, making use of the b and U functions in Dial() and some judicious use of GROUP channel variables and CHANNEL(hangup_handler_wipe).&nbsp; But, on my live system,
 sometimes the users receive calls from a queue, and I don&#8217;t see any way with the queue calls to emulate the b functionality in Dial() to be able to set the agent extension&#8217;s device state to RINGING when the queue call gets created.&nbsp; Obviously, I can use membergosub
 to set the agent to &#8220;INUSE&#8221; after they pick up the call (like Dial() U), but is there anything that I can use to manipulate the channel that is calling the agent while/before it is ringing?<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Thank you,<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Noah Engelberth<o:p></o:p></p>
<p class="MsoNormal">MetaLINK Technologies<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>