Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] sched_api doesn't get launched


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
b_ball_henry at hotmai...
Guest





PostPosted: Tue Oct 13, 2009 5:34 am    Post subject: [Freeswitch-users] sched_api doesn't get launched Reply with quote

Hi:

I am using mod_java. And in my script I was able to achieve using:


execute("sched_hangup", "+300 alloted_timeout");


However, when I try to run sched_api in the same way, system log returns that it's an invalid application. I have also tried to trigger it with many conditional channel variable api calls , but non of them seemed to execute the api command (because I turned on the highest level of debugging and see no where the sched_api is being called. 


The closest thing I got was by using "api_after_bridge" like the following, but it only launches when the bridge is teared down(which is not what I want). I originally thought after bridge means right after the 2 party is connected. All I want is to be able to play some message to leg A at certain time.


setVariable("api_after_bridge", "sched_api +10 none uuid_displace ${uuid} start /path/to/some.wav 20 mux");


I have been struggling with different combination for a week now.. Please shed some light if you know something. 


Thanks,

--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant
Back to top
diego.viola at gmail.com
Guest





PostPosted: Tue Oct 13, 2009 1:57 pm    Post subject: [Freeswitch-users] sched_api doesn't get launched Reply with quote

You need to pass the UUID to sched_hangup.


Usage: sched_hangup [+]<time> <uuid> [<cause>]

http://wiki.freeswitch.org/wiki/Mod_commands#sched_hangup


On Tue, Oct 13, 2009 at 10:14 AM, Henry Huang <b_ball_henry@hotmail.com (b_ball_henry@hotmail.com)> wrote:
Quote:
Hi:

I am using mod_java. And in my script I was able to achieve using:


execute("sched_hangup", "+300 alloted_timeout");


However, when I try to run sched_api in the same way, system log returns that it's an invalid application. I have also tried to trigger it with many conditional channel variable api calls , but non of them seemed to execute the api command (because I turned on the highest level of debugging and see no where the sched_api is being called. 


The closest thing I got was by using "api_after_bridge" like the following, but it only launches when the bridge is teared down(which is not what I want). I originally thought after bridge means right after the 2 party is connected. All I want is to be able to play some message to leg A at certain time.


setVariable("api_after_bridge", "sched_api +10 none uuid_displace ${uuid} start /path/to/some.wav 20 mux");


I have been struggling with different combination for a week now.. Please shed some light if you know something. 


Thanks,

--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant


_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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

Back to top
red.rain.seven at gmai...
Guest





PostPosted: Tue Oct 13, 2009 10:40 pm    Post subject: [Freeswitch-users] sched_api doesn't get launched Reply with quote

Diego:

You probably miss understood me. I said I was able to make "sched_hangup" work, but not the "sched_api" in the same way I script for "sched_hangup"


The problem was on the second paragraph. 


thanks,

On Wed, Oct 14, 2009 at 2:45 AM, Diego Viola <diego.viola@gmail.com (diego.viola@gmail.com)> wrote:
Quote:
You need to pass the UUID to sched_hangup.


Usage: sched_hangup [+]<time> <uuid> [<cause>]

http://wiki.freeswitch.org/wiki/Mod_commands#sched_hangup



On Tue, Oct 13, 2009 at 10:14 AM, Henry Huang <b_ball_henry@hotmail.com (b_ball_henry@hotmail.com)> wrote:


Quote:

Hi:

I am using mod_java. And in my script I was able to achieve using:


execute("sched_hangup", "+300 alloted_timeout");


However, when I try to run sched_api in the same way, system log returns that it's an invalid application. I have also tried to trigger it with many conditional channel variable api calls , but non of them seemed to execute the api command (because I turned on the highest level of debugging and see no where the sched_api is being called. 


The closest thing I got was by using "api_after_bridge" like the following, but it only launches when the bridge is teared down(which is not what I want). I originally thought after bridge means right after the 2 party is connected. All I want is to be able to play some message to leg A at certain time.


setVariable("api_after_bridge", "sched_api +10 none uuid_displace ${uuid} start /path/to/some.wav 20 mux");


I have been struggling with different combination for a week now.. Please shed some light if you know something. 


Thanks,

--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant




_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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




_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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




--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant
Back to top
msc at freeswitch.org
Guest





PostPosted: Tue Oct 13, 2009 11:28 pm    Post subject: [Freeswitch-users] sched_api doesn't get launched Reply with quote

On Oct 13, 2009, at 8:30 PM, Henry Huang <red.rain.seven@gmail.com>
wrote:

Quote:
Diego:

You probably miss understood me. I said I was able to make
"sched_hangup" work, but not the "sched_api" in the same way I
script for "sched_hangup"

The problem was on the second paragraph.

Henry, can you capture the debug output of a call and put it in
pastebin?That should yield a clue as to what is going on.

-MC

_______________________________________________
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
Back to top
mike at jerris.com
Guest





PostPosted: Fri Oct 16, 2009 8:39 am    Post subject: [Freeswitch-users] sched_api doesn't get launched Reply with quote

sched_api is a fsapi command not a dialplan application, I believe sched_hangup is both.

Mike



On Oct 13, 2009, at 6:14 AM, Henry Huang wrote:
Quote:
Hi:

I am using mod_java. And in my script I was able to achieve using:


execute("sched_hangup", "+300 alloted_timeout");


