<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Look at your logs you'll notice that originate is not a dialplan command and after you hang up on the incoming call the channel is dead. The correct way to do this is with a script (probably ESl) that sees the incoming call hangs it up and triggers the originate command<br><br>Sent from my iPhone</div><div><br>On Jun 11, 2016, at 1:26 PM, Deepika Yadav &lt;<a href="mailto:deepikay@iiitd.ac.in">deepikay@iiitd.ac.in</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">sorry for the incomplete message, please ignore the previous message.<div><br></div><div>I am creating the dialplan in this way:<div><br></div><div><div style=""><div style="font-size:12.8px">&lt;include&gt;</div><div style="font-size:12.8px">&nbsp; &lt;extension name="public_did"&gt;</div><div style="font-size:12.8px">&nbsp; &nbsp; &lt;condition field="destination_number" expression="^(88888888)$"&gt; &nbsp;</div><div style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>&lt;action application="set" data="callerID = $${caller_id_number}"/&gt;<span style="white-space:pre-wrap">        </span></div><div style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>&lt;action application="log" data="INFO src number is $${callerID}"/&gt;</div><div style="font-size:12.8px">&nbsp; &nbsp; &nbsp; &nbsp; &lt;action application="respond" data="503"/&gt;</div><div style="font-size:12.8px"><span style="white-space:pre-wrap">        </span>&lt;action application="originate" data="{sip_auth_username=1003,sip_auth_password=*******}sofia/external/<a href="mailto:1003@52.38.67.78" target="_blank">1003@</a>X.X.X.X&nbsp;$<span style="font-size:12.8px">callerID</span><span style="font-size:12.8px">&nbsp;</span><span style="font-size:12.8px">"/&gt;</span></div><div style="font-size:12.8px"><span style="white-space:pre-wrap">        </span></div><div style="font-size:12.8px">&nbsp; &nbsp; &lt;/condition&gt;</div><div style="font-size:12.8px">&nbsp; &lt;/extension&gt;</div><div style="font-size:12.8px">&lt;/include&gt;</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style=""><div><span style="font-size:12.8px">&lt;extension name="show_prepare"&gt;</span></div><div><span style="font-size:12.8px"><span class="" style="white-space:pre">        </span>&lt;condition field="destination_number" expression="^(?:\+91|0|)(\d{10})$"&gt;</span></div><div><span style="font-size:12.8px">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span></div><div><span style="font-size:12.8px"><span class="" style="white-space:pre">        </span>&lt;action application="bridge" data="sofia/gateway/MySIP/91$1"/&gt;</span></div><div><span style="font-size:12.8px">&nbsp; &nbsp; &nbsp; &lt;/condition&gt;</span></div><div><span style="font-size:12.8px">&lt;/extension&gt; &nbsp;</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">After rejecting the call, new channel for outgoing call does not start , also variable "</span><span style="font-size:12.8px">callerID"</span><span style="font-size:12.8px">&nbsp;is set to empty not capturing the source number</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Regards,</span></div><div><span style="font-size:12.8px">Deepika</span></div></div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 11, 2016 at 11:50 PM, Deepika Yadav <span dir="ltr">&lt;<a href="mailto:deepikay@iiitd.ac.in" target="_blank">deepikay@iiitd.ac.in</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I want to reject an incoming call from a mobile number in the public context and callback to it</div><div><br></div><div>how should the dialplan look like:</div><div><br></div><div><br></div><div><div>&lt;include&gt;</div><div>&nbsp; &lt;extension name="public_did"&gt;</div><div>&nbsp; &nbsp; &lt;condition field="destination_number" expression="^(88888888)$"&gt; &nbsp;</div><div><span style="white-space:pre-wrap">        </span>&lt;action application="set" data="domain_name=$${domain}"/&gt;</div><div><span style="white-space:pre-wrap">        </span>&lt;action application="log" data="INFO domain is $${domain}"/&gt;</div><div><span style="white-space:pre-wrap">        </span>&lt;action application="set" data="callerID = $${caller_id_number}"/&gt;<span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>&lt;action application="log" data="INFO src number is $${callerID}"/&gt;</div><div>&lt;action application="respond" data="503"/&gt;</div><div><span style="white-space:pre-wrap">        </span>&lt;action application="bridge" data="{sip_auth_username=1003,sip_auth_password=R@D~o$121$@IIITD}sofia/external/<a href="mailto:1003@52.38.67.78" target="_blank">1003@52.38.67.78</a> 9769658019"/&gt;</div><div><span style="white-space:pre-wrap">        </span>&lt;!--&lt;action application="respond" data="reponse_info" data="407"/&gt; --&gt;</div><div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>&lt;!--&lt;action application="transfer" data="5000 XML default"/&gt; --&gt;</div><div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span> &nbsp;</div><div>&nbsp; &nbsp; &lt;/condition&gt;</div><div>&nbsp; &lt;/extension&gt;</div><div>&lt;/include&gt;</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>Regards,</div><div>Deepika</div></div>
</blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_________________________________________________________________________</span><br><span>Professional FreeSWITCH Consulting Services: </span><br><span><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a></span><br><span><a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a></span><br><span></span><br><span>Official FreeSWITCH Sites</span><br><span><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></span><br><span><a href="http://confluence.freeswitch.org">http://confluence.freeswitch.org</a></span><br><span><a href="http://www.cluecon.com">http://www.cluecon.com</a></span><br><span></span><br><span>FreeSWITCH-users mailing list</span><br><span><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a></span><br><span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></span><br><span>UNSUBSCRIBE:http://<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">lists.freeswitch.org/mailman/options/freeswitch-users</a></span><br><span><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></span></div></blockquote></body></html>