Francois,<br><br>Thanks for the example in your situation. I think that, to control what you want the channel to do on a transfer, still does not need to be overly complex.<br><br>It looks like you are first bridging to specific endpoints. You have various options available to you for setting force_transfer_context on the a-leg when the bridge happens (even an using execute_on_answer or api_on_answer or whatever). The b-leg that answers can execute the appropriate set onto the a-leg (even using uuid_setvar or something else). Then, any subsequent transfer would involve the context you desire.<br>
<br>- Steve<br><br><div class="gmail_quote">On Mon, Nov 22, 2010 at 1:23 AM, François Delawarde <span dir="ltr"><<a href="mailto:fdelawarde@wirelessmundi.com">fdelawarde@wirelessmundi.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Steve,<br>
<br>
Thanks for your view on this. My point was that by default a blind<br>
transfer acts differently from an attended transfer as it uses the<br>
transferee's context instead of the transferer's.<br>
<br>
It can in some way be controlled as you mention, but having to implement<br>
something quite complex only to have blind and attended xfers behaving<br>
in the same way seems a bit overkill.<br>
<br>
<br>
For example, if I wish to use the B-leg's context as transfer_context<br>
for the A-leg (as in attended xfers), then when bridging to a group it<br>
can become a bit complicated:<br>
<br>
<action application="bridge" data="user/<a href="mailto:100@example.com">100@example.com</a>,user/<a href="mailto:101@example.com">101@example.com</a>,..."/><br>
<br>
In that case, I would have to use a lua script to set the<br>
force_transfer_context to the B-leg's context on answer (because<br>
beforehand you wouldn't know who is going to take the call), so that if<br>
a transfer happens, it goes in the correct context.<br>
<font color="#888888"><br>
François.<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
<br>
On Fri, 2010-11-19 at 15:39 -0500, S W wrote:<br>
> And here we have a start on the wiki page<br>
><br>
> <a href="http://wiki.freeswitch.org/wiki/Force_transfer_context_example" target="_blank">http://wiki.freeswitch.org/wiki/Force_transfer_context_example</a><br>
><br>
> On Fri, Nov 19, 2010 at 3:34 PM, S W <<a href="mailto:steve.d.ward@gmail.com">steve.d.ward@gmail.com</a>> wrote:<br>
> I can go ahead and start a wiki page on this. Feedback is<br>
> welcome.<br>
><br>
> I tried to make a general template-type single code file<br>
> people can use and work with.<br>
><br>
> <a href="http://pastebin.freeswitch.org/14560" target="_blank">http://pastebin.freeswitch.org/14560</a><br>
><br>
><br>
><br>
><br>
><br>
> On Fri, Nov 19, 2010 at 2:48 PM, Michael Collins<br>
> <<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>> wrote:<br>
> Could you pastebin your dialplan? I'd like to let<br>
> others try it out. Once it's confirmed we'll wikify<br>
> it.<br>
> -MC<br>
><br>
><br>
><br>
> On Fri, Nov 19, 2010 at 9:08 AM, S W<br>
> <<a href="mailto:steve.d.ward@gmail.com">steve.d.ward@gmail.com</a>> wrote:<br>
> Just as a comment, I have recently employed<br>
> the functionality of force_transfer_context,<br>
> and it is great exactly as it is.<br>
><br>
> In my scenario I need to control how the<br>
> channel RECEIVING a transfer/REFER handles<br>
> that transfer.<br>
><br>
> For example, I never want incoming calls to<br>
> directly access certain call paths on my box.<br>
> But, if a channel receives a REFER to off-box<br>
> destination X, I want to handle that (even<br>
> though my default context for incoming calls<br>
> doesn't allow for destination X).<br>
><br>
> So I have a context that is not associated<br>
> with my SIP profile for incoming calls. And<br>
> that context has routing logic for destination<br>
> X. And I use force_transfer_context so that,<br>
> when a channel is bridged and gets a REFER to<br>
> destination X, the ROUTING state sends the<br>
> channel through my special context for<br>
> handling transfers.<br>
><br>
> It's awesome!!!<br>
><br>
> And just as another note on your comment,<br>
> Francois - a transferer has total control over<br>
> where he transfers another channel (e.g. you<br>
> can use dialplan context and extension, etc<br>
> etc. right in transfer app).<br>
><br>
> These channel vars - force_transfer_context<br>
> and force_transfer_dialplan - allow for<br>
> controlling how a channel reacts to getting a<br>
> transfer/REFER thrown at it.<br>
><br>
> Anyway, just a comment....<br>
><br>
><br>
><br>
> On Fri, Nov 19, 2010 at 11:45 AM, François<br>
> Delawarde <<a href="mailto:fdelawarde@wirelessmundi.com">fdelawarde@wirelessmundi.com</a>><br>
> wrote:<br>
> Problem is those variables must be set<br>
> on the channel that has to be<br>
> transfered and not the channel that<br>
> performs the transfer.<br>
><br>
> I thought it would be more logical to<br>
> use the transferer context by<br>
> default (just like in attended xfers),<br>
> and for those variables to be set<br>
> on the transferer's side.<br>
><br>
> François.<br>
><br>
><br>
><br>
> On Fri, 2010-11-19 at 08:32 -0600,<br>
> Brian West wrote:<br>
> > force_transfer_dialplan<br>
> > force_transfer_context<br>
> ><br>
> ><br>
> > You can't tell if a transfer is<br>
> blind or attended.<br>
> ><br>
> ><br>
> > /b<br>
> ><br>
> > On Nov 19, 2010, at 5:04 AM,<br>
> François Delawarde wrote:<br>
> ><br>
> > > Hello,<br>
> > ><br>
> > > I pastebined a very simple<br>
> configuration for you to reproduce:<br>
> > ><br>
> <a href="http://pastebin.freeswitch.org/14552" target="_blank">http://pastebin.freeswitch.org/14552</a><br>
> > ><br>
> > > We have user 100 in context<br>
> "public", 101 and 102 in context<br>
> > > "local".<br>
> > ><br>
> > > Scenario:<br>
> > > 1. 100 calls destination "123"<br>
> > > 2. 101 answers, and transfers to<br>
> 102<br>
> > ><br>
> > > In step 2., if 101 does an<br>
> attended transfer, it will of course<br>
> use<br>
> > > its<br>
> > > own context (local) and the<br>
> transfer will work. Now if 101 does a<br>
> > > blind<br>
> > > transfer instead, it will use the<br>
> context of the other leg (100 =><br>
> > > public) and it will not work.<br>
> > ><br>
> > > I think it should behave the same<br>
> way for both types of transfer by<br>
> > > default. A workaround is to set<br>
> force_transfer_context (uncomment<br>
> > > the<br>
> > > line on the "public" dialplan) in<br>
> the channel to be transfered,<br>
> > > which<br>
> > > can be a pain with more complex<br>
> configurations.<br>
> > ><br>
> > > Thanks,<br>
> > > François.<br>
> ><br>
> ><br>
><br>
> ><br>
> _______________________________________________<br>
> > FreeSWITCH-users mailing list<br>
> ><br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
> ><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> ><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
> _______________________________________________<br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br>