However, when I try to run sched_api in the same way, system log returns that it's an invalid application. I have also tried to trigger it with many conditional channel variable api calls , but non of them seemed to execute the api command (because I turned on the highest level of debugging and see no where the sched_api is being called.


The closest thing I got was by using "api_after_bridge" like the following, but it only launches when the bridge is teared down(which is not what I want). I originally thought after bridge means right after the 2 party is connected. All I want is to be able to play some message to leg A at certain time.


setVariable("api_after_bridge", "sched_api +10 none uuid_displace ${uuid} start /path/to/some.wav 20 mux");


I have been struggling with different combination for a week now.. Please shed some light if you know something.


Thanks,

--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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
Back to top
red.rain.seven at gmai...
Guest





PostPosted: Fri Oct 16, 2009 2:04 pm    Post subject: [Freeswitch-users] sched_api doesn't get launched Reply with quote

So how would you trigger it from a script dialplan? The only time it seemed to work is when I did setVariable("api_after_bridge", "sched_api blah blah blah");
but then it gets executed after the channel's been teared down. I thought api_after_bridge means right after the call gets connected.

I need something to execute an api command right before or right after the call gets bridged.

On Fri, Oct 16, 2009 at 9:27 PM, Michael Jerris <mike@jerris.com (mike@jerris.com)> wrote:
Quote:
sched_api is a fsapi command not a dialplan application, I believe sched_hangup is both.  

Mike




On Oct 13, 2009, at 6:14 AM, Henry Huang wrote:



Quote:

Hi:

I am using mod_java. And in my script I was able to achieve using:


execute("sched_hangup", "+300 alloted_timeout");


However, when I try to run sched_api in the same way, system log returns that it's an invalid application. I have also tried to trigger it with many conditional channel variable api calls , but non of them seemed to execute the api command (because I turned on the highest level of debugging and see no where the sched_api is being called. 


The closest thing I got was by using "api_after_bridge" like the following, but it only launches when the bridge is teared down(which is not what I want). I originally thought after bridge means right after the 2 party is connected. All I want is to be able to play some message to leg A at certain time.


setVariable("api_after_bridge", "sched_api +10 none uuid_displace ${uuid} start /path/to/some.wav 20 mux");


I have been struggling with different combination for a week now.. Please shed some light if you know something. 


Thanks,

--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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







_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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




--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant
Back to top
msc at freeswitch.org
Guest





PostPosted: Fri Oct 16, 2009 2:46 pm    Post subject: [Freeswitch-users] sched_api doesn't get launched Reply with quote

On Fri, Oct 16, 2009 at 11:53 AM, Henry Huang <red.rain.seven@gmail.com (red.rain.seven@gmail.com)> wrote:
Quote:
So how would you trigger it from a script dialplan? The only time it seemed to work is when I did setVariable("api_after_bridge", "sched_api blah blah blah");
but then it gets executed after the channel's been teared down. I thought api_after_bridge means right after the call gets connected.

I need something to execute an api command right before or right after the call gets bridged.

api_after_bridge is a channel variable, so using setVariable works just fine. If you need to sched_api is an API only. Check these out:
http://wiki.freeswitch.org/wiki/Mod_commands#Misc._Commands

So you need an API object in order to use it. I don't know the syntax for creating an api obj in Java but in Lua it goes like this:
api = freeswitch.API();
res = api:execute("sched_api","+300 none my_api my_api_args")

Remember, if the method you are using isn't found in the dial plan tools then it isn't a dial plan application. Make sure it's on the list:
http://wiki.freeswitch.org/wiki/Mod_dptools

On the other hand, API commands are listed here:
http://wiki.freeswitch.org/wiki/Mod_commands

dptools require a session object, api commands require an api object...

-MC
Back to top
red.rain.seven at gmai...
Guest





PostPosted: Wed Oct 21, 2009 4:56 am    Post subject: [Freeswitch-users] sched_api doesn't get launched Reply with quote

I can't seem to find the right thing to use in mod_java to execute api commands, only api_after_bridge



2009-10-21 17:42:46.593094 [NOTICE] mod_sofia.c:1509 Pre-Answer sofia/internal/1688003@192.168.1.66 (1688003@192.168.1.66)!
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x004e4480, pid=1927, tid=16116624
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode linux-x86 )
# Problematic frame:
# C  [libc.so.6+0x6f480]  strcpy+0x10
#
# An error report file with more information is saved as:
# /usr/local/freeswitch/bin/hs_err_pid1927.log
2009-10-21 17:42:59.883729 [ERR] switch_core_session.c:1374 Invalid Application sched_api
2009-10-21 17:42:59.883729 [NOTICE] switch_core_session.c:1375 Hangup sofia/internal/1688003@192.168.1.66 (1688003@192.168.1.66) [CS_EXECUTE] [DESTINATION_OUT_OF_ORDER]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.



On Sat, Oct 17, 2009 at 3:37 AM, Michael Collins <msc@freeswitch.org (msc@freeswitch.org)> wrote:
Quote:


On Fri, Oct 16, 2009 at 11:53 AM, Henry Huang <red.rain.seven@gmail.com (red.rain.seven@gmail.com)> wrote:
Quote:
So how would you trigger it from a script dialplan? The only time it seemed to work is when I did setVariable("api_after_bridge", "sched_api blah blah blah");
but then it gets executed after the channel's been teared down. I thought api_after_bridge means right after the call gets connected.

