[Freeswitch-users] Play music while transferring new incoming call

ocset ocset at the800group.com
Tue Nov 6 17:04:55 MSK 2012


Well, after a long discussion with "MorkBork" on IRC, the riddle has 
been solved. (Thanks again for your patience MorkBork!)

The  <action application="bridge" 
data="sofia/internal/1005 at 192.168.0.150" 
<mailto:sofia/internal/1005 at 192.168.0.150>/> is causing the problem. 
192.168.0.150 is the FS IP address and is causing a loop-back though the 
dialplan.

In MorkBork's own words - "freeswitch sees this, handles it as a refer, 
it re-transverses the dialplan and misses all your dialplan logic on the 
second time around"

This works

<extension name="ext_8888">
           <condition field="destination_number" expression="^(8888)$">
                  <action application="export" 
data="ringback=local_stream://custom1"/>
                  <action application="bridge" data="user/1005"/>
           </condition>
</extension>

Thanks you all for your help and suggestions.


On 06/11/12 15:38, Nandy Dagondon wrote:
> Yes. Answer the call before the bridge so that MOH can be played on 
> the caller.
>
> ================================================
> Lapulapu City, Phils
> Phone: +63-32-3401807, (USA) +1-646-5471226
> Mobile: +63-920-6373450
> *Worldwide:*
> Dial any 200+ Access Number in 37 Countries 
> <http://www.snipurl.com/magicbox-access>, then ...
>               dial *011-63-32-3401807# afterwards.
>
>
>
> On Tue, Nov 6, 2012 at 11:30 AM, ocset <ocset at the800group.com 
> <mailto:ocset at the800group.com>> wrote:
>
>     Thanks Avi
>
>     I have tried the following two dial plans but the phone just rings
>     - no music.
>
>
>     <extension name="ext_8888">
>             <condition field="destination_number" expression="^(8888)$">
>                     <action application="set"
>     data="transfer_ringback=local_stream://moh"/>
>                     <action application="set"
>     data="ringback=local_stream://moh"/>
>                     <action application="transfer" data="1005 XML
>     default"/>
>             </condition>
>      </extension>
>
>
>     <extension name="ext_8888">
>             <condition field="destination_number" expression="^(8888)$">
>                     <action application="set"
>     data="transfer_ringback=local_stream://moh"/>
>                     <action application="set"
>     data="ringback=local_stream://moh"/>
>                     <action application="bridge"
>     data="sofia/internal/1005 at 192.168.0.150"
>     <mailto:sofia/internal/1005 at 192.168.0.150>/>
>             </condition>
>      </extension>
>
>     What am I missing? Should there be an "answer" directive in there
>     somewhere also?
>
>     Thanks
>     O.
>
>
>     On 05/11/12 23:30, Avi Marcus wrote:
>>     You probably want ringback and/or transfer ringback. That's for
>>     playing something while the call is waiting to be answered.
>>
>>     See:
>>     http://wiki.freeswitch.org/wiki/Time_of_Day_Routing#Example_for_office_open_09:00-16:00 there's
>>     something set there, using:
>>             <action application="set" data="ringback=local_stream://moh"/>
>>             <action application="set" data="transfer_ringback=local_stream://moh"/>
>>     You're line isn't quite right -- "{ignore_early_media_=true_}",
>>     you need to set the variable data.
>>
>>     Playback is blocking -- it plays and then moves on.
>>     Transfer_ringback sets what to do when the transfer occurs.
>>
>>     I hope that helps and you can clean up the wiki when you've got
>>     it all figured out.
>>
>>     -Avi
>>
>>
>>
>>     On Mon, Nov 5, 2012 at 4:55 PM, ocset <ocset at the800group.com
>>     <mailto:ocset at the800group.com>> wrote:
>>
>>         Hi
>>
>>         I am trying to to configure FS to play music while
>>         transferring a new
>>         incoming call. Like when you phone a business and you get the
>>         "your call
>>         in important to use, please wait while we transfer..." message.
>>
>>         I found this suggestion on the web but it does not work for
>>         me. I have
>>         tested the two <action> command separately to make sure they
>>         work but
>>         when they are put together, the call is never answered and no
>>         music is
>>         played.
>>
>>
>>         <include>
>>           <extension name="ext_8888">
>>                  <condition field="destination_number"
>>         expression="^(8888)$">
>>                          <action application="playback"
>>         data="music/test.wav"/>
>>                          <action application="bridge"
>>         data="{ignore_early_media}sofia/internal/1005 at 192.168.0.150
>>         <mailto:1005 at 192.168.0.150>"/>
>>                  </condition>
>>           </extension>
>>         </include>
>>
>>         ps. I cannot find the answer in either of the two FS books.
>>         Would have
>>         expected this to be there, at least in the cookbook? All I
>>         can find is
>>         examples of playing music and then hanging up. Happy to be
>>         corrected if
>>         I missed it:-)
>>
>>         All help greatly appreciated
>>         Thanks
>>         O.
>>
>>         _________________________________________________________________________
>>         Professional FreeSWITCH Consulting Services:
>>         consulting at freeswitch.org <mailto: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
>>         <mailto: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
>>
>>
>>
>>
>>     _________________________________________________________________________
>>     Professional FreeSWITCH Consulting Services:
>>     consulting at freeswitch.org  <mailto: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  <mailto: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
>
>
>     _________________________________________________________________________
>     Professional FreeSWITCH Consulting Services:
>     consulting at freeswitch.org <mailto: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
>     <mailto: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
>
>
>
>
> _________________________________________________________________________
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20121106/d4165eb7/attachment-0001.html 


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