<div dir="ltr">Even if I use Hangup command dialplan won't execute the statements after hangup.<div><br></div><div>My basic requirement is when Freeswitch receives a call on an extension, it should reject it and then callback.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 12, 2016 at 9:00 PM, Aqs Younas <span dir="ltr"><<a href="mailto:aqsyounas@gmail.com" target="_blank">aqsyounas@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">You can hangup the call with reason.<br>
<a href="https://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_hangup" target="_blank">https://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_hangup</a></p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Jun 12, 2016 7:36 PM, "Deepika Yadav" <<a href="mailto:deepikay@iiitd.ac.in" target="_blank">deepikay@iiitd.ac.in</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Even in ESL, first I have to reject the call and start a new session.</div><div class="gmail_quote"><br></div><div class="gmail_quote">What is the command to reject a call in mod_python, I tried session.respond() that did not work.</div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">Python script :</div><div class="gmail_quote"><br></div><div class="gmail_quote">def handler(session, args):<br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><div class="gmail_quote"> namer = session.getVariable('caller_id_number')</div><div class="gmail_quote"> freeswitch.consoleLog('info','Called by '+namer)</div><div class="gmail_quote"> session.respond()</div><div class="gmail_quote"> s = freeswitch.Session();</div><div class="gmail_quote"> s.originate(session," {sip_auth_username=1002,sip_auth_password=XXXXXXX}sofia/external/1002@XX.XX.XX.XX 9868789909")</div><div class="gmail_quote"> </div></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">On Sun, Jun 12, 2016 at 12:12 AM, Ken Rice <span dir="ltr"><<a href="mailto:krice@freeswitch.org" target="_blank">krice@freeswitch.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div 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><div><div><br>On Jun 11, 2016, at 1:26 PM, Deepika Yadav <<a href="mailto:deepikay@iiitd.ac.in" target="_blank">deepikay@iiitd.ac.in</a>> 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><div style="font-size:12.8px"><include></div><div style="font-size:12.8px"> <extension name="public_did"></div><div style="font-size:12.8px"> <condition field="destination_number" expression="^(88888888)$"> </div><div style="font-size:12.8px"><span style="white-space:pre-wrap">        </span><action application="set" data="callerID = $${caller_id_number}"/><span style="white-space:pre-wrap">        </span></div><div style="font-size:12.8px"><span style="white-space:pre-wrap">        </span><action application="log" data="INFO src number is $${callerID}"/></div><div style="font-size:12.8px"> <action application="respond" data="503"/></div><div style="font-size:12.8px"><span style="white-space:pre-wrap">        </span><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 $<span style="font-size:12.8px">callerID</span><span style="font-size:12.8px"> </span><span style="font-size:12.8px">"/></span></div><div style="font-size:12.8px"><span style="white-space:pre-wrap">        </span></div><div style="font-size:12.8px"> </condition></div><div style="font-size:12.8px"> </extension></div><div style="font-size:12.8px"></include></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div><div><span style="font-size:12.8px"><extension name="show_prepare"></span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span><condition field="destination_number" expression="^(?:\+91|0|)(\d{10})$"></span></div><div><span style="font-size:12.8px"> </span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">        </span><action application="bridge" data="sofia/gateway/MySIP/91$1"/></span></div><div><span style="font-size:12.8px"> </condition></span></div><div><span style="font-size:12.8px"></extension> </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"> 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"><<a href="mailto:deepikay@iiitd.ac.in" target="_blank">deepikay@iiitd.ac.in</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);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><include></div><div> <extension name="public_did"></div><div> <condition field="destination_number" expression="^(88888888)$"> </div><div><span style="white-space:pre-wrap">        </span><action application="set" data="domain_name=$${domain}"/></div><div><span style="white-space:pre-wrap">        </span><action application="log" data="INFO domain is $${domain}"/></div><div><span style="white-space:pre-wrap">        </span><action application="set" data="callerID = $${caller_id_number}"/><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span><action application="log" data="INFO src number is $${callerID}"/></div><div><action application="respond" data="503"/></div><div><span style="white-space:pre-wrap">        </span><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"/></div><div><span style="white-space:pre-wrap">        </span><!--<action application="respond" data="reponse_info" data="407"/> --></div><div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span><!--<action application="transfer" data="5000 XML default"/> --></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> </div><div> </condition></div><div> </extension></div><div></include></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></div></div><blockquote type="cite"><div><span>_________________________________________________________________________</span><br><span>Professional FreeSWITCH Consulting Services: </span><br><span><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a></span><br><span><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a></span><br><span></span><br><span>Official FreeSWITCH Sites</span><br><span><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span><br><span><a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a></span><br><span><a href="http://www.cluecon.com" target="_blank">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" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a></span><br><span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></span><br><span>UNSUBSCRIBE:http://<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">lists.freeswitch.org/mailman/options/freeswitch-users</a></span><br><span><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span></div></blockquote></div><br>_________________________________________________________________________<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.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.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" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/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>
<br>_________________________________________________________________________<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.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.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" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div>
</div></div><br>_________________________________________________________________________<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.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.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.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/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>