I need something to execute an api command right before or right after the call gets bridged.


api_after_bridge is a channel variable, so using setVariable works just fine. If you need to sched_api is an API only. Check these out:
http://wiki.freeswitch.org/wiki/Mod_commands#Misc._Commands

So you need an API object in order to use it. I don't know the syntax for creating an api obj in Java but in Lua it goes like this:
api = freeswitch.API();
res = api:execute("sched_api","+300 none my_api my_api_args")

Remember, if the method you are using isn't found in the dial plan tools then it isn't a dial plan application. Make sure it's on the list:
http://wiki.freeswitch.org/wiki/Mod_dptools

On the other hand, API commands are listed here:
http://wiki.freeswitch.org/wiki/Mod_commands


dptools require a session object, api commands require an api object...

-MC




_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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




--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant
Back to top
msc at freeswitch.org
Guest





PostPosted: Wed Oct 21, 2009 10:53 am    Post subject: [Freeswitch-users] sched_api doesn't get launched Reply with quote

Judging by this error I would assume that you're still calling sched_api as a Dialplan application and not as an FS API command.


You need to figure out how to create an API obj in java and call sched_api from that object.


-MC

Sent from my iPhone

On Oct 21, 2009, at 2:44 AM, Henry Huang <red.rain.seven@gmail.com (red.rain.seven@gmail.com)> wrote:



Quote:
I can't seem to find the right thing to use in mod_java to execute api commands, only api_after_bridge



2009-10-21 17:42:46.593094 [NOTICE] mod_sofia.c:1509 Pre-Answer sofia/internal/[url=mailto:1688003@192.168.1.66]1688003@192.168.1.66 (1688003@192.168.1.66)[/url]!
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x004e4480, pid=1927, tid=16116624
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode linux-x86 )
# Problematic frame:
# C [libc.so.6+0x6f480] strcpy+0x10
#
# An error report file with more information is saved as:
# /usr/local/freeswitch/bin/hs_err_pid1927.log
2009-10-21 17:42:59.883729 [ERR] switch_core_session.c:1374 Invalid Application sched_api
2009-10-21 17:42:59.883729 [NOTICE] switch_core_session.c:1375 Hangup sofia/internal/[url=mailto:1688003@192.168.1.66]1688003@192.168.1.66 (1688003@192.168.1.66)[/url] [CS_EXECUTE] [DESTINATION_OUT_OF_ORDER]
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.



On Sat, Oct 17, 2009 at 3:37 AM, Michael Collins <[url=mailto:msc@freeswitch.org]msc@freeswitch.org (msc@freeswitch.org)[/url]> wrote:
Quote:


On Fri, Oct 16, 2009 at 11:53 AM, Henry Huang <[url=mailto:red.rain.seven@gmail.com]red.rain.seven@gmail.com (red.rain.seven@gmail.com)[/url]> wrote:
Quote:
So how would you trigger it from a script dialplan? The only time it seemed to work is when I did setVariable("api_after_bridge", "sched_api blah blah blah");
but then it gets executed after the channel's been teared down. I thought api_after_bridge means right after the call gets connected.

I need something to execute an api command right before or right after the call gets bridged.


api_after_bridge is a channel variable, so using setVariable works just fine. If you need to sched_api is an API only. Check these out:
http://wiki.freeswitch.org/wiki/Mod_commands#Misc._Commands

So you need an API object in order to use it. I don't know the syntax for creating an api obj in Java but in Lua it goes like this:
api = freeswitch.API();
res = api:execute("sched_api","+300 none my_api my_api_args")

Remember, if the method you are using isn't found in the dial plan tools then it isn't a dial plan application. Make sure it's on the list:
http://wiki.freeswitch.org/wiki/Mod_dptools

On the other hand, API commands are listed here:
http://wiki.freeswitch.org/wiki/Mod_commands


dptools require a session object, api commands require an api object...

-MC




_______________________________________________
FreeSWITCH-users mailing list
[url=mailto:FreeSWITCH-users@lists.freeswitch.org]FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)[/url]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant


_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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

Back to top
mike at jerris.com
Guest





PostPosted: Wed Oct 21, 2009 3:03 pm    Post subject: [Freeswitch-users] sched_api doesn't get launched Reply with quote

The syntax is different, but the api is the same as lua:

Quote:
Quote:
So you need an API object in order to use it. I don't know the syntax for creating an api obj in Java but in Lua it goes like this:
api = freeswitch.API();
res = api:execute("sched_api","+300 none my_api my_api_args")







create the API object and use the execute method of it.


Mike




On Oct 21, 2009, at 5:44 AM, Henry Huang wrote:
Quote:
I can't seem to find the right thing to use in mod_java to execute api commands, only api_after_bridge



2009-10-21 17:42:46.593094 [NOTICE] mod_sofia.c:1509 Pre-Answer sofia/internal/1688003@192.168.1.66 (1688003@192.168.1.66)!
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x004e4480, pid=1927, tid=16116624
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode linux-x86 )
# Problematic frame:
# C [libc.so.6+0x6f480] strcpy+0x10
#
# An error report file with more information is saved as:
# /usr/local/freeswitch/bin/hs_err_pid1927.log
2009-10-21 17:42:59.883729 [ERR] switch_core_session.c:1374 Invalid Application sched_api
2009-10-21 17:42:59.883729 [NOTICE] switch_core_session.c:1375 Hangup sofia/internal/1688003@192.168.1.66 (1688003@192.168.1.66) [CS_EXECUTE] [DESTINATION_OUT_OF_ORDER]
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.



