[Freeswitch-dev] Don't hang up after application has ended
Hello, I have written an implementation of the switch_application_interface. Now I noticed, that after the execution of the application_function the session is hung up automatically. Can I take any influence on this behavior? I don't want the session to be closed in some cases. Applications, which are called in the future, should be able to work with this session. For example the first application decides what to do with a session. And the second one bridges it to an endpoint. Is that possible at all? Thanks in advance! Alois Komenda Fraunhofer-Einrichtung für Systeme der Kommunikationstechnik ESK
That would be caused either by your application hanging up or it being the last thing in the sessions list of applications to run Mike On Aug 12, 2008, at 10:41 AM, Alois Komenda wrote:
Hello,
I have written an implementation of the switch_application_interface. Now I noticed, that after the execution of the application_function the session is hung up automatically.
Can I take any influence on this behavior? I don't want the session to be closed in some cases. Applications, which are called in the future, should be able to work with this session. For example the first application decides what to do with a session. And the second one bridges it to an endpoint.
Is that possible at all?
Thanks in advance!
Alois Komenda Fraunhofer-Einrichtung für Systeme der Kommunikationstechnik ESK
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
This change causes FS to not build successfully on Win32: error C2220: warning treated as error - no 'object' file generated switch_ivr_originate.c 424 warning C4244: '*=': conversion from 'double' to 'switch_size_t', possible loss of data switch_ivr_originate.c 424 warning C4244: '*=': conversion from 'double' to 'switch_size_t', possible loss of data switch_ivr_originate.c 1228 This can be easily resolved by removing the /WX switch (Treat Warning as Errors) from FreeSwitchCoreLib but I wanted to alert about it before suggesting it. … I wonder if posts here actually get anywhere … -----Original Message----- From: freeswitch-svn-bounces@lists.freeswitch.org [mailto:freeswitch-svn-bounces@lists.freeswitch.org] On Behalf Of Freeswitch SVN Sent: Tuesday, August 12, 2008 6:41 AM To: freeswitch-svn@lists.freeswitch.org Subject: [Freeswitch-svn] [commit] r9246 - in freeswitch/trunk/src: . include Author: anthm Date: Mon Aug 11 16:41:18 2008 New Revision: 9246 Modified: freeswitch/trunk/src/include/switch_resample.h freeswitch/trunk/src/switch_ivr_originate.c freeswitch/trunk/src/switch_resample.c Log: fix resampled file in ringback issue from mailing list Modified: freeswitch/trunk/src/include/switch_resample.h ============================================================================ == --- freeswitch/trunk/src/include/switch_resample.h (original) +++ freeswitch/trunk/src/include/switch_resample.h Mon Aug 11 16:41:18 2008 @@ -60,6 +60,7 @@ int to_rate; /*! the factor to resample by (from / to) */ double factor; + double rfactor; /*! a pointer to store a float buffer for data to be resampled */ float *from; /*! the size of the from buffer used */ Modified: freeswitch/trunk/src/switch_ivr_originate.c ============================================================================ == --- freeswitch/trunk/src/switch_ivr_originate.c (original) +++ freeswitch/trunk/src/switch_ivr_originate.c Mon Aug 11 16:41:18 2008 @@ -420,6 +420,9 @@ } olen = mlen; + if (ringback.fh->resampler) { + olen *= ringback.fh->resampler->rfactor; + } switch_core_file_read(ringback.fh, write_frame.data, &olen); if (olen == 0) { @@ -1200,6 +1203,10 @@ } olen = mlen; + if (ringback.fh->resampler) { + olen *= ringback.fh->resampler->rfactor; + } + switch_core_file_read(ringback.fh, write_frame.data, &olen); if (olen == 0) { Modified: freeswitch/trunk/src/switch_resample.c ============================================================================ == --- freeswitch/trunk/src/switch_resample.c (original) +++ freeswitch/trunk/src/switch_resample.c Mon Aug 11 16:41:18 2008 @@ -72,6 +72,7 @@ lto_rate = (double) resampler->to_rate; lfrom_rate = (double) resampler->from_rate; resampler->factor = (lto_rate / lfrom_rate); + resampler->rfactor = (lfrom_rate / lto_rate); resampler->resampler = resample_open(QUALITY, resampler->factor, resampler->factor); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Activate Resampler %d->%d %f\n", resampler->from_rate, resampler->to_rate, No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.6.1/1605 - Release Date: 11/08/2008 16:59
If you can convince anthm and MikeJ to turn off "treat warnings as errors" I'd be surprised. More likely they will want to eliminate the underlying cause of the warning. If that cannot be eliminated for some reason then they might consider turning off /WX switch, but I'm sure that is absolutely the last resort. -MC ________________________________ From: freeswitch-dev-bounces@lists.freeswitch.org [mailto:freeswitch-dev-bounces@lists.freeswitch.org] On Behalf Of UV Sent: Tuesday, August 12, 2008 10:26 AM To: freeswitch-dev@lists.freeswitch.org Subject: Re: [Freeswitch-dev] r9246 - in freeswitch/trunk/src: . include This change causes FS to not build successfully on Win32: error C2220: warning treated as error - no 'object' file generated switch_ivr_originate.c 424 warning C4244: '*=': conversion from 'double' to 'switch_size_t', possible loss of data switch_ivr_originate.c 424 warning C4244: '*=': conversion from 'double' to 'switch_size_t', possible loss of data switch_ivr_originate.c 1228 This can be easily resolved by removing the /WX switch (Treat Warning as Errors) from FreeSwitchCoreLib but I wanted to alert about it before suggesting it. ... I wonder if posts here actually get anywhere ... -----Original Message----- From: freeswitch-svn-bounces@lists.freeswitch.org [mailto:freeswitch-svn-bounces@lists.freeswitch.org] On Behalf Of Freeswitch SVN Sent: Tuesday, August 12, 2008 6:41 AM To: freeswitch-svn@lists.freeswitch.org Subject: [Freeswitch-svn] [commit] r9246 - in freeswitch/trunk/src: . include Author: anthm Date: Mon Aug 11 16:41:18 2008 New Revision: 9246 Modified: freeswitch/trunk/src/include/switch_resample.h freeswitch/trunk/src/switch_ivr_originate.c freeswitch/trunk/src/switch_resample.c Log: fix resampled file in ringback issue from mailing list Modified: freeswitch/trunk/src/include/switch_resample.h ======================================================================== ====== --- freeswitch/trunk/src/include/switch_resample.h (original) +++ freeswitch/trunk/src/include/switch_resample.h Mon Aug 11 16:41:18 2008 @@ -60,6 +60,7 @@ int to_rate; /*! the factor to resample by (from / to) */ double factor; + double rfactor; /*! a pointer to store a float buffer for data to be resampled */ float *from; /*! the size of the from buffer used */ Modified: freeswitch/trunk/src/switch_ivr_originate.c ======================================================================== ====== --- freeswitch/trunk/src/switch_ivr_originate.c (original) +++ freeswitch/trunk/src/switch_ivr_originate.c Mon Aug 11 16:41:18 2008 @@ -420,6 +420,9 @@ } olen = mlen; + if (ringback.fh->resampler) { + olen *= ringback.fh->resampler->rfactor; + } switch_core_file_read(ringback.fh, write_frame.data, &olen); if (olen == 0) { @@ -1200,6 +1203,10 @@ } olen = mlen; + if (ringback.fh->resampler) { + olen *= ringback.fh->resampler->rfactor; + } + switch_core_file_read(ringback.fh, write_frame.data, &olen); if (olen == 0) { Modified: freeswitch/trunk/src/switch_resample.c ======================================================================== ====== --- freeswitch/trunk/src/switch_resample.c (original) +++ freeswitch/trunk/src/switch_resample.c Mon Aug 11 16:41:18 2008 @@ -72,6 +72,7 @@ lto_rate = (double) resampler->to_rate; lfrom_rate = (double) resampler->from_rate; resampler->factor = (lto_rate / lfrom_rate); + resampler->rfactor = (lfrom_rate / lto_rate); resampler->resampler = resample_open(QUALITY, resampler->factor, resampler->factor); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Activate Resampler %d->%d %f\n", resampler->from_rate, resampler->to_rate, No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.6.1/1605 - Release Date: 11/08/2008 16:59
I agree. That's exactly why I've mentioned that :-) -----Original Message----- From: freeswitch-dev-bounces@lists.freeswitch.org [mailto:freeswitch-dev-bounces@lists.freeswitch.org] On Behalf Of Michael Collins Sent: Wednesday, August 13, 2008 3:37 AM To: freeswitch-dev@lists.freeswitch.org Subject: Re: [Freeswitch-dev] r9246 - in freeswitch/trunk/src: . include If you can convince anthm and MikeJ to turn off “treat warnings as errors” I’d be surprised. More likely they will want to eliminate the underlying cause of the warning. If that cannot be eliminated for some reason then they might consider turning off /WX switch, but I’m sure that is absolutely the last resort. -MC ________________________________ From: freeswitch-dev-bounces@lists.freeswitch.org [mailto:freeswitch-dev-bounces@lists.freeswitch.org] On Behalf Of UV Sent: Tuesday, August 12, 2008 10:26 AM To: freeswitch-dev@lists.freeswitch.org Subject: Re: [Freeswitch-dev] r9246 - in freeswitch/trunk/src: . include This change causes FS to not build successfully on Win32: error C2220: warning treated as error - no 'object' file generated switch_ivr_originate.c 424 warning C4244: '*=': conversion from 'double' to 'switch_size_t', possible loss of data switch_ivr_originate.c 424 warning C4244: '*=': conversion from 'double' to 'switch_size_t', possible loss of data switch_ivr_originate.c 1228 This can be easily resolved by removing the /WX switch (Treat Warning as Errors) from FreeSwitchCoreLib but I wanted to alert about it before suggesting it. … I wonder if posts here actually get anywhere … -----Original Message----- From: freeswitch-svn-bounces@lists.freeswitch.org [mailto:freeswitch-svn-bounces@lists.freeswitch.org] On Behalf Of Freeswitch SVN Sent: Tuesday, August 12, 2008 6:41 AM To: freeswitch-svn@lists.freeswitch.org Subject: [Freeswitch-svn] [commit] r9246 - in freeswitch/trunk/src: . include Author: anthm Date: Mon Aug 11 16:41:18 2008 New Revision: 9246 Modified: freeswitch/trunk/src/include/switch_resample.h freeswitch/trunk/src/switch_ivr_originate.c freeswitch/trunk/src/switch_resample.c Log: fix resampled file in ringback issue from mailing list Modified: freeswitch/trunk/src/include/switch_resample.h ======================================================================== ====== --- freeswitch/trunk/src/include/switch_resample.h (original) +++ freeswitch/trunk/src/include/switch_resample.h Mon Aug 11 16:41:18 2008 @@ -60,6 +60,7 @@ int to_rate; /*! the factor to resample by (from / to) */ double factor; + double rfactor; /*! a pointer to store a float buffer for data to be resampled */ float *from; /*! the size of the from buffer used */ Modified: freeswitch/trunk/src/switch_ivr_originate.c ======================================================================== ====== --- freeswitch/trunk/src/switch_ivr_originate.c (original) +++ freeswitch/trunk/src/switch_ivr_originate.c Mon Aug 11 16:41:18 2008 @@ -420,6 +420,9 @@ } olen = mlen; + if (ringback.fh->resampler) { + olen *= ringback.fh->resampler->rfactor; + } switch_core_file_read(ringback.fh, write_frame.data, &olen); if (olen == 0) { @@ -1200,6 +1203,10 @@ } olen = mlen; + if (ringback.fh->resampler) { + olen *= ringback.fh->resampler->rfactor; + } + switch_core_file_read(ringback.fh, write_frame.data, &olen); if (olen == 0) { Modified: freeswitch/trunk/src/switch_resample.c ======================================================================== ====== --- freeswitch/trunk/src/switch_resample.c (original) +++ freeswitch/trunk/src/switch_resample.c Mon Aug 11 16:41:18 2008 @@ -72,6 +72,7 @@ lto_rate = (double) resampler->to_rate; lfrom_rate = (double) resampler->from_rate; resampler->factor = (lto_rate / lfrom_rate); + resampler->rfactor = (lfrom_rate / lto_rate); resampler->resampler = resample_open(QUALITY, resampler->factor, resampler->factor); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Activate Resampler %d->%d %f\n", resampler->from_rate, resampler->to_rate, No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.6.1/1605 - Release Date: 11/08/2008 16:59 No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.6.1/1607 - Release Date: 12/08/2008 07:19 No virus found in this outgoing message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.6.1/1607 - Release Date: 12/08/2008 07:19
try latest trunk r9283 2008/8/12 UV <uv@talknet.com.au>
I agree. That's exactly why I've mentioned that :-)
-----Original Message----- From: freeswitch-dev-bounces@lists.freeswitch.org [mailto:freeswitch-dev-bounces@lists.freeswitch.org] On Behalf Of Michael Collins Sent: Wednesday, August 13, 2008 3:37 AM To: freeswitch-dev@lists.freeswitch.org Subject: Re: [Freeswitch-dev] r9246 - in freeswitch/trunk/src: . include
If you can convince anthm and MikeJ to turn off "treat warnings as errors" I'd be surprised. More likely they will want to eliminate the underlying cause of the warning. If that cannot be eliminated for some reason then they might consider turning off /WX switch, but I'm sure that is absolutely the last resort.
-MC
________________________________
From: freeswitch-dev-bounces@lists.freeswitch.org [mailto:freeswitch-dev-bounces@lists.freeswitch.org] On Behalf Of UV Sent: Tuesday, August 12, 2008 10:26 AM To: freeswitch-dev@lists.freeswitch.org Subject: Re: [Freeswitch-dev] r9246 - in freeswitch/trunk/src: . include
This change causes FS to not build successfully on Win32:
error C2220: warning treated as error - no 'object' file generated switch_ivr_originate.c 424
warning C4244: '*=': conversion from 'double' to 'switch_size_t', possible loss of data switch_ivr_originate.c 424
warning C4244: '*=': conversion from 'double' to 'switch_size_t', possible loss of data switch_ivr_originate.c 1228
This can be easily resolved by removing the /WX switch (Treat Warning as Errors) from FreeSwitchCoreLib but I wanted to alert about it before suggesting it.
… I wonder if posts here actually get anywhere …
-----Original Message----- From: freeswitch-svn-bounces@lists.freeswitch.org [mailto:freeswitch-svn-bounces@lists.freeswitch.org] On Behalf Of Freeswitch SVN Sent: Tuesday, August 12, 2008 6:41 AM To: freeswitch-svn@lists.freeswitch.org Subject: [Freeswitch-svn] [commit] r9246 - in freeswitch/trunk/src: . include
Author: anthm
Date: Mon Aug 11 16:41:18 2008
New Revision: 9246
Modified:
freeswitch/trunk/src/include/switch_resample.h
freeswitch/trunk/src/switch_ivr_originate.c
freeswitch/trunk/src/switch_resample.c
Log:
fix resampled file in ringback issue from mailing list
Modified: freeswitch/trunk/src/include/switch_resample.h
======================================================================== ======
--- freeswitch/trunk/src/include/switch_resample.h (original)
+++ freeswitch/trunk/src/include/switch_resample.h Mon Aug 11 16:41:18 2008
@@ -60,6 +60,7 @@
int to_rate;
/*! the factor to resample by (from / to) */
double factor;
+ double rfactor;
/*! a pointer to store a float buffer for data to be resampled */
float *from;
/*! the size of the from buffer used */
Modified: freeswitch/trunk/src/switch_ivr_originate.c
======================================================================== ======
--- freeswitch/trunk/src/switch_ivr_originate.c (original)
+++ freeswitch/trunk/src/switch_ivr_originate.c Mon Aug 11 16:41:18 2008
@@ -420,6 +420,9 @@
}
olen = mlen;
+ if (ringback.fh->resampler) {
+ olen *= ringback.fh->resampler->rfactor;
+ }
switch_core_file_read(ringback.fh, write_frame.data, &olen);
if (olen == 0) {
@@ -1200,6 +1203,10 @@
}
olen = mlen;
+ if (ringback.fh->resampler) {
+ olen *= ringback.fh->resampler->rfactor;
+ }
+
switch_core_file_read(ringback.fh, write_frame.data, &olen);
if (olen == 0) {
Modified: freeswitch/trunk/src/switch_resample.c
======================================================================== ======
--- freeswitch/trunk/src/switch_resample.c (original)
+++ freeswitch/trunk/src/switch_resample.c Mon Aug 11 16:41:18 2008
@@ -72,6 +72,7 @@
lto_rate = (double) resampler->to_rate;
lfrom_rate = (double) resampler->from_rate;
resampler->factor = (lto_rate / lfrom_rate);
+ resampler->rfactor = (lfrom_rate / lto_rate);
resampler->resampler = resample_open(QUALITY, resampler->factor, resampler->factor);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Activate Resampler %d->%d %f\n", resampler->from_rate, resampler->to_rate,
No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.6.1/1605 - Release Date: 11/08/2008 16:59
No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.6.1/1607 - Release Date: 12/08/2008 07:19
No virus found in this outgoing message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.6.1/1607 - Release Date: 12/08/2008 07:19
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@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@conference.freeswitch.org> pstn:213-799-1400
participants (5)
-
Alois Komenda
-
Anthony Minessale
-
Michael Collins
-
Michael Jerris
-
UV