I was wondering where's a good place to find some examples of how, by sending the right commands to the event_socket, I could have Freeswitch establish callbacks for me. Essentially there are a couple of different termination types - PSTN (via a gateway) and internally registered SIP accounts I would wish to be able to set up A->B (and maybe small conferences) using these types of destination in any combination. I've looked through the event_socket pages and the "originate" syntax, but would like to put together something a little more "idiot-friendly" so am looking around for precedents/tips...
There's a whole bunch of examples here: http://wiki.freeswitch.org/wiki/Mod_commands#originate The first arg rings first, and must be an endpoint, e.g. sofia/, user/. Once they pick up, the second arg is called. So originating to a local user or to a remote endpoint is nearly the same... especially if you can use the lcr/ endpoint. Your leg B can be a brige, a conference &conference(conf_uuid-TEST_CON), or just hit the dialplan. -Avi Marcus On Thu, Mar 7, 2013 at 1:00 PM, Alex Lake <alex@digitalmail.com> wrote:
I was wondering where's a good place to find some examples of how, by sending the right commands to the event_socket, I could have Freeswitch establish callbacks for me.
Essentially there are a couple of different termination types - PSTN (via a gateway) and internally registered SIP accounts
I would wish to be able to set up A->B (and maybe small conferences) using these types of destination in any combination.
I've looked through the event_socket pages and the "originate" syntax, but would like to put together something a little more "idiot-friendly" so am looking around for precedents/tips...
_________________________________________________________________________ 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
Yes, I'd seen that - but I'm currently the wrong side of the "got it" fence. However, I did this: originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302 &bridge({origination_caller_id_number=2070602000}sofia/internal/07775123456@pstngateway.com) and it kind of did what I wanted. However, what I really want to do is to simulate as closely as possible what happens when ext 0095302 makes an outbound call to 07775123456 from a handset - preferably using the dp0095 context of the xml (?) dialplan. So I thought I'd try using the dialplan and context parameters like this: originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302 &bridge(07775123456) xml dp0095 But I've clearly got the wrong end of the stick!
There's a whole bunch of examples here: http://wiki.freeswitch.org/wiki/Mod_commands#originate
The first arg rings first, and must be an endpoint, e.g. sofia/, user/. Once they pick up, the second arg is called.
So originating to a local user or to a remote endpoint is nearly the same... especially if you can use the lcr/ endpoint. Your leg B can be a brige, a conference &conference(conf_uuid-TEST_CON), or just hit the dialplan.
-Avi Marcus
On Thu, Mar 7, 2013 at 1:00 PM, Alex Lake <alex@digitalmail.com <mailto:alex@digitalmail.com>> wrote:
I was wondering where's a good place to find some examples of how, by sending the right commands to the event_socket, I could have Freeswitch establish callbacks for me.
Essentially there are a couple of different termination types - PSTN (via a gateway) and internally registered SIP accounts
I would wish to be able to set up A->B (and maybe small conferences) using these types of destination in any combination.
I've looked through the event_socket pages and the "originate" syntax, but would like to put together something a little more "idiot-friendly" so am looking around for precedents/tips...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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 <mailto: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
No virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.2240 / Virus Database: 2641/5652 - Release Date: 03/06/13
You almost got it: it's: exten [dialplan] [context] So you just needed to do: originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302 07775123456 xml dp0095 ... without the &bridge. You *either* choose an extension or do &(app). Usage: originate <call_url> <exten>|&<application_name>(<app_args>) [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>] To quote from the wiki: "Here's an example of originating a call to an extension in a different context than 'default' (required for the FreePBX which uses context_1, context_2, etc.):" originate sofia/internal/2001@foo.com 3001 xml context_3 -Avi Marcus BestFone On Thu, Mar 7, 2013 at 4:02 PM, Alex Lake <alex@digitalmail.com> wrote:
Yes, I'd seen that - but I'm currently the wrong side of the "got it" fence. However, I did this:
originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302 &bridge({ origination_caller_id_number=2070602000}sofia/internal/07775123456@pstngateway.com )
and it kind of did what I wanted.
However, what I really want to do is to simulate as closely as possible what happens when ext 0095302 makes an outbound call to 07775123456 from a handset - preferably using the dp0095 context of the xml (?) dialplan.
So I thought I'd try using the dialplan and context parameters like this:
originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302 &bridge(07775123456) xml dp0095
But I've clearly got the wrong end of the stick!
There's a whole bunch of examples here: http://wiki.freeswitch.org/wiki/Mod_commands#originate
The first arg rings first, and must be an endpoint, e.g. sofia/, user/. Once they pick up, the second arg is called.
So originating to a local user or to a remote endpoint is nearly the same... especially if you can use the lcr/ endpoint. Your leg B can be a brige, a conference &conference(conf_uuid-TEST_CON), or just hit the dialplan.
-Avi Marcus
On Thu, Mar 7, 2013 at 1:00 PM, Alex Lake <alex@digitalmail.com> wrote:
I was wondering where's a good place to find some examples of how, by sending the right commands to the event_socket, I could have Freeswitch establish callbacks for me.
Essentially there are a couple of different termination types - PSTN (via a gateway) and internally registered SIP accounts
I would wish to be able to set up A->B (and maybe small conferences) using these types of destination in any combination.
I've looked through the event_socket pages and the "originate" syntax, but would like to put together something a little more "idiot-friendly" so am looking around for precedents/tips...
_________________________________________________________________________ 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.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2240 / Virus Database: 2641/5652 - Release Date: 03/06/13
_________________________________________________________________________ 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
Thanks! I can now make the call work, but I need to tweak some details... The slightly missing link for me now - how can I set channel variables for the B-leg there? Is there any way I can send them to the A-leg and have the A-leg export them to the B? I'm still a little baffled as to how this even works! Alex
You almost got it: it's: exten [dialplan] [context]
So you just needed to do: originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302 07775123456 xml dp0095 ... without the &bridge. You /either/ choose an extension or do &(app). Usage: originate <call_url> <exten>|&<application_name>(<app_args>) [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>] To quote from the wiki:
"Here's an example of originating a call to an extension in a different context than 'default' (required for the FreePBX which uses context_1, context_2, etc.):"
originate sofia/internal/2001@foo.com <mailto:2001@foo.com> 3001 xml context_3 -Avi Marcus BestFone
On Thu, Mar 7, 2013 at 4:02 PM, Alex Lake <alex@digitalmail.com <mailto:alex@digitalmail.com>> wrote:
Yes, I'd seen that - but I'm currently the wrong side of the "got it" fence. However, I did this:
originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302&bridge({origination_caller_id_number=2070602000}sofia/internal/07775123456@pstngateway.com <mailto:origination_caller_id_number=2070602000%7Dsofia/internal/07775123456@pstngateway.com>)
and it kind of did what I wanted.
However, what I really want to do is to simulate as closely as possible what happens when ext 0095302 makes an outbound call to 07775123456 from a handset - preferably using the dp0095 context of the xml (?) dialplan.
So I thought I'd try using the dialplan and context parameters like this:
originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302 &bridge(07775123456) xml dp0095
But I've clearly got the wrong end of the stick!
There's a whole bunch of examples here: http://wiki.freeswitch.org/wiki/Mod_commands#originate
The first arg rings first, and must be an endpoint, e.g. sofia/, user/. Once they pick up, the second arg is called.
So originating to a local user or to a remote endpoint is nearly the same... especially if you can use the lcr/ endpoint. Your leg B can be a brige, a conference &conference(conf_uuid-TEST_CON), or just hit the dialplan.
-Avi Marcus
On Thu, Mar 7, 2013 at 1:00 PM, Alex Lake <alex@digitalmail.com <mailto:alex@digitalmail.com>> wrote:
I was wondering where's a good place to find some examples of how, by sending the right commands to the event_socket, I could have Freeswitch establish callbacks for me.
Essentially there are a couple of different termination types - PSTN (via a gateway) and internally registered SIP accounts
I would wish to be able to set up A->B (and maybe small conferences) using these types of destination in any combination.
I've looked through the event_socket pages and the "originate" syntax, but would like to put together something a little more "idiot-friendly" so am looking around for precedents/tips...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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 <mailto: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 <mailto: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 <mailto: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
No virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.2240 / Virus Database: 2641/5652 - Release Date: 03/06/13
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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 <mailto: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
No virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.2240 / Virus Database: 2641/5652 - Release Date: 03/06/13
...and for our next trick, how do I do a callback from one PSTN destination to another? i.e. place a call to 07775123456 and when that answers, place another one to 02012345678? Cheers, Alex
You almost got it: it's: exten [dialplan] [context]
So you just needed to do: originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302 07775123456 xml dp0095 ... without the &bridge. You /either/ choose an extension or do &(app). Usage: originate <call_url> <exten>|&<application_name>(<app_args>) [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>] To quote from the wiki:
"Here's an example of originating a call to an extension in a different context than 'default' (required for the FreePBX which uses context_1, context_2, etc.):"
originate sofia/internal/2001@foo.com <mailto:2001@foo.com> 3001 xml context_3 -Avi Marcus BestFone
On Thu, Mar 7, 2013 at 4:02 PM, Alex Lake <alex@digitalmail.com <mailto:alex@digitalmail.com>> wrote:
Yes, I'd seen that - but I'm currently the wrong side of the "got it" fence. However, I did this:
originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302&bridge({origination_caller_id_number=2070602000}sofia/internal/07775123456@pstngateway.com <mailto:origination_caller_id_number=2070602000%7Dsofia/internal/07775123456@pstngateway.com>)
and it kind of did what I wanted.
However, what I really want to do is to simulate as closely as possible what happens when ext 0095302 makes an outbound call to 07775123456 from a handset - preferably using the dp0095 context of the xml (?) dialplan.
So I thought I'd try using the dialplan and context parameters like this:
originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302 &bridge(07775123456) xml dp0095
But I've clearly got the wrong end of the stick!
There's a whole bunch of examples here: http://wiki.freeswitch.org/wiki/Mod_commands#originate
The first arg rings first, and must be an endpoint, e.g. sofia/, user/. Once they pick up, the second arg is called.
So originating to a local user or to a remote endpoint is nearly the same... especially if you can use the lcr/ endpoint. Your leg B can be a brige, a conference &conference(conf_uuid-TEST_CON), or just hit the dialplan.
-Avi Marcus
On Thu, Mar 7, 2013 at 1:00 PM, Alex Lake <alex@digitalmail.com <mailto:alex@digitalmail.com>> wrote:
I was wondering where's a good place to find some examples of how, by sending the right commands to the event_socket, I could have Freeswitch establish callbacks for me.
Essentially there are a couple of different termination types - PSTN (via a gateway) and internally registered SIP accounts
I would wish to be able to set up A->B (and maybe small conferences) using these types of destination in any combination.
I've looked through the event_socket pages and the "originate" syntax, but would like to put together something a little more "idiot-friendly" so am looking around for precedents/tips...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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 <mailto: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 <mailto: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 <mailto: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
No virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.2240 / Virus Database: 2641/5652 - Release Date: 03/06/13
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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 <mailto: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
No virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.2240 / Virus Database: 2641/5652 - Release Date: 03/06/13
On Fri, May 31, 2013 at 8:24 AM, Alex Lake <alex@digitalmail.com> wrote:
...and for our next trick, how do I do a callback from one PSTN destination to another? i.e. place a call to 07775123456 and when that answers, place another one to 02012345678?
Cheers, Alex
I must be missing something because the way you phrased the question it sounds like that's exactly what the originate command does, assuming you set ignore_early_media=true. -MC -- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
You currently (in a previous mail) call a user/ dialstring and when that answers execute a bridge that dials a sofia/ dialstring and joins the 2 calls. The syntax was slightly off, but close. Now think what'd happen if the 2 dialstrings were both sofia/ dialstrings to dial 2 PSTN numbers via your SIP provider(s)... You may need to tweak that further if you want either leg to go via the dialplan. -Steve On Friday, May 31, 2013, Alex Lake wrote:
...and for our next trick, how do I do a callback from one PSTN destination to another? i.e. place a call to 07775123456 and when that answers, place another one to 02012345678?
Cheers, Alex
You almost got it: it's: exten [dialplan] [context]
So you just needed to do: originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302 07775123456 xml dp0095 ... without the &bridge. You *either* choose an extension or do &(app).
Usage: originate <call_url> <exten>|&<application_name>(<app_args>) [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>]
To quote from the wiki:
"Here's an example of originating a call to an extension in a different context than 'default' (required for the FreePBX which uses context_1, context_2, etc.):"
originate sofia/internal/2001@foo.com <javascript:_e({}, 'cvml', '2001@foo.com');> 3001 xml context_3
-Avi Marcus BestFone
On Thu, Mar 7, 2013 at 4:02 PM, Alex Lake <alex@digitalmail.com<javascript:_e({}, 'cvml', 'alex@digitalmail.com');>
wrote:
Yes, I'd seen that - but I'm currently the wrong side of the "got it" fence. However, I did this:
originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302&bridge({ origination_caller_id_number=2070602000}sofia/internal/07775123456@pstngateway.com<javascript:_e({}, 'cvml', 'origination_caller_id_number\x3d2070602000%7Dsofia/internal/07775123456@pstngateway.com');> )
and it kind of did what I wanted.
However, what I really want to do is to simulate as closely as possible what happens when ext 0095302 makes an outbound call to 07775123456 from a handset - preferably using the dp0095 context of the xml (?) dialplan.
So I thought I'd try using the dialplan and context parameters like this:
originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302 &bridge(07775123456) xml dp0095
But I've clearly got the wrong end of the stick!
There's a whole bunch of examples here: http://wiki.freeswitch.org/wiki/Mod_commands#originate
The first arg rings first, and must be an endpoint, e.g. sofia/, user/. Once they pick up, the second arg is called.
So originating to a local user or to a remote endpoint is nearly the same... especially if you can use the lcr/ endpoint. Your leg B can be a brige, a conference &conference(conf_uuid-TEST_CON), or just hit the dialplan.
-Avi Marcus
On Thu, Mar 7, 2013 at 1:00 PM, Alex Lake <alex@digitalmail.com> wrote:
I was wondering where's a good place to find some examples of how, by sending the right commands to the event_socket, I could have Freeswitch establish callbacks for me.
Essentially there are a couple of different termination types - PSTN (via a gateway) and internally registered SIP accounts
I would wish to be able to set up A->B (and maybe small conferences) using these types of destination in any combination.
I've looked through the event_socket pages and the "originate" syntax, but would like to put together something a little more "idiot-friendly" so am looking around for precedents/tips...
_________________________________________________________________________ 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.cluec <http://www.cluecon.com>
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <javascript:_e({}, 'cvml', '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 <javascript:_e({}, 'cvml', '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 <javascript:_e({}, 'cvml', 'consulting@freeswitch.org');>http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.org <javascript:_e({}, 'cvml', 'FreeSWITCH-users@lists.freeswitch.org');>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2240 / Virus Database: 2641/5652 - Release Date: 03/06/13
As simple as that, eh?! Seems too good to be true! Thanks....
You currently (in a previous mail) call a user/ dialstring and when that answers execute a bridge that dials a sofia/ dialstring and joins the 2 calls. The syntax was slightly off, but close.
Now think what'd happen if the 2 dialstrings were both sofia/ dialstrings to dial 2 PSTN numbers via your SIP provider(s)...
You may need to tweak that further if you want either leg to go via the dialplan.
-Steve
On Friday, May 31, 2013, Alex Lake wrote:
...and for our next trick, how do I do a callback from one PSTN destination to another? i.e. place a call to 07775123456 and when that answers, place another one to 02012345678?
Cheers, Alex
You almost got it: it's: exten [dialplan] [context]
So you just needed to do: originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302 07775123456 xml dp0095 ... without the &bridge. You /either/ choose an extension or do &(app). Usage: originate <call_url> <exten>|&<application_name>(<app_args>) [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>] To quote from the wiki:
"Here's an example of originating a call to an extension in a different context than 'default' (required for the FreePBX which uses context_1, context_2, etc.):"
originate sofia/internal/2001@foo.com <javascript:_e({}, 'cvml', '2001@foo.com');> 3001 xml context_3 -Avi Marcus BestFone
On Thu, Mar 7, 2013 at 4:02 PM, Alex Lake <alex@digitalmail.com <javascript:_e({}, 'cvml', 'alex@digitalmail.com');>> wrote:
Yes, I'd seen that - but I'm currently the wrong side of the "got it" fence. However, I did this:
originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302&bridge({origination_caller_id_number=2070602000}sofia/internal/07775123456@pstngateway.com <javascript:_e({}, 'cvml', 'origination_caller_id_number\x3d2070602000%7Dsofia/internal/07775123456@pstngateway.com');>)
and it kind of did what I wanted.
However, what I really want to do is to simulate as closely as possible what happens when ext 0095302 makes an outbound call to 07775123456 from a handset - preferably using the dp0095 context of the xml (?) dialplan.
So I thought I'd try using the dialplan and context parameters like this:
originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302 &bridge(07775123456) xml dp0095
But I've clearly got the wrong end of the stick!
There's a whole bunch of examples here: http://wiki.freeswitch.org/wiki/Mod_commands#originate
The first arg rings first, and must be an endpoint, e.g. sofia/, user/. Once they pick up, the second arg is called.
So originating to a local user or to a remote endpoint is nearly the same... especially if you can use the lcr/ endpoint. Your leg B can be a brige, a conference &conference(conf_uuid-TEST_CON), or just hit the dialplan.
-Avi Marcus
On Thu, Mar 7, 2013 at 1:00 PM, Alex Lake <alex@digitalmail.com> wrote:
I was wondering where's a good place to find some examples of how, by sending the right commands to the event_socket, I could have Freeswitch establish callbacks for me.
Essentially there are a couple of different termination types - PSTN (via a gateway) and internally registered SIP accounts
I would wish to be able to set up A->B (and maybe small conferences) using these types of destination in any combination.
I've looked through the event_socket pages and the "originate" syntax, but would like to put together something a little more "idiot-friendly" so am looking around for precedents/tips...
_________________________________________________________________________ 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.cluec <http://www.cluecon.com>
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <javascript:_e({}, 'cvml', '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 <javascript:_e({}, 'cvml', '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 <javascript:_e({}, 'cvml', '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 <javascript:_e({}, 'cvml', '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
No virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.2240 / Virus Database: 2641/5652 - Release Date: 03/06/13
_________________________________________________________________________ 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
No virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.2242 / Virus Database: 3162/5878 - Release Date: 06/02/13
Alex, how did you do it? am so much intersted in the callbak sinario you described, but do not have any idea of how to get it done. On 3 June 2013 08:26, Alex Lake <alex@digitalmail.com> wrote:
As simple as that, eh?! Seems too good to be true! Thanks....
You currently (in a previous mail) call a user/ dialstring and when that answers execute a bridge that dials a sofia/ dialstring and joins the 2 calls. The syntax was slightly off, but close.
Now think what'd happen if the 2 dialstrings were both sofia/ dialstrings to dial 2 PSTN numbers via your SIP provider(s)...
You may need to tweak that further if you want either leg to go via the dialplan.
-Steve
On Friday, May 31, 2013, Alex Lake wrote:
...and for our next trick, how do I do a callback from one PSTN destination to another? i.e. place a call to 07775123456 and when that answers, place another one to 02012345678?
Cheers, Alex
You almost got it: it's: exten [dialplan] [context]
So you just needed to do: originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302 07775123456 xml dp0095 ... without the &bridge. You *either* choose an extension or do &(app).
Usage: originate <call_url> <exten>|&<application_name>(<app_args>) [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>]
To quote from the wiki:
"Here's an example of originating a call to an extension in a different context than 'default' (required for the FreePBX which uses context_1, context_2, etc.):"
originate sofia/internal/2001@foo.com 3001 xml context_3
-Avi Marcus BestFone
On Thu, Mar 7, 2013 at 4:02 PM, Alex Lake <alex@digitalmail.com> wrote:
Yes, I'd seen that - but I'm currently the wrong side of the "got it" fence. However, I did this:
originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302&bridge({ origination_caller_id_number=2070602000}sofia/internal/07775123456@pstngateway.com )
and it kind of did what I wanted.
However, what I really want to do is to simulate as closely as possible what happens when ext 0095302 makes an outbound call to 07775123456 from a handset - preferably using the dp0095 context of the xml (?) dialplan.
So I thought I'd try using the dialplan and context parameters like this:
originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302 &bridge(07775123456) xml dp0095
But I've clearly got the wrong end of the stick!
There's a whole bunch of examples here: http://wiki.freeswitch.org/wiki/Mod_commands#originate
The first arg rings first, and must be an endpoint, e.g. sofia/, user/. Once they pick up, the second arg is called.
So originating to a local user or to a remote endpoint is nearly the same... especially if you can use the lcr/ endpoint. Your leg B can be a brige, a conference &conference(conf_uuid-TEST_CON), or just hit the dialplan.
-Avi Marcus
On Thu, Mar 7, 2013 at 1:00 PM, Alex Lake <alex@digitalmail.com> wrote:
I was wondering where's a good place to find some examples of how, by sending the right commands to the event_socket, I could have Freeswitch establish callbacks for me.
Essentially there are a couple of different termination types - PSTN (via a gateway) and internally registered SIP accounts
I would wish to be able to set up A->B (and maybe small conferences) using these types of destination in any combination.
I've looked through the event_socket pages and the "originate" syntax, but would like to put together something a little more "idiot-friendly" so am looking around for precedents/tips...
_________________________________________________________________________ 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.cluec <http://www.cluecon.com>
_________________________________________________________________________ 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.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2240 / Virus Database: 2641/5652 - Release Date: 03/06/13
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2242 / Virus Database: 3162/5878 - Release Date: 06/02/13
_________________________________________________________________________ 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
-- *Emmanuel O. Addai,* *+233(0)26 757 7771*
Well, an example command as issued from within fs_cli is: originate {origination_caller_id_name=CallBack,origination_caller_id_number=442074901234}sofia/internal/02070601234@${sip_gw_ip} 442074901234 xml dp0024 Thi s will do a callback to 02070601234 and on answer will place an outbound call to 442074901234 within the "dp0024" context of the xml dialplan. We have our own node.js fs_cli equivalent which gets a web hit and then puts together such a command string and sends it to freeswitch. There are a few other tricks that are useful: 1) We have the option for a "press 1 to confirm the outbound call" on the dialplan to avoid the case where a call back connects your voicemail to the destination(!) 2) We sometimes want to link the call to a transaction ID from the client - you can just bung that in the {} after originate and then pick it up in the event stream or CDRs.
Alex, how did you do it? am so much intersted in the callbak sinario you described, but do not have any idea of how to get it done.
On 3 June 2013 08:26, Alex Lake <alex@digitalmail.com <mailto:alex@digitalmail.com>> wrote:
As simple as that, eh?! Seems too good to be true! Thanks....
You currently (in a previous mail) call a user/ dialstring and when that answers execute a bridge that dials a sofia/ dialstring and joins the 2 calls. The syntax was slightly off, but close.
Now think what'd happen if the 2 dialstrings were both sofia/ dialstrings to dial 2 PSTN numbers via your SIP provider(s)...
You may need to tweak that further if you want either leg to go via the dialplan.
-Steve
On Friday, May 31, 2013, Alex Lake wrote:
...and for our next trick, how do I do a callback from one PSTN destination to another? i.e. place a call to 07775123456 and when that answers, place another one to 02012345678?
Cheers, Alex
You almost got it: it's: exten [dialplan] [context]
So you just needed to do: originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302 07775123456 xml dp0095 ... without the &bridge. You /either/ choose an extension or do &(app). Usage: originate <call_url> <exten>|&<application_name>(<app_args>) [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>] To quote from the wiki:
"Here's an example of originating a call to an extension in a different context than 'default' (required for the FreePBX which uses context_1, context_2, etc.):"
originate sofia/internal/2001@foo.com 3001 xml context_3 -Avi Marcus BestFone
On Thu, Mar 7, 2013 at 4:02 PM, Alex Lake <alex@digitalmail.com> wrote:
Yes, I'd seen that - but I'm currently the wrong side of the "got it" fence. However, I did this:
originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302&bridge({origination_caller_id_number=2070602000}sofia/internal/07775123456@pstngateway.com)
and it kind of did what I wanted.
However, what I really want to do is to simulate as closely as possible what happens when ext 0095302 makes an outbound call to 07775123456 from a handset - preferably using the dp0095 context of the xml (?) dialplan.
So I thought I'd try using the dialplan and context parameters like this:
originate {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302 &bridge(07775123456) xml dp0095
But I've clearly got the wrong end of the stick!
There's a whole bunch of examples here: http://wiki.freeswitch.org/wiki/Mod_commands#originate
The first arg rings first, and must be an endpoint, e.g. sofia/, user/. Once they pick up, the second arg is called.
So originating to a local user or to a remote endpoint is nearly the same... especially if you can use the lcr/ endpoint. Your leg B can be a brige, a conference &conference(conf_uuid-TEST_CON), or just hit the dialplan.
-Avi Marcus
On Thu, Mar 7, 2013 at 1:00 PM, Alex Lake <alex@digitalmail.com> wrote:
I was wondering where's a good place to find some examples of how, by sending the right commands to the event_socket, I could have Freeswitch establish callbacks for me.
Essentially there are a couple of different termination types - PSTN (via a gateway) and internally registered SIP accounts
I would wish to be able to set up A->B (and maybe small conferences) using these types of destination in any combination.
I've looked through the event_socket pages and the "originate" syntax, but would like to put together something a little more "idiot-friendly" so am looking around for precedents/tips...
_________________________________________________________________________ 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.cluec <http://www.cluecon.com>
_________________________________________________________________________ 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
No virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.2240 / Virus Database: 2641/5652 - Release Date: 03/06/13
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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 <mailto: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
No virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.2242 / Virus Database: 3162/5878 - Release Date: 06/02/13
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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 <mailto: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
-- /Emmanuel O. Addai,/ /+233(0)26 757 7771/
_________________________________________________________________________ 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
No virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.2242 / Virus Database: 3184/5886 - Release Date: 06/05/13
participants (5)
-
Alex Lake
-
Avi Marcus
-
Emmanuel Owusu Addai
-
Michael Collins
-
Steven Ayre