On Sat, Oct 17, 2009 at 3:37 AM, Michael Collins <msc@freeswitch.org (msc@freeswitch.org)> wrote:
Quote:


On Fri, Oct 16, 2009 at 11:53 AM, Henry Huang <red.rain.seven@gmail.com (red.rain.seven@gmail.com)> wrote:
Quote:
So how would you trigger it from a script dialplan? The only time it seemed to work is when I did setVariable("api_after_bridge", "sched_api blah blah blah");
but then it gets executed after the channel's been teared down. I thought api_after_bridge means right after the call gets connected.

I need something to execute an api command right before or right after the call gets bridged.


api_after_bridge is a channel variable, so using setVariable works just fine. If you need to sched_api is an API only. Check these out:
http://wiki.freeswitch.org/wiki/Mod_commands#Misc._Commands

So you need an API object in order to use it. I don't know the syntax for creating an api obj in Java but in Lua it goes like this:
api = freeswitch.API();
res = api:execute("sched_api","+300 none my_api my_api_args")

Remember, if the method you are using isn't found in the dial plan tools then it isn't a dial plan application. Make sure it's on the list:
http://wiki.freeswitch.org/wiki/Mod_dptools

On the other hand, API commands are listed here:
http://wiki.freeswitch.org/wiki/Mod_commands


dptools require a session object, api commands require an api object...

-MC




_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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




--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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
Back to top
anthony.minessale at g...
Guest





PostPosted: Wed Oct 21, 2009 3:21 pm    Post subject: [Freeswitch-users] sched_api doesn't get launched Reply with quote

Yes you need an API object as described in other email.

Which line of code from java caused that segfault
It looks like a simple NULL string issue that we may want to hunt down.

On Wed, Oct 21, 2009 at 4:44 AM, Henry Huang <red.rain.seven@gmail.com (red.rain.seven@gmail.com)> wrote:
Quote:
I can't seem to find the right thing to use in mod_java to execute api commands, only api_after_bridge



2009-10-21 17:42:46.593094 [NOTICE] mod_sofia.c:1509 Pre-Answer sofia/internal/1688003@192.168.1.66 (1688003@192.168.1.66)!
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x004e4480, pid=1927, tid=16116624
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode linux-x86 )
# Problematic frame:
# C  [libc.so.6+0x6f480]  strcpy+0x10
#
# An error report file with more information is saved as:
# /usr/local/freeswitch/bin/hs_err_pid1927.log
2009-10-21 17:42:59.883729 [ERR] switch_core_session.c:1374 Invalid Application sched_api
2009-10-21 17:42:59.883729 [NOTICE] switch_core_session.c:1375 Hangup sofia/internal/1688003@192.168.1.66 (1688003@192.168.1.66) [CS_EXECUTE] [DESTINATION_OUT_OF_ORDER]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.




On Sat, Oct 17, 2009 at 3:37 AM, Michael Collins <msc@freeswitch.org (msc@freeswitch.org)> wrote:


Quote:



On Fri, Oct 16, 2009 at 11:53 AM, Henry Huang <red.rain.seven@gmail.com (red.rain.seven@gmail.com)> wrote:
Quote:
So how would you trigger it from a script dialplan? The only time it seemed to work is when I did setVariable("api_after_bridge", "sched_api blah blah blah");
but then it gets executed after the channel's been teared down. I thought api_after_bridge means right after the call gets connected.

I need something to execute an api command right before or right after the call gets bridged.


api_after_bridge is a channel variable, so using setVariable works just fine. If you need to sched_api is an API only. Check these out:
http://wiki.freeswitch.org/wiki/Mod_commands#Misc._Commands

So you need an API object in order to use it. I don't know the syntax for creating an api obj in Java but in Lua it goes like this:
api = freeswitch.API();
res = api:execute("sched_api","+300 none my_api my_api_args")

Remember, if the method you are using isn't found in the dial plan tools then it isn't a dial plan application. Make sure it's on the list:
http://wiki.freeswitch.org/wiki/Mod_dptools

On the other hand, API commands are listed here:
http://wiki.freeswitch.org/wiki/Mod_commands


dptools require a session object, api commands require an api object...

-MC






_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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





--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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




--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
red.rain.seven at gmai...
Guest





PostPosted: Fri Oct 23, 2009 4:02 am    Post subject: [Freeswitch-users] sched_api doesn't get launched Reply with quote

Thanks to c6burns on IRC channel for the tip to use execute_on_answer in combination with eval, and of course everyone here that pointing me to the right direction.

I was able to execute sched_api with eval, but not with the combination of execute_on_answer. The argument just don't get parsed as the eval argument. Here is the code:


setVariable("execute_on_answer", "eval sched_api(+%ld none uuid_displace <some uuid> start /usr/local/freeswitch/sounds/en/us/callie/misc/8000/final.wav 20 mux)");




Here is the log:
2009-10-23 16:17:53.633189 [DEBUG] switch_scheduler.c:214 Added task 2 sched_api_function (none) to run at 1256285888
EXECUTE sofia/internal/1688004@192.168.1.66 (1688004@192.168.1.66) eval(+OK Added: 2
)


