Is it possible in Lua to do something like.... playback_uuid = GetTheUuidFrom(session:execute("bgapi uuid_broadcast <a-leg uuid> nicemusic.wav")) Then do some stuff on the b-leg Then session:execute("uuid_kill "..playback_uuid) When I've tried it, I get.... 2014-03-20 12:27:07.474905 [INFO] switch_cpp.cpp:1288 exec_async uuid_broadcast 4b0faa1a-6898-438a-8099-8c09eff7d1b0 local_stream://moh... (dmpx_r27s1_bleg.lua uuid:ddde917b-d9df-44b1-9b33-2b46d639f100 [?]) 2014-03-20 12:27:07.474905 [DEBUG] switch_core_media_bug.c:532 Attaching BUG to sofia/internal/0001302@004-0095.sb12.dmclub.org 2014-03-20 12:27:07.474905 [DEBUG] switch_core_session.c:1151 Send signal sofia/internal/0001302@004-0095.sb12.dmclub.org [BREAK] 2014-03-20 12:27:07.474905 [INFO] switch_cpp.cpp:1288 ...exec_async returning +OK Job-UUID: 88727341-5d44-4631-a69a-368df85ebdf0 ... ... 2014-03-20 12:27:11.244906 [INFO] switch_cpp.cpp:1288 dmExec uuid_kill 88727341-5d44-4631-a69a-368df85ebdf0 2014-03-20 12:27:11.244906 [INFO] switch_cpp.cpp:1288 ...dmExec returning -ERR No such channel! I can only presume I've got the wrong end of the stick on these asynchronous jobs! (BTW, dmExec is a wrapper around api:executeString)
Yeah it looks like you're trying to kill the uuid of the JOB rather than the UUID of the channel. The uuid of the job only exists as a reference so that when the background music task here finishes you can match up the UUID's and know which job has completed. ______________________________ Callum Guy Senior Developer X-on Framlingham Technology Centre Station Road, Framlingham, Suffolk, IP13 9EZ T 0333 332 0116 E callum.guy@x-on.co.uk X-on is a trading name of Storacall Technology Ltd a limited company registered in England and Wales Registered Office : Avaland House, 110 London Road, Apsley, Hemel Hempstead, Herts, HP3 9SD Company Registration No. 2578478 This email has been sent from X-on.The contents and attachments are confidential to the sender and the intended addressees.If the message is received by anyone other than the addressee please return the message to the sender by replying to it and then delete the message from your computer without copying or disclosing the contents to anyone.Opinions, conclusions and statements of intent in this email are those of the sender and do not bind X-on unless confirmed by authorised representatives independently of this message.While best endeavours have been taken to avoid transmission of viruses, it is the responsibility of the recipient to scan for these.Please note emails sent to and from X-on are routinely monitored for record keeping and quality control, to ensure regulatory compliance and prevent unauthorised use of our systems. Please consider the environment before printing this email. On 20 March 2014 13:41, Alex Lake <alex@digitalmail.com> wrote:
Is it possible in Lua to do something like....
playback_uuid = GetTheUuidFrom(session:execute("bgapi uuid_broadcast <a-leg uuid> nicemusic.wav"))
Then do some stuff on the b-leg
Then
session:execute("uuid_kill "..playback_uuid)
When I've tried it, I get....
2014-03-20 12:27:07.474905 [INFO] switch_cpp.cpp:1288 exec_async uuid_broadcast 4b0faa1a-6898-438a-8099-8c09eff7d1b0 local_stream://moh... (dmpx_r27s1_bleg.lua uuid:ddde917b-d9df-44b1-9b33-2b46d639f100 [?]) 2014-03-20 12:27:07.474905 [DEBUG] switch_core_media_bug.c:532 Attaching BUG to sofia/internal/0001302@004-0095.sb12.dmclub.org 2014-03-20 12:27:07.474905 [DEBUG] switch_core_session.c:1151 Send signal sofia/internal/0001302@004-0095.sb12.dmclub.org [BREAK] 2014-03-20 12:27:07.474905 [INFO] switch_cpp.cpp:1288 ...exec_async returning +OK Job-UUID: 88727341-5d44-4631-a69a-368df85ebdf0 ... ... 2014-03-20 12:27:11.244906 [INFO] switch_cpp.cpp:1288 dmExec uuid_kill 88727341-5d44-4631-a69a-368df85ebdf0 2014-03-20 12:27:11.244906 [INFO] switch_cpp.cpp:1288 ...dmExec returning -ERR No such channel!
I can only presume I've got the wrong end of the stick on these asynchronous jobs!
(BTW, dmExec is a wrapper around api:executeString)
_________________________________________________________________________ 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
So how can I stop the music here? I'm a little baffled, as I thought that if I did a uuid_bridge of that leg and another, it would just join them together, the music would stop automatically and allow talking, but it doesn't seem to be working out like that!
Yeah it looks like you're trying to kill the uuid of the JOB rather than the UUID of the channel. The uuid of the job only exists as a reference so that when the background music task here finishes you can match up the UUID's and know which job has completed.
______________________________
Callum Guy Senior Developer
X-on Framlingham Technology Centre Station Road, Framlingham, Suffolk, IP13 9EZ
T 0333 332 0116 Ecallum.guy@x-on.co.uk <mailto:callum.guy@x-on.co.uk>
X-on is a trading name of Storacall Technology Ltd a limited company registered in England and Wales Registered Office : Avaland House, 110 London Road, Apsley, Hemel Hempstead, Herts, HP3 9SD Company Registration No. 2578478
This email has been sent from X-on.The contents and attachments are confidential to the sender and the intended addressees.If the message is received by anyone other than the addressee please return the message to the sender by replying to it and then delete the message from your computer without copying or disclosing the contents to anyone.Opinions, conclusions and statements of intent in this email are those of the sender and do not bind X-on unless confirmed by authorised representatives independently of this message.While best endeavours have been taken to avoid transmission of viruses, it is the responsibility of the recipient to scan for these.Please note emails sent to and from X-on are routinely monitored for record keeping and quality control, to ensure regulatory compliance and prevent unauthorised use of our systems.
Please consider the environment before printing this email.
On 20 March 2014 13:41, Alex Lake <alex@digitalmail.com <mailto:alex@digitalmail.com>> wrote:
Is it possible in Lua to do something like....
playback_uuid = GetTheUuidFrom(session:execute("bgapi uuid_broadcast <a-leg uuid> nicemusic.wav"))
Then do some stuff on the b-leg
Then
session:execute("uuid_kill "..playback_uuid)
When I've tried it, I get....
2014-03-20 12:27:07.474905 [INFO] switch_cpp.cpp:1288 exec_async uuid_broadcast 4b0faa1a-6898-438a-8099-8c09eff7d1b0 local_stream://moh... (dmpx_r27s1_bleg.lua uuid:ddde917b-d9df-44b1-9b33-2b46d639f100 [?]) 2014-03-20 12:27:07.474905 [DEBUG] switch_core_media_bug.c:532 Attaching BUG to sofia/internal/0001302@004-0095.sb12.dmclub.org <mailto:0001302@004-0095.sb12.dmclub.org> 2014-03-20 12:27:07.474905 [DEBUG] switch_core_session.c:1151 Send signal sofia/internal/0001302@004-0095.sb12.dmclub.org <mailto:0001302@004-0095.sb12.dmclub.org> [BREAK] 2014-03-20 12:27:07.474905 [INFO] switch_cpp.cpp:1288 ...exec_async returning +OK Job-UUID: 88727341-5d44-4631-a69a-368df85ebdf0 ... ... 2014-03-20 12:27:11.244906 [INFO] switch_cpp.cpp:1288 dmExec uuid_kill 88727341-5d44-4631-a69a-368df85ebdf0 2014-03-20 12:27:11.244906 [INFO] switch_cpp.cpp:1288 ...dmExec returning -ERR No such channel!
I can only presume I've got the wrong end of the stick on these asynchronous jobs!
(BTW, dmExec is a wrapper around api:executeString)
_________________________________________________________________________ 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: 2014.0.4336 / Virus Database: 3722/7203 - Release Date: 03/16/14
As Callum noted, you're using the jobID as "playback_uuid" which is not a leg UUID for you to use. You need to keep interacting with aleg_uuid - either bridge it, break the broadcast, etc. -Avi On Thu, Mar 20, 2014 at 5:02 PM, Alex Lake <alex@digitalmail.com> wrote:
So how can I stop the music here? I'm a little baffled, as I thought that if I did a uuid_bridge of that leg and another, it would just join them together, the music would stop automatically and allow talking, but it doesn't seem to be working out like that!
Yeah it looks like you're trying to kill the uuid of the JOB rather than the UUID of the channel. The uuid of the job only exists as a reference so that when the background music task here finishes you can match up the UUID's and know which job has completed.
______________________________
Callum Guy Senior Developer
X-on Framlingham Technology Centre Station Road, Framlingham, Suffolk, IP13 9EZ
T 0333 332 0116 E callum.guy@x-on.co.uk
X-on is a trading name of Storacall Technology Ltd a limited company registered in England and Wales Registered Office : Avaland House, 110 London Road, Apsley, Hemel Hempstead, Herts, HP3 9SD Company Registration No. 2578478
This email has been sent from X-on.The contents and attachments are confidential to the sender and the intended addressees.If the message is received by anyone other than the addressee please return the message to the sender by replying to it and then delete the message from your computer without copying or disclosing the contents to anyone.Opinions, conclusions and statements of intent in this email are those of the sender and do not bind X-on unless confirmed by authorised representatives independently of this message.While best endeavours have been taken to avoid transmission of viruses, it is the responsibility of the recipient to scan for these.Please note emails sent to and from X-on are routinely monitored for record keeping and quality control, to ensure regulatory compliance and prevent unauthorised use of our systems. Please consider the environment before printing this email.
On 20 March 2014 13:41, Alex Lake <alex@digitalmail.com> wrote:
Is it possible in Lua to do something like....
playback_uuid = GetTheUuidFrom(session:execute("bgapi uuid_broadcast <a-leg uuid> nicemusic.wav"))
Then do some stuff on the b-leg
Then
session:execute("uuid_kill "..playback_uuid)
When I've tried it, I get....
2014-03-20 12:27:07.474905 [INFO] switch_cpp.cpp:1288 exec_async uuid_broadcast 4b0faa1a-6898-438a-8099-8c09eff7d1b0 local_stream://moh... (dmpx_r27s1_bleg.lua uuid:ddde917b-d9df-44b1-9b33-2b46d639f100 [?]) 2014-03-20 12:27:07.474905 [DEBUG] switch_core_media_bug.c:532 Attaching BUG to sofia/internal/0001302@004-0095.sb12.dmclub.org 2014-03-20 12:27:07.474905 [DEBUG] switch_core_session.c:1151 Send signal sofia/internal/0001302@004-0095.sb12.dmclub.org [BREAK] 2014-03-20 12:27:07.474905 [INFO] switch_cpp.cpp:1288 ...exec_async returning +OK Job-UUID: 88727341-5d44-4631-a69a-368df85ebdf0 ... ... 2014-03-20 12:27:11.244906 [INFO] switch_cpp.cpp:1288 dmExec uuid_kill 88727341-5d44-4631-a69a-368df85ebdf0 2014-03-20 12:27:11.244906 [INFO] switch_cpp.cpp:1288 ...dmExec returning -ERR No such channel!
I can only presume I've got the wrong end of the stick on these asynchronous jobs!
(BTW, dmExec is a wrapper around api:executeString)
_________________________________________________________________________ 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: 2014.0.4336 / Virus Database: 3722/7203 - Release Date: 03/16/14
_________________________________________________________________________ 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 (3)
-
Alex Lake
-
Avi Marcus
-
Callum Guy