making group of phones ring from the command line
Another really stupid one... I want to have an alarm process make a group of phones ring. There doesn't need to be a real connection, as nobody will pick up the connection, but as an alternative it could play a standard recording if answered. I have the group defined as a group in the directory but also as a context and number leading to a group call in the dialplan. So what I need is a command to fs_cli that makes a call to the group or dialplan extension. Haven't managed to figure out how to do it... Julf
Use the 'originate' API over ESL (fs_cli connects via ESL). You can give it two parameters: 1) The dialstring to call (the dialstring for the group of phones) 2) Where to bridge the call to - &playback(filename) would play a recording For the dialstring you can use a forked dial. With a defined call group use the group_call API with the +A flag. See: http://wiki.freeswitch.org/wiki/Mod_commands#originate http://wiki.freeswitch.org/wiki/Mod_commands#group_call -Steve On 18 February 2013 15:43, Johan Helsingius <julf@julf.com> wrote:
Another really stupid one...
I want to have an alarm process make a group of phones ring. There doesn't need to be a real connection, as nobody will pick up the connection, but as an alternative it could play a standard recording if answered.
I have the group defined as a group in the directory but also as a context and number leading to a group call in the dialplan.
So what I need is a command to fs_cli that makes a call to the group or dialplan extension. Haven't managed to figure out how to do it...
Julf
_________________________________________________________________________ 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
You can give it two parameters: 1) The dialstring to call (the dialstring for the group of phones) 2) Where to bridge the call to - &playback(filename) would play a recording
Thanks, I guess my problem is partially that I can't figure out the dialstring to reach either the group directly, or the extension in the dialplan. Julf
Try something along the lines of originate ${group_call(2000@domain.com+A)} &playback(alarm.wav) The group_call call returns/expands to the dialstring for the group for you. The second parameter can either be the dialplan extension name, or &application(args). -Steve On 18 February 2013 16:39, Johan Helsingius <julf@julf.com> wrote:
You can give it two parameters: 1) The dialstring to call (the dialstring for the group of phones) 2) Where to bridge the call to - &playback(filename) would play a recording
Thanks,
I guess my problem is partially that I can't figure out the dialstring to reach either the group directly, or the extension in the dialplan.
Julf
_________________________________________________________________________ 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
I'm assuming you didn't include the mailto: markup that one of our email clients helpfully inserted... (probably my gmail). First check group_call is actually giving you a valid dialstring: group_call group@domain.com+A I'm thinking the problem is the ${} didn't get expanded. Try running it via the expand API (http://wiki.freeswitch.org/wiki/Mod_commands#expand): expand originate ${group_call(group@domain.com+A)} &playback(alarm.wav) -Steve On 18 February 2013 17:06, Johan Helsingius <julf@julf.com> wrote:
Try something along the lines of
originate ${group_call(2000@domain.com <mailto:2000@domain.com>+A)} &playback(alarm.wav)
Unfortunately all permutations of the group call just give me ERR CHAN_NOT_IMPLEMENTED from fs_cli.
Julf
_________________________________________________________________________ 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
Have a look over the originate documentation again - there's optional additional parameters for CallerID. Whether that actually gets presented to the phone is going to depend on the route you're using to dial the phones though. For example if you're going via a SIP-PSTN provider then they'll be restricting the Caller IDs you can send (to stop spoofing numbers that aren't your own). -Steve On 18 February 2013 17:43, Johan Helsingius <julf@julf.com> wrote:
expand originate ${group_call(group@domain.com+A)} &playback(alarm.wav)
Ah! Yes, that did it! Thanks!
Now I just need to figure out how to change the caller id on the group call to enable me to use a distinct ring tone...
Julf
_________________________________________________________________________ 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
Have a look over the originate documentation again - there's optional additional parameters for CallerID.
Thanks again!
Whether that actually gets presented to the phone is going to depend on the route you're using to dial the phones though. For example if you're going via a SIP-PSTN provider then they'll be restricting the Caller IDs you can send (to stop spoofing numbers that aren't your own).
In this case no prob, as all the phones I want to have ringing are locally registered to my fs. No point in having the phone ring in the US when somebody is at our door in Amsterdam... :) Julf
expand originate {origination_caller_id_number=1234}${group_call( group@domain.com+A)} &playback(alarm.wav) -MC On Mon, Feb 18, 2013 at 9:43 AM, Johan Helsingius <julf@julf.com> wrote:
expand originate ${group_call(group@domain.com+A)} &playback(alarm.wav)
Ah! Yes, that did it! Thanks!
Now I just need to figure out how to change the caller id on the group call to enable me to use a distinct ring tone...
Julf
_________________________________________________________________________ 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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
originate user/1000 &playback(alarm.wav) .. will work. It's not the 1000 extension though, but it is the actual registered user. -Avi On Tue, Feb 19, 2013 at 11:27 AM, Johan Helsingius <julf@julf.com> wrote:
expand originate ${group_call(group@domain.com+A)} &playback(alarm.wav)
OK, that works great, but is there any way to actually place the call to a dialplan extension rather than a SIP address or group of addresses?
Julf
_________________________________________________________________________ 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
You need an outgoing session to send to the dialplan, so need a dialstring. The 2nd parameter can send those calls into the dialplan: expand originate ${group_call(group@domain.com+A)} extension You could also use the loopback endpoint to create a session that goes into dialplan. expand originate loopback/extension &playback(alarm.wav) http://wiki.freeswitch.org/wiki/Loopback%20endpoint -Steve On 19 February 2013 09:27, Johan Helsingius <julf@julf.com> wrote:
expand originate ${group_call(group@domain.com+A)} &playback(alarm.wav)
OK, that works great, but is there any way to actually place the call to a dialplan extension rather than a SIP address or group of addresses?
Julf
_________________________________________________________________________ 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
participants (4)
-
Avi Marcus
-
Johan Helsingius
-
Michael Collins
-
Steven Ayre