2009-10-23 16:18:04.52701 [DEBUG] switch_channel.c:1927 sofia/internal/1688004@192.168.1.66 (1688004@192.168.1.66) execute on answer: eval(sched_api(+37 none uuid_displace 84d74f41-8668-4138-943f-f076e94046ad start /usr/local/freeswitch/sounds/en/us/callie/misc/8000/final.wav 20 mux))
EXECUTE sofia/internal/1688004@192.168.1.66 (1688004@192.168.1.66) eval(sched_api(+37 none uuid_displace 84d74f41-8668-4138-943f-f076e94046ad start /usr/local/freeswitch/sounds/en/us/callie/misc/8000/final.wav 20 mux))




The first part of the log is when I just do execute("eval", "${sched_api(+%ld none uuid_displace <some uuid> start /usr/local/freeswitch/sounds/en/us/callie/misc/8000/final.wav 20 mux)}"); And I simple get a OK, and then later on the sched_api gets executed. 


However, on the excerpt of the second log. which I use the combination with execute_on_answer like specified in the yellow hight code above. It doesn't simply return a OK, instead it shows the whole blob of code. and does nothing later. 






On Thu, Oct 22, 2009 at 4:09 AM, Anthony Minessale <anthony.minessale@gmail.com (anthony.minessale@gmail.com)> wrote:
Quote:
Yes you need an API object as described in other email.

Which line of code from java caused that segfault
It looks like a simple NULL string issue that we may want to hunt down.


On Wed, Oct 21, 2009 at 4:44 AM, Henry Huang <red.rain.seven@gmail.com (red.rain.seven@gmail.com)> wrote:
Quote:
I can't seem to find the right thing to use in mod_java to execute api commands, only api_after_bridge



2009-10-21 17:42:46.593094 [NOTICE] mod_sofia.c:1509 Pre-Answer sofia/internal/1688003@192.168.1.66 (1688003@192.168.1.66)!
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x004e4480, pid=1927, tid=16116624
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode linux-x86 )
# Problematic frame:
# C  [libc.so.6+0x6f480]  strcpy+0x10
#
# An error report file with more information is saved as:
# /usr/local/freeswitch/bin/hs_err_pid1927.log
2009-10-21 17:42:59.883729 [ERR] switch_core_session.c:1374 Invalid Application sched_api
2009-10-21 17:42:59.883729 [NOTICE] switch_core_session.c:1375 Hangup sofia/internal/1688003@192.168.1.66 (1688003@192.168.1.66) [CS_EXECUTE] [DESTINATION_OUT_OF_ORDER]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.




On Sat, Oct 17, 2009 at 3:37 AM, Michael Collins <msc@freeswitch.org (msc@freeswitch.org)> wrote:


Quote:



On Fri, Oct 16, 2009 at 11:53 AM, Henry Huang <red.rain.seven@gmail.com (red.rain.seven@gmail.com)> wrote:
Quote:
So how would you trigger it from a script dialplan? The only time it seemed to work is when I did setVariable("api_after_bridge", "sched_api blah blah blah");
but then it gets executed after the channel's been teared down. I thought api_after_bridge means right after the call gets connected.

I need something to execute an api command right before or right after the call gets bridged.


api_after_bridge is a channel variable, so using setVariable works just fine. If you need to sched_api is an API only. Check these out:
http://wiki.freeswitch.org/wiki/Mod_commands#Misc._Commands

So you need an API object in order to use it. I don't know the syntax for creating an api obj in Java but in Lua it goes like this:
api = freeswitch.API();
res = api:execute("sched_api","+300 none my_api my_api_args")

Remember, if the method you are using isn't found in the dial plan tools then it isn't a dial plan application. Make sure it's on the list:
http://wiki.freeswitch.org/wiki/Mod_dptools

On the other hand, API commands are listed here:
http://wiki.freeswitch.org/wiki/Mod_commands


dptools require a session object, api commands require an api object...

-MC






_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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





--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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




--


Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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




--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant
Back to top
anthony.minessale at g...
Guest





PostPosted: Fri Oct 23, 2009 10:11 am    Post subject: [Freeswitch-users] sched_api doesn't get launched Reply with quote

it's probably related to escaping the data.
I was sick of watching you suffer so i added api_on_answer variable to trunk.


On Fri, Oct 23, 2009 at 3:54 AM, Henry Huang <red.rain.seven@gmail.com (red.rain.seven@gmail.com)> wrote:
Quote:
Thanks to c6burns on IRC channel for the tip to use execute_on_answer in combination with eval, and of course everyone here that pointing me to the right direction.

I was able to execute sched_api with eval, but not with the combination of execute_on_answer. The argument just don't get parsed as the eval argument. Here is the code:


setVariable("execute_on_answer", "eval sched_api(+%ld none uuid_displace <some uuid> start /usr/local/freeswitch/sounds/en/us/callie/misc/8000/final.wav 20 mux)");




Here is the log:
2009-10-23 16:17:53.633189 [DEBUG] switch_scheduler.c:214 Added task 2 sched_api_function (none) to run at 1256285888
EXECUTE sofia/internal/1688004@192.168.1.66 (1688004@192.168.1.66) eval(+OK Added: 2
)


