Reject Inbound Call and Callback
Hi, I want to reject an incoming call from a mobile number in the public context and callback to it how should the dialplan look like: <include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="domain_name=$${domain}"/> <action application="log" data="INFO domain is $${domain}"/> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="bridge" data="{sip_auth_username=1003,sip_auth_password=R@D ~o$121$@IIITD}sofia/external/1003@52.38.67.78 9769658019"/> <!--<action application="respond" data="reponse_info" data="407"/> --> <!--<action application="transfer" data="5000 XML default"/> --> </condition> </extension> </include> Regards, Deepika
sorry for the incomplete message, please ignore the previous message. I am creating the dialplan in this way: <include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="originate" data="{sip_auth_username=1003,sip_auth_password=*******}sofia/external/1003@ <1003@52.38.67.78>X.X.X.X $callerID "/> </condition> </extension> </include> <extension name="show_prepare"> <condition field="destination_number" expression="^(?:\+91|0|)(\d{10})$"> <action application="bridge" data="sofia/gateway/MySIP/91$1"/> </condition> </extension> After rejecting the call, new channel for outgoing call does not start , also variable "callerID" is set to empty not capturing the source number Regards, Deepika On Sat, Jun 11, 2016 at 11:50 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Hi,
I want to reject an incoming call from a mobile number in the public context and callback to it
how should the dialplan look like:
<include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="domain_name=$${domain}"/> <action application="log" data="INFO domain is $${domain}"/> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="bridge" data="{sip_auth_username=1003,sip_auth_password=R@D ~o$121$@IIITD}sofia/external/1003@52.38.67.78 9769658019"/> <!--<action application="respond" data="reponse_info" data="407"/> --> <!--<action application="transfer" data="5000 XML default"/> -->
</condition> </extension> </include>
Regards, Deepika
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 Sent from my iPhone
On Jun 11, 2016, at 1:26 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
sorry for the incomplete message, please ignore the previous message.
I am creating the dialplan in this way:
<include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="originate" data="{sip_auth_username=1003,sip_auth_password=*******}sofia/external/1003@X.X.X.X $callerID "/>
</condition> </extension> </include>
<extension name="show_prepare"> <condition field="destination_number" expression="^(?:\+91|0|)(\d{10})$">
<action application="bridge" data="sofia/gateway/MySIP/91$1"/> </condition> </extension>
After rejecting the call, new channel for outgoing call does not start , also variable "callerID" is set to empty not capturing the source number
Regards, Deepika
On Sat, Jun 11, 2016 at 11:50 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote: Hi,
I want to reject an incoming call from a mobile number in the public context and callback to it
how should the dialplan look like:
<include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="domain_name=$${domain}"/> <action application="log" data="INFO domain is $${domain}"/> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="bridge" data="{sip_auth_username=1003,sip_auth_password=R@D~o$121$@IIITD}sofia/external/1003@52.38.67.78 9769658019"/> <!--<action application="respond" data="reponse_info" data="407"/> -->
<!--<action application="transfer" data="5000 XML default"/> -->
</condition> </extension> </include>
Regards, Deepika
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Even in ESL, first I have to reject the call and start a new session. What is the command to reject a call in mod_python, I tried session.respond() that did not work. Python script : def handler(session, args): namer = session.getVariable('caller_id_number') freeswitch.consoleLog('info','Called by '+namer) session.respond() s = freeswitch.Session(); s.originate(session," {sip_auth_username=1002,sip_auth_password=XXXXXXX}sofia/external/1002@XX.XX.XX.XX 9868789909") On Sun, Jun 12, 2016 at 12:12 AM, Ken Rice <krice@freeswitch.org> wrote:
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
Sent from my iPhone
On Jun 11, 2016, at 1:26 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
sorry for the incomplete message, please ignore the previous message.
I am creating the dialplan in this way:
<include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="originate" data="{sip_auth_username=1003,sip_auth_password=*******}sofia/external/ 1003@ <1003@52.38.67.78>X.X.X.X $callerID "/> </condition> </extension> </include>
<extension name="show_prepare"> <condition field="destination_number" expression="^(?:\+91|0|)(\d{10})$">
<action application="bridge" data="sofia/gateway/MySIP/91$1"/> </condition> </extension>
After rejecting the call, new channel for outgoing call does not start , also variable "callerID" is set to empty not capturing the source number
Regards, Deepika
On Sat, Jun 11, 2016 at 11:50 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Hi,
I want to reject an incoming call from a mobile number in the public context and callback to it
how should the dialplan look like:
<include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="domain_name=$${domain}"/> <action application="log" data="INFO domain is $${domain}"/> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="bridge" data="{sip_auth_username=1003,sip_auth_password=R@D ~o$121$@IIITD}sofia/external/1003@52.38.67.78 9769658019"/> <!--<action application="respond" data="reponse_info" data="407"/> --> <!--<action application="transfer" data="5000 XML default"/> -->
</condition> </extension> </include>
Regards, Deepika
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
You can hangup the call with reason. https://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_hangup On Jun 12, 2016 7:36 PM, "Deepika Yadav" <deepikay@iiitd.ac.in> wrote:
Even in ESL, first I have to reject the call and start a new session.
What is the command to reject a call in mod_python, I tried session.respond() that did not work.
Python script :
def handler(session, args):
namer = session.getVariable('caller_id_number') freeswitch.consoleLog('info','Called by '+namer) session.respond() s = freeswitch.Session(); s.originate(session," {sip_auth_username=1002,sip_auth_password=XXXXXXX}sofia/external/1002@XX.XX.XX.XX 9868789909")
On Sun, Jun 12, 2016 at 12:12 AM, Ken Rice <krice@freeswitch.org> wrote:
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
Sent from my iPhone
On Jun 11, 2016, at 1:26 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
sorry for the incomplete message, please ignore the previous message.
I am creating the dialplan in this way:
<include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="originate" data="{sip_auth_username=1003,sip_auth_password=*******}sofia/external/ 1003@ <1003@52.38.67.78>X.X.X.X $callerID "/> </condition> </extension> </include>
<extension name="show_prepare"> <condition field="destination_number" expression="^(?:\+91|0|)(\d{10})$">
<action application="bridge" data="sofia/gateway/MySIP/91$1"/> </condition> </extension>
After rejecting the call, new channel for outgoing call does not start , also variable "callerID" is set to empty not capturing the source number
Regards, Deepika
On Sat, Jun 11, 2016 at 11:50 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Hi,
I want to reject an incoming call from a mobile number in the public context and callback to it
how should the dialplan look like:
<include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="domain_name=$${domain}"/> <action application="log" data="INFO domain is $${domain}"/> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="bridge" data="{sip_auth_username=1003,sip_auth_password=R@D ~o$121$@IIITD}sofia/external/1003@52.38.67.78 9769658019"/> <!--<action application="respond" data="reponse_info" data="407"/> --> <!--<action application="transfer" data="5000 XML default"/> -->
</condition> </extension> </include>
Regards, Deepika
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Even if I use Hangup command dialplan won't execute the statements after hangup. My basic requirement is when Freeswitch receives a call on an extension, it should reject it and then callback. On Sun, Jun 12, 2016 at 9:00 PM, Aqs Younas <aqsyounas@gmail.com> wrote:
You can hangup the call with reason. https://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_hangup On Jun 12, 2016 7:36 PM, "Deepika Yadav" <deepikay@iiitd.ac.in> wrote:
Even in ESL, first I have to reject the call and start a new session.
What is the command to reject a call in mod_python, I tried session.respond() that did not work.
Python script :
def handler(session, args):
namer = session.getVariable('caller_id_number') freeswitch.consoleLog('info','Called by '+namer) session.respond() s = freeswitch.Session(); s.originate(session," {sip_auth_username=1002,sip_auth_password=XXXXXXX}sofia/external/1002@XX.XX.XX.XX 9868789909")
On Sun, Jun 12, 2016 at 12:12 AM, Ken Rice <krice@freeswitch.org> wrote:
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
Sent from my iPhone
On Jun 11, 2016, at 1:26 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
sorry for the incomplete message, please ignore the previous message.
I am creating the dialplan in this way:
<include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="originate" data="{sip_auth_username=1003,sip_auth_password=*******}sofia/external/ 1003@ <1003@52.38.67.78>X.X.X.X $callerID "/> </condition> </extension> </include>
<extension name="show_prepare"> <condition field="destination_number" expression="^(?:\+91|0|)(\d{10})$">
<action application="bridge" data="sofia/gateway/MySIP/91$1"/> </condition> </extension>
After rejecting the call, new channel for outgoing call does not start , also variable "callerID" is set to empty not capturing the source number
Regards, Deepika
On Sat, Jun 11, 2016 at 11:50 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Hi,
I want to reject an incoming call from a mobile number in the public context and callback to it
how should the dialplan look like:
<include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="domain_name=$${domain}"/> <action application="log" data="INFO domain is $${domain}"/> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="bridge" data="{sip_auth_username=1003,sip_auth_password=R@D ~o$121$@IIITD}sofia/external/1003@52.38.67.78 9769658019"/> <!--<action application="respond" data="reponse_info" data="407"/> --> <!--<action application="transfer" data="5000 XML default"/> -->
</condition> </extension> </include>
Regards, Deepika
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Ok let me try this again. Once the incoming call is hung up, the call is dead and anything processing on the channel (except the CDR) is done. No further commands in the dial-plan will execute. If you need pro help with this contact consulting@freeswitch.org and one of us pros can knock this out pretty fast for you Sent from my iPhone
On Jun 12, 2016, at 12:01 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Even if I use Hangup command dialplan won't execute the statements after hangup.
My basic requirement is when Freeswitch receives a call on an extension, it should reject it and then callback.
On Sun, Jun 12, 2016 at 9:00 PM, Aqs Younas <aqsyounas@gmail.com> wrote: You can hangup the call with reason. https://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_hangup
On Jun 12, 2016 7:36 PM, "Deepika Yadav" <deepikay@iiitd.ac.in> wrote: Even in ESL, first I have to reject the call and start a new session.
What is the command to reject a call in mod_python, I tried session.respond() that did not work.
Python script :
def handler(session, args):
namer = session.getVariable('caller_id_number') freeswitch.consoleLog('info','Called by '+namer) session.respond() s = freeswitch.Session(); s.originate(session," {sip_auth_username=1002,sip_auth_password=XXXXXXX}sofia/external/1002@XX.XX.XX.XX 9868789909")
On Sun, Jun 12, 2016 at 12:12 AM, Ken Rice <krice@freeswitch.org> wrote: 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
Sent from my iPhone
On Jun 11, 2016, at 1:26 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
sorry for the incomplete message, please ignore the previous message.
I am creating the dialplan in this way:
<include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="originate" data="{sip_auth_username=1003,sip_auth_password=*******}sofia/external/1003@X.X.X.X $callerID "/>
</condition> </extension> </include>
<extension name="show_prepare"> <condition field="destination_number" expression="^(?:\+91|0|)(\d{10})$">
<action application="bridge" data="sofia/gateway/MySIP/91$1"/> </condition> </extension>
After rejecting the call, new channel for outgoing call does not start , also variable "callerID" is set to empty not capturing the source number
Regards, Deepika
On Sat, Jun 11, 2016 at 11:50 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote: Hi,
I want to reject an incoming call from a mobile number in the public context and callback to it
how should the dialplan look like:
<include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="domain_name=$${domain}"/> <action application="log" data="INFO domain is $${domain}"/> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="bridge" data="{sip_auth_username=1003,sip_auth_password=R@D~o$121$@IIITD}sofia/external/1003@52.38.67.78 9769658019"/> <!--<action application="respond" data="reponse_info" data="407"/> -->
<!--<action application="transfer" data="5000 XML default"/> -->
</condition> </extension> </include>
Regards, Deepika
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Thanks Ken, I have figured it out, I used a Python module that reject the call by hangup() and then created a new session for outgoing call. On 13-Jun-2016 12:39 am, "Ken Rice" <krice@freeswitch.org> wrote:
Ok let me try this again. Once the incoming call is hung up, the call is dead and anything processing on the channel (except the CDR) is done. No further commands in the dial-plan will execute.
If you need pro help with this contact consulting@freeswitch.org and one of us pros can knock this out pretty fast for you
Sent from my iPhone
On Jun 12, 2016, at 12:01 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Even if I use Hangup command dialplan won't execute the statements after hangup.
My basic requirement is when Freeswitch receives a call on an extension, it should reject it and then callback.
On Sun, Jun 12, 2016 at 9:00 PM, Aqs Younas <aqsyounas@gmail.com> wrote:
You can hangup the call with reason. https://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_hangup On Jun 12, 2016 7:36 PM, "Deepika Yadav" <deepikay@iiitd.ac.in> wrote:
Even in ESL, first I have to reject the call and start a new session.
What is the command to reject a call in mod_python, I tried session.respond() that did not work.
Python script :
def handler(session, args):
namer = session.getVariable('caller_id_number') freeswitch.consoleLog('info','Called by '+namer) session.respond() s = freeswitch.Session(); s.originate(session," {sip_auth_username=1002,sip_auth_password=XXXXXXX} sofia/external/1002@XX.XX.XX.XX <sofia/external/1002@xx.xx.xx.xx> 9868789909")
On Sun, Jun 12, 2016 at 12:12 AM, Ken Rice <krice@freeswitch.org> wrote:
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
Sent from my iPhone
On Jun 11, 2016, at 1:26 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
sorry for the incomplete message, please ignore the previous message.
I am creating the dialplan in this way:
<include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="originate" data="{sip_auth_username=1003,sip_auth_password=*******}sofia/external/ 1003@ <1003@52.38.67.78>X.X.X.X $callerID "/> </condition> </extension> </include>
<extension name="show_prepare"> <condition field="destination_number" expression="^(?:\+91|0|)(\d{10})$">
<action application="bridge" data="sofia/gateway/MySIP/91$1"/> </condition> </extension>
After rejecting the call, new channel for outgoing call does not start , also variable "callerID" is set to empty not capturing the source number
Regards, Deepika
On Sat, Jun 11, 2016 at 11:50 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Hi,
I want to reject an incoming call from a mobile number in the public context and callback to it
how should the dialplan look like:
<include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="domain_name=$${domain}"/> <action application="log" data="INFO domain is $${domain}"/> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="bridge" data="{sip_auth_username=1003,sip_auth_password=R@D ~o$121$@IIITD}sofia/external/1003@52.38.67.78 9769658019"/> <!--<action application="respond" data="reponse_info" data="407"/> --> <!--<action application="transfer" data="5000 XML default"/> -->
</condition> </extension> </include>
Regards, Deepika
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http:// lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi Deepika, Would you mind sharing how you did it? I'm kinda curious. Do you subscribe to events through python and accordingly or do you run a python script from the dialplan? I'd love to see your python script as I normally use LUA and I want to give python a try. Thanks, Joel. On Sun, Jun 12, 2016 at 8:02 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Thanks Ken,
I have figured it out, I used a Python module that reject the call by hangup() and then created a new session for outgoing call. On 13-Jun-2016 12:39 am, "Ken Rice" <krice@freeswitch.org> wrote:
Ok let me try this again. Once the incoming call is hung up, the call is dead and anything processing on the channel (except the CDR) is done. No further commands in the dial-plan will execute.
If you need pro help with this contact consulting@freeswitch.org and one of us pros can knock this out pretty fast for you
Sent from my iPhone
On Jun 12, 2016, at 12:01 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Even if I use Hangup command dialplan won't execute the statements after hangup.
My basic requirement is when Freeswitch receives a call on an extension, it should reject it and then callback.
On Sun, Jun 12, 2016 at 9:00 PM, Aqs Younas <aqsyounas@gmail.com> wrote:
You can hangup the call with reason. https://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_hangup On Jun 12, 2016 7:36 PM, "Deepika Yadav" <deepikay@iiitd.ac.in> wrote:
Even in ESL, first I have to reject the call and start a new session.
What is the command to reject a call in mod_python, I tried session.respond() that did not work.
Python script :
def handler(session, args):
namer = session.getVariable('caller_id_number') freeswitch.consoleLog('info','Called by '+namer) session.respond() s = freeswitch.Session(); s.originate(session," {sip_auth_username=1002,sip_auth_password=XXXXXXX} sofia/external/1002@XX.XX.XX.XX <sofia/external/1002@xx.xx.xx.xx> 9868789909")
On Sun, Jun 12, 2016 at 12:12 AM, Ken Rice <krice@freeswitch.org> wrote:
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
Sent from my iPhone
On Jun 11, 2016, at 1:26 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
sorry for the incomplete message, please ignore the previous message.
I am creating the dialplan in this way:
<include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="originate" data="{sip_auth_username=1003,sip_auth_password=*******}sofia/external/ 1003@ <1003@52.38.67.78>X.X.X.X $callerID "/> </condition> </extension> </include>
<extension name="show_prepare"> <condition field="destination_number" expression="^(?:\+91|0|)(\d{10})$">
<action application="bridge" data="sofia/gateway/MySIP/91$1"/> </condition> </extension>
After rejecting the call, new channel for outgoing call does not start , also variable "callerID" is set to empty not capturing the source number
Regards, Deepika
On Sat, Jun 11, 2016 at 11:50 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Hi,
I want to reject an incoming call from a mobile number in the public context and callback to it
how should the dialplan look like:
<include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="domain_name=$${domain}"/> <action application="log" data="INFO domain is $${domain}"/> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="bridge" data="{sip_auth_username=1003,sip_auth_password=R@D ~o$121$@IIITD}sofia/external/1003@52.38.67.78 9769658019"/> <!--<action application="respond" data="reponse_info" data="407"/> --> <!--<action application="transfer" data="5000 XML default"/> -->
</condition> </extension> </include>
Regards, Deepika
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http:// lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
You can follow the mod_python Wiki : https://wiki.freeswitch.org/wiki/Mod_python Inside the handler() session.hangup() new_api_obj = API() command_string = "originate {sip_auth_username=1002,sip_auth_password=XXXXXXX}sofia/external/1002@XX.XX.XX.XX "+dialled_number new_api_obj.executeString(command_string) Here, it creates a new session after previous session is hungup completely and makes an outbound call I want play my own IVR menu when dialling to the dialled_number, to do some actions on DTMF inputs. So, I use the command : command_string = "sofia/gateway/MySIP/"+callerid+" 4449" Here, it does not create a new session and report as "USER_BUSY", since it did not hungup in case before creating a new channel On Mon, Jun 13, 2016 at 10:33 AM, Joel Serrano <joel@gogii.net> wrote:
Hi Deepika,
Would you mind sharing how you did it? I'm kinda curious. Do you subscribe to events through python and accordingly or do you run a python script from the dialplan?
I'd love to see your python script as I normally use LUA and I want to give python a try.
Thanks, Joel.
On Sun, Jun 12, 2016 at 8:02 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Thanks Ken,
I have figured it out, I used a Python module that reject the call by hangup() and then created a new session for outgoing call. On 13-Jun-2016 12:39 am, "Ken Rice" <krice@freeswitch.org> wrote:
Ok let me try this again. Once the incoming call is hung up, the call is dead and anything processing on the channel (except the CDR) is done. No further commands in the dial-plan will execute.
If you need pro help with this contact consulting@freeswitch.org and one of us pros can knock this out pretty fast for you
Sent from my iPhone
On Jun 12, 2016, at 12:01 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Even if I use Hangup command dialplan won't execute the statements after hangup.
My basic requirement is when Freeswitch receives a call on an extension, it should reject it and then callback.
On Sun, Jun 12, 2016 at 9:00 PM, Aqs Younas <aqsyounas@gmail.com> wrote:
You can hangup the call with reason. https://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_hangup On Jun 12, 2016 7:36 PM, "Deepika Yadav" <deepikay@iiitd.ac.in> wrote:
Even in ESL, first I have to reject the call and start a new session.
What is the command to reject a call in mod_python, I tried session.respond() that did not work.
Python script :
def handler(session, args):
namer = session.getVariable('caller_id_number') freeswitch.consoleLog('info','Called by '+namer) session.respond() s = freeswitch.Session(); s.originate(session," {sip_auth_username=1002,sip_auth_password=XXXXXXX} sofia/external/1002@XX.XX.XX.XX <sofia/external/1002@xx.xx.xx.xx> 9868789909")
On Sun, Jun 12, 2016 at 12:12 AM, Ken Rice <krice@freeswitch.org> wrote:
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
Sent from my iPhone
On Jun 11, 2016, at 1:26 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
sorry for the incomplete message, please ignore the previous message.
I am creating the dialplan in this way:
<include> <extension name="public_did"> <condition field="destination_number" expression="^(88888888)$"> <action application="set" data="callerID = $${caller_id_number}"/> <action application="log" data="INFO src number is $${callerID}"/> <action application="respond" data="503"/> <action application="originate" data="{sip_auth_username=1003,sip_auth_password=*******}sofia/external/ 1003@ <1003@52.38.67.78>X.X.X.X $callerID "/> </condition> </extension> </include>
<extension name="show_prepare"> <condition field="destination_number" expression="^(?:\+91|0|)(\d{10})$">
<action application="bridge" data="sofia/gateway/MySIP/91$1"/> </condition> </extension>
After rejecting the call, new channel for outgoing call does not start , also variable "callerID" is set to empty not capturing the source number
Regards, Deepika
On Sat, Jun 11, 2016 at 11:50 PM, Deepika Yadav <deepikay@iiitd.ac.in > wrote:
> Hi, > > I want to reject an incoming call from a mobile number in the public > context and callback to it > > how should the dialplan look like: > > > <include> > <extension name="public_did"> > <condition field="destination_number" expression="^(88888888)$"> > > <action application="set" data="domain_name=$${domain}"/> > <action application="log" data="INFO domain is $${domain}"/> > <action application="set" data="callerID = $${caller_id_number}"/> > <action application="log" data="INFO src number is $${callerID}"/> > <action application="respond" data="503"/> > <action application="bridge" > data="{sip_auth_username=1003,sip_auth_password=R@D > ~o$121$@IIITD}sofia/external/1003@52.38.67.78 9769658019"/> > <!--<action application="respond" data="reponse_info" data="407"/> > --> > <!--<action application="transfer" data="5000 XML default"/> --> > > </condition> > </extension> > </include> > > > > > > > Regards, > Deepika >
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http:// lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I'll check it out. Thanks! On Mon, Jun 13, 2016 at 2:56 AM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
You can follow the mod_python Wiki :
https://wiki.freeswitch.org/wiki/Mod_python
Inside the handler()
session.hangup() new_api_obj = API() command_string = "originate {sip_auth_username=1002,sip_auth_password=XXXXXXX}sofia/external/1002@XX.XX.XX.XX "+dialled_number new_api_obj.executeString(command_string)
Here, it creates a new session after previous session is hungup completely and makes an outbound call
I want play my own IVR menu when dialling to the dialled_number, to do some actions on DTMF inputs. So, I use the command :
command_string = "sofia/gateway/MySIP/"+callerid+" 4449"
Here, it does not create a new session and report as "USER_BUSY", since it did not hungup in case before creating a new channel
On Mon, Jun 13, 2016 at 10:33 AM, Joel Serrano <joel@gogii.net> wrote:
Hi Deepika,
Would you mind sharing how you did it? I'm kinda curious. Do you subscribe to events through python and accordingly or do you run a python script from the dialplan?
I'd love to see your python script as I normally use LUA and I want to give python a try.
Thanks, Joel.
On Sun, Jun 12, 2016 at 8:02 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Thanks Ken,
I have figured it out, I used a Python module that reject the call by hangup() and then created a new session for outgoing call. On 13-Jun-2016 12:39 am, "Ken Rice" <krice@freeswitch.org> wrote:
Ok let me try this again. Once the incoming call is hung up, the call is dead and anything processing on the channel (except the CDR) is done. No further commands in the dial-plan will execute.
If you need pro help with this contact consulting@freeswitch.org and one of us pros can knock this out pretty fast for you
Sent from my iPhone
On Jun 12, 2016, at 12:01 PM, Deepika Yadav <deepikay@iiitd.ac.in> wrote:
Even if I use Hangup command dialplan won't execute the statements after hangup.
My basic requirement is when Freeswitch receives a call on an extension, it should reject it and then callback.
On Sun, Jun 12, 2016 at 9:00 PM, Aqs Younas <aqsyounas@gmail.com> wrote:
You can hangup the call with reason. https://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_hangup On Jun 12, 2016 7:36 PM, "Deepika Yadav" <deepikay@iiitd.ac.in> wrote:
Even in ESL, first I have to reject the call and start a new session.
What is the command to reject a call in mod_python, I tried session.respond() that did not work.
Python script :
def handler(session, args):
namer = session.getVariable('caller_id_number') freeswitch.consoleLog('info','Called by '+namer) session.respond() s = freeswitch.Session(); s.originate(session," {sip_auth_username=1002,sip_auth_password=XXXXXXX} sofia/external/1002@XX.XX.XX.XX <sofia/external/1002@xx.xx.xx.xx> 9868789909")
On Sun, Jun 12, 2016 at 12:12 AM, Ken Rice <krice@freeswitch.org> wrote:
> 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 > > Sent from my iPhone > > On Jun 11, 2016, at 1:26 PM, Deepika Yadav <deepikay@iiitd.ac.in> > wrote: > > sorry for the incomplete message, please ignore the previous message. > > I am creating the dialplan in this way: > > <include> > <extension name="public_did"> > <condition field="destination_number" expression="^(88888888)$"> > > <action application="set" data="callerID = $${caller_id_number}"/> > <action application="log" data="INFO src number is $${callerID}"/> > <action application="respond" data="503"/> > <action application="originate" > data="{sip_auth_username=1003,sip_auth_password=*******}sofia/external/ > 1003@ <1003@52.38.67.78>X.X.X.X $callerID "/> > </condition> > </extension> > </include> > > > <extension name="show_prepare"> > <condition field="destination_number" > expression="^(?:\+91|0|)(\d{10})$"> > > <action application="bridge" data="sofia/gateway/MySIP/91$1"/> > </condition> > </extension> > > After rejecting the call, new channel for outgoing call does not > start , also variable "callerID" is set to empty not capturing the > source number > > Regards, > Deepika > > > > On Sat, Jun 11, 2016 at 11:50 PM, Deepika Yadav < > deepikay@iiitd.ac.in> wrote: > >> Hi, >> >> I want to reject an incoming call from a mobile number in the >> public context and callback to it >> >> how should the dialplan look like: >> >> >> <include> >> <extension name="public_did"> >> <condition field="destination_number" >> expression="^(88888888)$"> >> <action application="set" data="domain_name=$${domain}"/> >> <action application="log" data="INFO domain is $${domain}"/> >> <action application="set" data="callerID = $${caller_id_number}"/> >> <action application="log" data="INFO src number is $${callerID}"/> >> <action application="respond" data="503"/> >> <action application="bridge" >> data="{sip_auth_username=1003,sip_auth_password=R@D >> ~o$121$@IIITD}sofia/external/1003@52.38.67.78 9769658019"/> >> <!--<action application="respond" data="reponse_info" data="407"/> >> --> >> <!--<action application="transfer" data="5000 XML default"/> --> >> >> </condition> >> </extension> >> </include> >> >> >> >> >> >> >> Regards, >> Deepika >> > > > _________________________________________________________________________ > Professional FreeSWITCH Consulting Services: > consulting@freeswitch.org > http://www.freeswitchsolutions.com > > Official FreeSWITCH Sites > http://www.freeswitch.org > http://confluence.freeswitch.org > http://www.cluecon.com > > FreeSWITCH-users mailing list > FreeSWITCH-users@lists.freeswitch.org > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users > UNSUBSCRIBE:http:// > lists.freeswitch.org/mailman/options/freeswitch-users > http://www.freeswitch.org > > > > _________________________________________________________________________ > Professional FreeSWITCH Consulting Services: > consulting@freeswitch.org > http://www.freeswitchsolutions.com > > Official FreeSWITCH Sites > http://www.freeswitch.org > http://confluence.freeswitch.org > http://www.cluecon.com > > FreeSWITCH-users mailing list > FreeSWITCH-users@lists.freeswitch.org > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users > UNSUBSCRIBE: > http://lists.freeswitch.org/mailman/options/freeswitch-users > http://www.freeswitch.org >
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http:// lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (4)
-
Aqs Younas
-
Deepika Yadav
-
Joel Serrano
-
Ken Rice