[Freeswitch-users] displace_session and moh via event socket

Hector Geraldino Hector.Geraldino at ipsoft.com
Fri Aug 17 20:34:49 MSD 2012


Have you tried a combination of playback + sched_api +10 uuid break ?

IIRC you can use break app to cancel the playback, so all you need is to schedule it to happen sometime in the future (10 seconds in your case)

-----Original Message-----
From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Peter Steinbach
Sent: Friday, August 17, 2012 11:03 AM
To: FreeSWITCH Users Help
Subject: [Freeswitch-users] displace_session and moh via event socket

Hello,

In an IVR we want to play moh for 10 seconds via event socket to an existing session. We send the following message (we actually do not use ESL for certain reasons):
  SendMsg
  call-command: execute
  execute-app-name: displace_session
  execute-app-arg: local_stream://moh m +10000
  event-lock:false

I think, this is the only way to play a stream for a certain time within a session right?

We get the following output:
2012-08-17 16:05:20.261460 [DEBUG] switch_ivr.c:599 sofia/internal/202 at fs100.mydomain.de Command Execute displace_session(local_stream://moh m +10000) EXECUTE sofia/internal/202 at fs100.mydomain.de
displace_session(local_stream://moh m +10000)
2012-08-17 16:05:20.261460 [DEBUG] mod_local_stream.c:417 Opening Stream [moh/8000] 8000hz
2012-08-17 16:05:20.261460 [DEBUG] switch_core_media_bug.c:502 Attaching BUG to sofia/internal/202 at fs100.mydomain.de
2012-08-17 16:05:20.321460 [DEBUG] switch_core_io.c:353 Setting BUG Codec PCMA:8
2012-08-17 16:05:27.981463 [CRIT] mod_local_stream.c:297 Leaking stream handle! [switch_ivr_displace_session() src/switch_ivr_async.c:951]
2012-08-17 16:05:35.701462 [CRIT] mod_local_stream.c:297 Leaking stream handle! [switch_ivr_displace_session() src/switch_ivr_async.c:951]
2012-08-17 16:05:43.421463 [CRIT] mod_local_stream.c:297 Leaking stream handle! [switch_ivr_displace_session() src/switch_ivr_async.c:951] and no sound is played.

Passing a regular filename does not work either. Without the "m" or time parameter we have also the same result: No file is played. See the following log:
2012-08-17 17:00:51.911469 [DEBUG] switch_ivr.c:599 sofia/internal/202 at fs100.mydomain.de Command Execute
displace_session(/usr/local/freeswitch/sounds/en/us/callie/google/de/willkommen.mp3
m +10000)
EXECUTE sofia/internal/202 at fs100.mydomain.de
displace_session(/usr/local/freeswitch/sounds/en/us/callie/google/de/willkommen.mp3
m +10000)
2012-08-17 17:00:51.921461 [DEBUG] switch_core_media_bug.c:502 Attaching BUG to sofia/internal/202 at fs100.mydomain.de
2012-08-17 17:00:51.941460 [DEBUG] switch_core_io.c:353 Setting BUG Codec PCMA:8 And then output stops for this session.

An normal playback works however, but with playback we cannot limit a file to a certain time period, right?

Did Anybody have the same issue and knows how to solve this?


--
With kind regards
Peter Steinbach 

Telefaks Services GmbH
mailto:lists (att) telefaks.de
Internet: www.telefaks.de



_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org
http://www.freeswitchsolutions.com

 

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list