2009-10-23 16:18:04.52701 [DEBUG] switch_channel.c:1927 sofia/internal/1688004@192.168.1.66 (1688004@192.168.1.66) execute on answer: eval(sched_api(+37 none uuid_displace 84d74f41-8668-4138-943f-f076e94046ad start /usr/local/freeswitch/sounds/en/us/callie/misc/8000/final.wav 20 mux))
EXECUTE sofia/internal/1688004@192.168.1.66 (1688004@192.168.1.66) eval(sched_api(+37 none uuid_displace 84d74f41-8668-4138-943f-f076e94046ad start /usr/local/freeswitch/sounds/en/us/callie/misc/8000/final.wav 20 mux))




The first part of the log is when I just do execute("eval", "${sched_api(+%ld none uuid_displace <some uuid> start /usr/local/freeswitch/sounds/en/us/callie/misc/8000/final.wav 20 mux)}"); And I simple get a OK, and then later on the sched_api gets executed. 


However, on the excerpt of the second log. which I use the combination with execute_on_answer like specified in the yellow hight code above. It doesn't simply return a OK, instead it shows the whole blob of code. and does nothing later. 







On Thu, Oct 22, 2009 at 4:09 AM, Anthony Minessale <anthony.minessale@gmail.com (anthony.minessale@gmail.com)> wrote:
Quote:
Yes you need an API object as described in other email.

Which line of code from java caused that segfault
It looks like a simple NULL string issue that we may want to hunt down.


On Wed, Oct 21, 2009 at 4:44 AM, Henry Huang <red.rain.seven@gmail.com (red.rain.seven@gmail.com)> wrote:
Quote:
I can't seem to find the right thing to use in mod_java to execute api commands, only api_after_bridge



2009-10-21 17:42:46.593094 [NOTICE] mod_sofia.c:1509 Pre-Answer sofia/internal/1688003@192.168.1.66 (1688003@192.168.1.66)!
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x004e4480, pid=1927, tid=16116624
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode linux-x86 )
# Problematic frame:
# C  [libc.so.6+0x6f480]  strcpy+0x10
#
# An error report file with more information is saved as:
# /usr/local/freeswitch/bin/hs_err_pid1927.log
2009-10-21 17:42:59.883729 [ERR] switch_core_session.c:1374 Invalid Application sched_api
2009-10-21 17:42:59.883729 [NOTICE] switch_core_session.c:1375 Hangup sofia/internal/1688003@192.168.1.66 (1688003@192.168.1.66) [CS_EXECUTE] [DESTINATION_OUT_OF_ORDER]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.




On Sat, Oct 17, 2009 at 3:37 AM, Michael Collins <msc@freeswitch.org (msc@freeswitch.org)> wrote:


Quote:



On Fri, Oct 16, 2009 at 11:53 AM, Henry Huang <red.rain.seven@gmail.com (red.rain.seven@gmail.com)> wrote:
Quote:
So how would you trigger it from a script dialplan? The only time it seemed to work is when I did setVariable("api_after_bridge", "sched_api blah blah blah");
but then it gets executed after the channel's been teared down. I thought api_after_bridge means right after the call gets connected.

I need something to execute an api command right before or right after the call gets bridged.


api_after_bridge is a channel variable, so using setVariable works just fine. If you need to sched_api is an API only. Check these out:
http://wiki.freeswitch.org/wiki/Mod_commands#Misc._Commands

So you need an API object in order to use it. I don't know the syntax for creating an api obj in Java but in Lua it goes like this:
api = freeswitch.API();
res = api:execute("sched_api","+300 none my_api my_api_args")

Remember, if the method you are using isn't found in the dial plan tools then it isn't a dial plan application. Make sure it's on the list:
http://wiki.freeswitch.org/wiki/Mod_dptools

On the other hand, API commands are listed here:
http://wiki.freeswitch.org/wiki/Mod_commands


dptools require a session object, api commands require an api object...

-MC






_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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





--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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




--


Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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




--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant




_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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




--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
chris at cloudtel.com
Guest





PostPosted: Fri Oct 23, 2009 12:56 pm    Post subject: [Freeswitch-users] sched_api doesn't get launched Reply with quote

poor bbhenry Smile

Added in r15207 please test and update docu if necessary:
http://wiki.freeswitch.org/wiki/Variable_api_on_answer

On October 23, 2009 11:02:07 am Anthony Minessale wrote:
Quote:
it's probably related to escaping the data.
I was sick of watching you suffer so i added api_on_answer variable to
trunk.

On Fri, Oct 23, 2009 at 3:54 AM, Henry Huang
<red.rain.seven@gmail.com>wrote:
Quote:
Quote:
Thanks to c6burns on IRC channel for the tip to use execute_on_answer in
combination with eval, and of course everyone here that pointing me to
the right direction.
I was able to execute sched_api with eval, but not with the combination
of execute_on_answer. The argument just don't get parsed as the eval
argument. Here is the code:

setVariable("execute_on_answer", "eval sched_api(+%ld none uuid_displace
<some uuid> start
/usr/local/freeswitch/sounds/en/us/callie/misc/8000/final.wav 20 mux)");


Here is the log:
2009-10-23 16:17:53.633189 [DEBUG] switch_scheduler.c:214 Added task 2
sched_api_function (none) to run at 1256285888
EXECUTE sofia/internal/1688004@192.168.1.66 *eval(+OK *Added: 2
)

