[Freeswitch-users] [Solved] Can ringback be variable in bridge command?

Mario G mario_fs at mgtech.com
Thu Apr 5 21:06:40 MSD 2012

For those of you that tried to help here is my solution. I tried various things but found I could send an alert-info to the SPA962s, once that worked I removed the second bridge to ring a different tone via different group. Now, I just export an alert-info prior the second bridge that causes a different internal ring to let us know cell phones are also being rung. Neato!

On Apr 4, 2012, at 3:48 PM, Mario G wrote:

> Added the majority of the dialplan... It complicated but has been working fine since 2010 except for 1 little issue. I tried to keep the question simple but...  Here is what happens:
> 1. Incoming call, I set early media "Hi so and so..." followed by us-ring.
> 2. Bridge the call to internal group A rings for 17 seconds, if time out:
> 3. Internal group B rings for 1 second, same phones but different extension on them which causes a different ring that let's us know we are about to call cellphones.
> 4. Bridge call to internal phones again and 2 cell phones. If time out:
> 5. Play message and go to voicemail.
> The problem is step 3. If the phone is picked up right in the 1 second the call is missed and the other phones keep ringing. I thought to try to combine step 2 and 3 into a single bridge command it may work. But... in another post I just made I realized it would be solved if I could just ring users/group without bridging the call that would solve the issues and be better. Have not found anything on the wiki yet.
> BTW, the reason for the reset of the early media us-ring is if I don't do it the caller hears the first second of the Hi message. You can't put ringback into the bridge dialstring (I tried) I have to keep the 2 steps separate, which is why now I would just like to figure out how to dial without bridging but wonder what would happen when call is picked up during then.
>     <extension name="xxphone">
>       <condition field="destination_number" expression="^2920$">
>         <!-- Next lines allow control after bridge timeout and hangup after bridge -->
>         <action application="set" data="hangup_after_bridge=true"/>
>         <action application="set" data="continue_on_fail=true"/>
>         <!--  While ringing inside caller will hear "hi name" then standard ring -->  
> 	<action application="set" data="ringback=file_string://${xxsounds}hi-long.wav!${sayname}!tone_stream://${us-ring};loops=-1"/>
>         <!-- ring home extensions only for ## seconds -->
>         <action application="bridge" data="[originate_timeout=17]group/home@${domain_name}"/>
>         <!-- ring different extension once so we know we're about to go to the second stage -->
>         <!-- ringback must be reset otherwise caller will hear a first second of previous early media for this 1 ring -->
> 	<action application="set" data="ringback=${us-ring}"/>
>         <action application="bridge" data="[originate_timeout=1,ringback=${us-ring}]group/MGT@${domain_name}"/>
>         <!-- Say we are keep trying.... and setup so they hear music while ringing a second time-->
> 	<!-- Using mod_file_string we can keep the phones ringing while playing sounds! -->
> 	<action application="set" data="ringback=file_string://${xxsounds}hold_on.wav!${sayname}!${xxsounds}we_trying_please_hold.wav!local_stream://moh"/>
>         <!-- this is needed to allow call_timeout to work after bridging to a gateway -->
>         <action application="set" data="ignore_early_media=true"/>
>         <!-- ring home extensions +cell phone for ## seconds  NOTE THE NEXT 2 LINES DID NOT WORK TO SET TIMEOUT -->
>         <!-- NOTE: The use of :_: invokes enterprise syntax to ring simoultaneously!   ATT takes 8-10 rings before cell phone rings! -->
>         <!-- DIAL_GATEWAY is set in the public folder dialplans  -->
>         <action application="bridge" data="<originate_timeout=23,origination_caller_id_number=${caller_id_number},origination_caller_id_name=${caller_id_name}>group/home@${domain_name}:_:sofia/gateway/${dial_gateway}/19163334444:_:sofia/gateway/${dial_gateway}/19161112222"/>
>         <!-- Timeout/No answer go to voicemail -->
>         <!--action application="playback" data="${xxsounds}leave_a_message.wav"/-->
>         <action application="playback" data="file_string://${xxsounds}please_leave_a_message.wav!//${sayname}"/>
>         <action application="answer"/>
>         <!-- Next line removes default greeting, we already played one above-->
>         <action application="set" data="skip_greeting=true"/>
>         <action application="voicemail" data="default ${domain_name} 100"/>
>       </condition>
>     </extension>
> On Apr 4, 2012, at 2:33 PM, Michael Collins wrote:
>> What's the plain language description of what you're trying to do? I think we're all a bit confused about exactly which problem you're attempting to solve. A plain language description (without any telephonese) will definitely get us all on the same page. :)
>> Thanks,
>> MC
>> On Wed, Apr 4, 2012 at 1:21 PM, Mario G <mario_fs at mgtech.com> wrote:
>> I tried putting the ringback into a bridge command - no effect, I also tried adding bridge_early_media to the bridge - no effect. The problem is when the call  is picked during the the second bridge which is used to create a different ring on the extensions (there is a later bridge to answer) the other phones in the group continue to ring. I am trying to solve this which for some reason occurs more after I updated to the recent git. I am hoping if I can combine into a single bridge command the problem will be solved. Any suggestion greatly appreciated.
>> BTW, the command below does nothing, nothing in the debug, it shows up but nothing happens. I tried using ! , | but no luck.
>>    <action application="bridge" data="[originate_timeout=17]group/home@${domain_name}![originate_timeout=1]group/MGT@${domain_name}"/>
>> On Apr 4, 2012, at 10:51 AM, Mario G wrote:
>>> Testing the latest git has introduced an issue but I wonder if I can get around it by combining the snippet below into one bridge command. If I can set the ringback in the bridge it may fix it. I did not see this in the wiki. Can it be done?
>>> Mario G
>>>         <action application="bridge" data="[originate_timeout=17]group/home@${domain_name}"/>
>>> 	<action application="set" data="ringback=${us-ring}"/>
>>> 	<action application="bridge" data="[originate_timeout=1]group/MGT@${domain_name}"/>
>>> _________________________________________________________________________
>> _________________________________________________________________________
>> Pr
> _________________________________________________________________________
> 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/20120405/f73088f9/attachment-0001.html 

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