[Freeswitch-users] How to get last bridged call leg phone number?

Gary Chen Gary.Chen at lightyear.net
Wed Jun 27 20:28:42 MSD 2012


FreeSWITCH Version 1.2.0-rc2+git~20120625T160048Z~690cae5de1

I am trying to setup hunt group using bridge app. I want it to ring the first available phone, if that person does not answer, then it should go to that person's voicemail. Here is my part of dialplan:
    <extension name="Local_Extension1">
      <condition field="destination_number" expression="(^(5554447579$)">
        <action application="set" data="ignore_early_media=true"/>
        <action application="bridge" data="{originate_continue_on_timeout=false}[ leg_timeout=10]sofia/internal/5554447580 at 192.168.1.22|[leg_timeout=10]sofia/internal/5554447578 at 192.168.1.22"/>
      </condition>
      <condition>
      Send call to voicemail .....
     </condition>
    </extension>

If no answer on 5554447580, I want it to goto 5554447580's voicemail. If no answer on 5554447578, I want it to goto 5554447578's voicemail. But I could not find the variable which contains the last bridged number information.
How do I get the last dialed number in bridge app?
I tried to  add variable in each leg like following, but it did not work:
        <action application="bridge" data="{originate_continue_on_timeout=false}[ mailbox=7580,leg_timeout=10]sofia/internal/5554447580 at 192.168.1.22|[mailbox=7578,leg_timeout=10]sofia/internal/5554447578 at 192.168.1.22"/>


Gary


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


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