2009-10-23 16:18:04.52701 [DEBUG] switch_channel.c:1927 sofia/internal/
1688004@192.168.1.66 *execute on answer: eval(sched_api(+37 none
uuid_displace 84d74f41-8668-4138-943f-f076e94046ad start
/usr/local/freeswitch/sounds/en/us/callie/misc/8000/final.wav 20 mux))*
EXECUTE sofia/internal/1688004@192.168.1.66 eval(sched_api(+37 none
uuid_displace 84d74f41-8668-4138-943f-f076e94046ad start
/usr/local/freeswitch/sounds/en/us/callie/misc/8000/final.wav 20 mux))


The first part of the log is when I just do execute("eval",
"${sched_api(+%ld none uuid_displace <some uuid> start
/usr/local/freeswitch/sounds/en/us/callie/misc/8000/final.wav 20 mux)}");
And I simple get a OK, and then later on the sched_api gets executed.

However, on the excerpt of the second log. which I use the combination
with execute_on_answer like specified in the yellow hight code above. It
doesn't simply return a OK, instead it shows the whole blob of code. and
does nothing later.



On Thu, Oct 22, 2009 at 4:09 AM, Anthony Minessale <

anthony.minessale@gmail.com> wrote:
Quote:
Yes you need an API object as described in other email.

Which line of code from java caused that segfault
It looks like a simple NULL string issue that we may want to hunt down.

On Wed, Oct 21, 2009 at 4:44 AM, Henry Huang
<red.rain.seven@gmail.com>wrote:
Quote:
Quote:
Quote:
Quote:
I can't seem to find the right thing to use in mod_java to execute api
commands, only api_after_bridge

2009-10-21 17:42:46.593094 [NOTICE] mod_sofia.c:1509 Pre-Answer
sofia/internal/1688003@192.168.1.66!
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x004e4480, pid=1927, tid=16116624
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode linux-x86 )
# Problematic frame:
# C [libc.so.6+0x6f480] strcpy+0x10
#
# An error report file with more information is saved as:
# /usr/local/freeswitch/bin/hs_err_pid1927.log
2009-10-21 17:42:59.883729 [ERR] switch_core_session.c:1374 Invalid
Application sched_api
2009-10-21 17:42:59.883729 [NOTICE] switch_core_session.c:1375 Hangup
sofia/internal/1688003@192.168.1.66 [CS_EXECUTE]
[DESTINATION_OUT_OF_ORDER]
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

On Sat, Oct 17, 2009 at 3:37 AM, Michael Collins
<msc@freeswitch.org>wrote:
Quote:
Quote:
Quote:
Quote:
Quote:
On Fri, Oct 16, 2009 at 11:53 AM, Henry Huang
<red.rain.seven@gmail.com

Quote:
wrote:

So how would you trigger it from a script dialplan? The only time it
seemed to work is when I did setVariable("api_after_bridge",
"sched_api blah blah blah");
but then it gets executed after the channel's been teared down. I
thought api_after_bridge means right after the call gets connected.

I need something to execute an api command right before or right
after the call gets bridged.

api_after_bridge is a channel variable, so using setVariable works
just

fine. If you need to sched_api is an API only. Check these out:
http://wiki.freeswitch.org/wiki/Mod_commands#Misc._Commands

So you need an API object in order to use it. I don't know the syntax
for creating an api obj in Java but in Lua it goes like this:
api = freeswitch.API();
res = api:execute("sched_api","+300 none my_api my_api_args")

Remember, if the method you are using isn't found in the dial plan
tools then it isn't a dial plan application. Make sure it's on the
list: http://wiki.freeswitch.org/wiki/Mod_dptools

On the other hand, API commands are listed here:
http://wiki.freeswitch.org/wiki/Mod_commands

dptools require a session object, api commands require an api
object...

-MC


_______________________________________________
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

--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant

_______________________________________________
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-user
s http://www.freeswitch.org

--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessa
le@gmail.com> IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org>
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@co
nference.freeswitch.org> pstn:213-799-1400

_______________________________________________
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

--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant

_______________________________________________
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



_______________________________________________
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
Back to top
red.rain.seven at gmai...
Guest





PostPosted: Sun Oct 25, 2009 10:12 pm    Post subject: [Freeswitch-users] sched_api doesn't get launched Reply with quote

Anthony:

You are da man. Thank you. It's very kind of you to release me from endless trial Razz

On Sat, Oct 24, 2009 at 1:47 AM, Chris Burns <chris@cloudtel.com (chris@cloudtel.com)> wrote:
Quote:
poor bbhenry Smile

Added in r15207 please test and update docu if necessary:
http://wiki.freeswitch.org/wiki/Variable_api_on_answer


On October 23, 2009 11:02:07 am Anthony Minessale wrote:
Quote:
it's probably related to escaping the data.
I was sick of watching you suffer so i added api_on_answer variable to
trunk.

On Fri, Oct 23, 2009 at 3:54 AM, Henry Huang
<red.rain.seven@gmail.com (red.rain.seven@gmail.com)>wrote:
Quote:
Quote:
Thanks to c6burns on IRC channel for the tip to use execute_on_answer in
combination with eval, and of course everyone here that pointing me to
the right direction.
I was able to execute sched_api with eval, but not with the combination
of execute_on_answer. The argument just don't get parsed as the eval
argument. Here is the code:

