<div dir="ltr">The dialplan is hit in step 2 (interpreting &quot;1001&quot; and bridging C to D), not step 3 (bridging A to D). There&#39;s no dialing in step 3, so the dialplan is not involved. The bridge is done directly in sofia.c.<div><br></div><div><div style="font-size:12.8px">I seem to have it working with <span style="font-size:small">execute_on_post_bridge.</span></div><div style="font-size:12.8px"><span style="font-size:small"><br></span></div><div style="font-size:12.8px">A clarification: the recording needs to be attached to the external call leg (so everything the customer hears from then on is recorded, regardless of transfers, holds, etc.).<br><div><br></div><div>In the dialplan, I&#39;m exporting a &quot;record_calls&quot; variable to the B leg when one of the recordable extensions is dialed.</div><div><br></div><div>I&#39;m attaching a lua script to execute_on_post_bridge in the incoming and outgoing dialplans for the external SIP profile. The script finds the other leg of the bridge, looks for the record_calls variable, and starts the recording if it&#39;s true (unless there&#39;s already a recording going).</div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">The nice thing about this is no matter how the external leg gets bridged to a recordable extension, this will trigger. So it should handle our IVR, direct dial, internal transfers, whatever.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I&#39;ll document <span style="font-size:small">execute_on_post_bridge</span> as soon as I get Confluence access.</div><div><br></div><div>— Walter</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 27, 2016 at 5:45 AM, Andrew Cassidy <span dir="ltr">&lt;<a href="mailto:andrew@cassidywebservices.co.uk" target="_blank">andrew@cassidywebservices.co.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Transfer hits the dialplan as any other call, so in theory it should just work calling record-session as normal. Is that not the case?</div><div class="gmail_extra"><div><div class="gmail-h5"><br><div class="gmail_quote">On 27 October 2016 at 00:42, Walter Smith <span dir="ltr">&lt;<a href="mailto:walter@carezone.com" target="_blank">walter@carezone.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">No, for regulatory reasons we need to record all calls to and from certain people. If they get an incoming call or make an outgoing one, it&#39;s easily done in the dialplan, but transfers seem to be another level of difficulty.<div><br></div><div>I&#39;ve discovered the execute_on_post_bridge variable and am experimenting with that. (And hope to document it when I&#39;m done.)</div><span class="gmail-m_-9055530278258048156HOEnZb"><font color="#888888"><div><br></div><div>-- Walter</div><div><br><div><br><div><br></div></div></div></font></span></div><div class="gmail-m_-9055530278258048156HOEnZb"><div class="gmail-m_-9055530278258048156h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 26, 2016 at 4:36 PM, Brian West <span dir="ltr">&lt;<a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Are you doing this for billing purposes?</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="gmail-m_-9055530278258048156m_918237432999816692h5">On Wed, Oct 26, 2016 at 6:22 PM, Walter Smith <span dir="ltr">&lt;<a href="mailto:walter@carezone.com" target="_blank">walter@carezone.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_-9055530278258048156m_918237432999816692h5"><div dir="ltr"><div>I need to record calls if/when they touch a certain set of extensions. I have most of the logic working but am baffled by one thing: how do I cause an application (it’s a lua script) to run when a channel is bridged as the result of a transfer?</div><div><br></div><div>My usual bag of tricks isn&#39;t working because the bridge happens &quot;magically&quot; in sofia in response to the REFER. For example, execute_on_answer doesn’t help because the answer happens during the attended transfer -- I need to run AFTER the transfer (that is, when the original A leg is bridged to the attended transfer’s B leg).</div><div><br></div><div>Example scenario:</div><div><br></div><div>1. External call comes in (channel A = PSTN to switch, channel B = switch to phone with extension 1000)</div><div><br></div><div>2. Ext 1000 does an attended transfer to ext 1001 (channel C = 1000 to switch, channel D = switch to 1001)</div><div><br></div><div>3. Transfer completes (sofia bridges channel A to channel D)</div><div><br></div><div>I want my script to run on either channel A or D after 3 happens.</div><div><br></div><div>What’s the best way to do this?</div><div><br></div><div>Thanks,</div><div>Walter</div><div><br></div></div>
<br></div></div>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/free<wbr>switch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_-9055530278258048156m_918237432999816692m_2393425681656659373gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">







<p><font face="courier new, monospace"><b><i><font size="4">Brian West</font></i></b><br><span style="font-size:x-small"><a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a></span></font></p>
<p><font size="1" face="courier new, monospace"><img src="http://billing.freeswitch.org/templates/default/img/whmcslogo.png"><br></font></p><p><font size="2" face="monospace, monospace"><b><i>Twitter: @FreeSWITCH , @briankwest</i></b><br><a href="http://www.freeswitchbook.com" target="_blank">http://www.freeswitchbook.com</a> <wbr>(50% Discount using code FreeSwitch50)<br><a href="http://www.freeswitchcookbook.com" target="_blank">http://www.freeswitchcookbook.<wbr>com</a> </font><span style="font-family:monospace,monospace;font-size:small">(50% Discount using code FreeSwitch50)</span><font size="2" face="monospace, monospace"><br></font><a href="https://www.gofundme.com/freeswitch_ubuntu" style="font-size:12.8px" target="_blank"><font face="monospace, monospace">https://www.gofundme.com/frees<wbr>witch_ubuntu</font></a></p><p><font face="monospace, monospace">Got Bugs? Report them <a href="https://freeswitch.org/jira" target="_blank">here</a>! | Reddit: <a href="https://www.reddit.com/r/freeswitch" target="_blank">/r/freeswitch</a></font></p>
<p><font size="2" face="monospace, monospace"><b>T:</b><a href="tel:%2B19184209001" value="+19184209001" target="_blank">+19184209001</a> | <b>F:</b><a href="tel:%2B19184209002" value="+19184209002" target="_blank">+19184209002</a> | <b>M:</b>+1918424WEST (9378)<br><b>iNUM:</b>+883 5100 1420 9001 | <b>ISN:</b>410*543 | <b>Skype:</b>briankwest</font></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>
<br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/free<wbr>switch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/<wbr>freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br></div></div><div class="gmail-m_-9055530278258048156gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><b>Andrew Cassidy BSc (Hons) MBCS SSCA</b><div>Managing Director<div><div><img src="https://docs.google.com/uc?export=download&amp;id=0B48A-71LkjxcRUlpZlNFZmY5Q2s&amp;revid=0B48A-71LkjxcaWJXYm5XZjdGY1czZFF1citBazFCVXV6R0ZnPQ"><br></div><div><div>03303 880 960 <a href="mailto:andrew@cassidywebservices.co.uk" style="font-size:12.8px" target="_blank">andrew@cassidyweb.co.uk</a> <a href="http://www.cassidywebservices.co.uk" style="font-size:12.8px" target="_blank">ww<wbr>w.cassidyweb.co.uk</a></div></div></div></div></div></div></div></div></div>
</div>
<br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div></div></div>