<div dir="ltr">Nathan,<div><br></div><div style> Yes, SIP.. :-)</div><div style><br></div><div style>I ended up deciding to just not allow attended transfer at all since it seemed so hard to deal with. If someone really wants attended transfer they can put the call on hold, dial using the other line then transfer the call on the other line if they want the call on the other end. Same thing, just one more step.</div>
<div style><br></div><div style>I am just going to set a var in sip.conf so when people try to dial out direct, it will catch it in the dial plan and kill the call. With blind transfer I can set a var on the way in and it&#39;s held onto nicely and I can allow the transfer based on that.</div>
<div style><br></div><div style>Again, thanks for your detailed response.</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 16, 2013 at 9:59 PM, Nathan Anderson <span dir="ltr">&lt;<a href="mailto:nathana@fsr.com" target="_blank">nathana@fsr.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Tuesday, April 16, 2013 6:25 PM, Todd Routhier wrote:<br>
<br>
&gt; New Problem, now operators can pick up the previous inbound only line and<br>
&gt; dial out to anything that matches the patterns I have defined in the<br>
&gt; context for their extension in sip.conf.<br>
&gt;<br>
&gt; What I really need to make work here is Attended-Transfer since that is<br>
&gt; what is desired by those using the system.<br>
<br>
</div>I&#39;ll assume we are talking about SIP extensions here.<br>
<br>
What is doing the actual transfer?  Is it Asterisk (res_features / features.conf), or the phones themselves?<br>
<br>
If it is the phones themselves, you&#39;re probably out of luck because in an attended transfer scenario, the transferor has to send a regular ol&#39; INVITE to the transfer target before sending a REFER to the transferee, and so there&#39;s really no way that Asterisk can know whether that INVITE to the transfer target is someone in the middle of attempting an attended transfer, or someone trying to place a regular outbound call.  Your only hope would be to sniff the SIP traffic between your handsets and Asterisk, and see if there is a SIP header difference that is detectable between what your phones generate for an attended transfer vs. an outbound call.  If there is, you can use the ${SIP_HEADER()} function in your dialplan to check for the presence of that difference in order to determine whether a call is an attended transfer or not.<br>

<br>
If you have the option of using Asterisk&#39;s built-in attended transfer feature (features.conf + passing option &#39;t&#39; to the Dial() command that calls a given extension for an inbound call) instead of a button on your phones, you can override which context a transfer target&#39;s number is executed in by overriding the global variable TRANSFER_CONTEXT.  So you can create a new stub context that sets your variable to let you know that this is a transfer and then jumps to the SIP client&#39;s normal context, and set TRANSFER_CONTEXT=your_new_context under the [globals] section of extensions.conf.  Check for the presence of your variable in the SIP client&#39;s context, and act accordingly.<br>

<br>
Note that in either scenario, as long as you allow attended transfers, the system can be gamed by people.  For example, assuming that extensions can call other extensions, someone who wants to make an unsanctioned outbound call simply walks over to a vacant phone in another cubicle, calls their own phone/extension, rushes back to answer it, and then initiates an attended transfer that they never end up completing (they just talk to the person they initiated the transfer to the whole time).<br>

<br>
Hope this helps,<br>
<br>
--<br>
Nathan Anderson<br>
First Step Internet, LLC<br>
<a href="mailto:nathana@fsr.com">nathana@fsr.com</a><br>
<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></div>