<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi All,<div><br></div><div>I just posted a proposal to add Device State information to the Asterisk 1.8 CCSS (Call Completion Supplemental Service).</div><div><br></div><div>Details of my proposal can be seen on the ticket:</div><div><br></div><div>https://issues.asterisk.org/view.php?id=18788</div><div><br></div><div>I believe I have the bulk of what would be needed in that ticket and the attached file to make this work, but I have not coded in C for many years, so I am hoping I can solicit the help of someone a bit more fluent and used to Asterisk coding to make this a reality.</div><div><br></div><div>Here is the proposal as written in the ticket, please provide feedback in the ticket and or let me know if you would like to help with this. I'm hoping, with CCSS being very new, that we might be able to have this new feature added within the 1.8 release as it
 greatly enhances the capabilities and the actual changes to the primary ccss.c logic are extremely minimal.</div><div><br></div><div><span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">CCSS Asterisk Device States Proposal<br><br>Proposal to Add Asterisk Device State information and callbacks to the<br>Call Completion Supplemental Services for generic agents.<br><br>There are currently not many devices that have native support for CCSS and<br>even as they come available there may be other reasons why one may choose not&nbsp;to take advantage of the native abilities and stick with the generic<br>implementation which is quite capable and could be greatly enhanced by adding&nbsp;device state capabilities that a phone could subscribe to with a BLF key in&nbsp;conjuction with Asterisk hints.<br><br>The advantages of this would allow a single
 button that could be programmed to&nbsp;trigger a CCSS related feature code that can be used to both Request and<br>Cancel CCSS requests as well as display the current state of a CCSS Request.<br><br>By example, I may have a single button that when no lit, there is no active&nbsp;<br>CCSS request. When I press that button, my dialplan can query the state<br>DEVICE_STATE() associated with that Caller to determine whether they should be&nbsp;calling CallCompletionRequest() or CallCompletionCancel(). If there is<br>currently a pending request, then the dialplan would Cancel() it. This also has<br>the advantage of showing the true state of a Request() which is an<br>asynchronous call and even when Request() thinks it was successful, the actual&nbsp;request could ultimately fail. Once lit, further feedback can now be provided&nbsp;to the Caller about the current state of their Request() since it will be<br>updated by the CCSS State Machine as
 appropriate.<br><br>The DEVICE_STATE mappings should be configurable since the BLF being&nbsp;<br>used on a give phone type may vary. The idea is to allow some level of&nbsp;<br>customization as to the phone's behavior.<br><br>As an example, I may want my BLF key to go solid once I have requested a<br>callback. I may then want my led to blink (typically ringing) when either the<br>callback is in process which is a visual indication that the incoming call is<br>the desired callback, or I may want it to blink when the callee is ready buy I<br>am busy, giving me a visual indication that the target is available as I may<br>want to get off the line so that the callback can be successful.<br><br>The proposal is to send device state information back via the<br>ast_devstate_prov_add callback for any device (or at least generic device)<br>as they traverse through the state machine. We simply provide a map<br>between CC_STATE values and corresponding AST_DEVICE
 state values.<br><br>We could then generate hints against these States similar to what is possible<br>today with Custom Devstates or MeetMe states. By example, I may have an extension&nbsp;<br>3000 that is currently associated with device SIP/3000. I could then create a&nbsp;<br>feature code for that extension that may look something like:<br><br>exten =&gt; *823000,hint,ccss:sip/3000<br><br>One would then subscribe a blf button to *823000 which would point to the dialplan&nbsp;<br>that handled my CCSS Requests/Cancels using the available DEVICE_STATE()&nbsp;<br>information about ccss:sip/3000 to make the decsions what to do.</span></div><div><br></div></td></tr></table><br>