Hi! I am using lua to make an IVR. I want to transfer the call to an another SIP server(OpenSIPS). Is this possibe? cause the wiki documentation just mention that we can transfer the call to a an another FS' extention. Thanks for the help.
You can bridge to an external server -- e.g. sofia/external/ 1000@myserver.com (if you left your profile named external). Or you can take FreeSWITCH out of the call path: if you answered deflect<http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_deflect> sends a REFER. If you didn't answer yet send a redirect<http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_redirect> which sends a 302 temporarily moved. -Avi On Tue, Apr 17, 2012 at 12:14 PM, azza miled <azza.miled@gmail.com> wrote:
Hi! I am using lua to make an IVR. I want to transfer the call to an another SIP server(OpenSIPS). Is this possibe? cause the wiki documentation just mention that we can transfer the call to a an another FS' extention. Thanks for the help.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
thank you, but to be clearer, I want that my lua IVR script transfer the call to OpenSIPS. So, if I get what you said, I have to bridge to an external server (in the xml dialplan) and then,I just have to transfer the call to the IP address of my Opensips server in my lua script. am I wrong?? 2012/4/17 Avi Marcus <avi@avimarcus.net>
You can bridge to an external server -- e.g. sofia/external/ 1000@myserver.com (if you left your profile named external).
Or you can take FreeSWITCH out of the call path: if you answered deflect<http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_deflect> sends a REFER. If you didn't answer yet send a redirect<http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_redirect> which sends a 302 temporarily moved.
-Avi
On Tue, Apr 17, 2012 at 12:14 PM, azza miled <azza.miled@gmail.com> wrote:
Hi! I am using lua to make an IVR. I want to transfer the call to an another SIP server(OpenSIPS). Is this possibe? cause the wiki documentation just mention that we can transfer the call to a an another FS' extention. Thanks for the help.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
On Tue, Apr 17, 2012 at 2:37 AM, azza miled <azza.miled@gmail.com> wrote:
thank you, but to be clearer, I want that my lua IVR script transfer the call to OpenSIPS. So, if I get what you said, I have to bridge to an external server (in the xml dialplan) and then,I just have to transfer the call to the IP address of my Opensips server in my lua script. am I wrong??
Just be careful when using the word "transfer." It can mean two related but very different things. There a transfer like transferring a phone call from one phone to another. There's also a dialplan transfer application that sends the call flow to another part of the dialplan. I suspect you'll be doing a little of both. :) In your Lua script I suggest that the end of the program be transferring (i.e. dialplan transfer) to an extension in the dialplan that would then execute the bridge over to your OpenSIPS server. Read this part of the wiki carefully, especially the note about autohangup: http://wiki.freeswitch.org/wiki/Lua#session:transfer The line could be something like this: session:transfer(target_number,"XML","to_opensips") The dialplan extension to which you transfer the call can then just do the bridge. You could even create an entirely new dialplan context. E.g., you could create a file /usr/local/freeswitch/conf/dialplan/to_opensips.xml with something like this: <include> <context name="to_opensips"> <extension name="bridge to opensips"> <condition field="destination_number" expression="(.*)"> <action application="bridge" data="sofia/internal/$1@ ${opensips_ip_address}"/> </condition> </extension> </context> </include> I put my usual disclaimer here: This is off the top of my head. I did not try this code. If you try it and it doesn't work then tinker and see if you can figure it out. :) -MC
participants (3)
-
Avi Marcus
-
azza miled
-
Michael Collins