setVariable("execute_on_answer", "eval sched_api(+%ld none uuid_displace
<some uuid> start
/usr/local/freeswitch/sounds/en/us/callie/misc/8000/final.wav 20 mux)");


Here is the log:
2009-10-23 16:17:53.633189 [DEBUG] switch_scheduler.c:214 Added task 2
sched_api_function (none) to run at 1256285888
EXECUTE sofia/internal/1688004@192.168.1.66 (1688004@192.168.1.66) *eval(+OK *Added: 2
)

2009-10-23 16:18:04.52701 [DEBUG] switch_channel.c:1927 sofia/internal/
1688004@192.168.1.66 (1688004@192.168.1.66) *execute on answer: eval(sched_api(+37 none
uuid_displace 84d74f41-8668-4138-943f-f076e94046ad start
/usr/local/freeswitch/sounds/en/us/callie/misc/8000/final.wav 20 mux))*
EXECUTE sofia/internal/1688004@192.168.1.66 (1688004@192.168.1.66) eval(sched_api(+37 none
uuid_displace 84d74f41-8668-4138-943f-f076e94046ad start
/usr/local/freeswitch/sounds/en/us/callie/misc/8000/final.wav 20 mux))


The first part of the log is when I just do execute("eval",
"${sched_api(+%ld none uuid_displace <some uuid> start
/usr/local/freeswitch/sounds/en/us/callie/misc/8000/final.wav 20 mux)}");
And I simple get a OK, and then later on the sched_api gets executed.

However, on the excerpt of the second log. which I use the combination
with execute_on_answer like specified in the yellow hight code above. It
doesn't simply return a OK, instead it shows the whole blob of code. and
does nothing later.



On Thu, Oct 22, 2009 at 4:09 AM, Anthony Minessale <

anthony.minessale@gmail.com (anthony.minessale@gmail.com)> wrote:
Quote:
Yes you need an API object as described in other email.

Which line of code from java caused that segfault
It looks like a simple NULL string issue that we may want to hunt down.

On Wed, Oct 21, 2009 at 4:44 AM, Henry Huang
<red.rain.seven@gmail.com (red.rain.seven@gmail.com)>wrote:
Quote:
Quote:
Quote:
Quote:
I can't seem to find the right thing to use in mod_java to execute api
commands, only api_after_bridge

2009-10-21 17:42:46.593094 [NOTICE] mod_sofia.c:1509 Pre-Answer
sofia/internal/1688003@192.168.1.66 (1688003@192.168.1.66)!
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x004e4480, pid=1927, tid=16116624
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode linux-x86 )
# Problematic frame:
# C  [libc.so.6+0x6f480]  strcpy+0x10
#
# An error report file with more information is saved as:
# /usr/local/freeswitch/bin/hs_err_pid1927.log
2009-10-21 17:42:59.883729 [ERR] switch_core_session.c:1374 Invalid
Application sched_api
2009-10-21 17:42:59.883729 [NOTICE] switch_core_session.c:1375 Hangup
sofia/internal/1688003@192.168.1.66 (1688003@192.168.1.66) [CS_EXECUTE]
[DESTINATION_OUT_OF_ORDER]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

On Sat, Oct 17, 2009 at 3:37 AM, Michael Collins
<msc@freeswitch.org (msc@freeswitch.org)>wrote:
Quote:
Quote:
Quote:
Quote:
Quote:
On Fri, Oct 16, 2009 at 11:53 AM, Henry Huang
<red.rain.seven@gmail.com (red.rain.seven@gmail.com)

Quote:
wrote:

So how would you trigger it from a script dialplan? The only time it
seemed to work is when I did setVariable("api_after_bridge",
"sched_api blah blah blah");
but then it gets executed after the channel's been teared down. I
thought api_after_bridge means right after the call gets connected.

I need something to execute an api command right before or right
after the call gets bridged.

api_after_bridge is a channel variable, so using setVariable works
just

fine. If you need to sched_api is an API only. Check these out:
http://wiki.freeswitch.org/wiki/Mod_commands#Misc._Commands

So you need an API object in order to use it. I don't know the syntax
for creating an api obj in Java but in Lua it goes like this:
api = freeswitch.API();
res = api:execute("sched_api","+300 none my_api my_api_args")

Remember, if the method you are using isn't found in the dial plan
tools then it isn't a dial plan application. Make sure it's on the
list: http://wiki.freeswitch.org/wiki/Mod_dptools

On the other hand, API commands are listed here:
http://wiki.freeswitch.org/wiki/Mod_commands

dptools require a session object, api commands require an api
object...

-MC


_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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

--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-user


Quote:
Quote:
Quote:
Quote:
s http://www.freeswitch.org

--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm

Quote:
Quote:
Quote:
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email]) <MSN%3Aanthony_minessale@hotmail.com ([email]MSN%253Aanthony_minessale@hotmail.com[/email])>
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])<PAYPAL%3Aanthony.minessa
le@gmail.com (le@gmail.com)> IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference

Quote:
Quote:
Quote:
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email]) <sip%3A888@conference.freeswitch.org ([email]sip%253A888@conference.freeswitch.org[/email])>
iax:guest@conference.freeswitch.org/888

Quote:
Quote:
Quote:
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])<googletalk%3Aconf%2B888@co
nference.freeswitch.org> pstn:213-799-1400

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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

--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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





_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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





--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services