[Freeswitch-users] DIalplan logic

Dave Stevenson stevendt at primrosebank.net
Mon Nov 9 14:56:10 PST 2009


Hi Guys,

OK, with the RegEx help that you gave me, I have separated out the processing of extension 100 from 101 to 399 as I wanted.

I have created a group (100) which contains a number of phones - 101 to 105 at the moment.

When the PSTN line rings, I want all the extensions in the group to ring - that's the easy bit (I think - it's a copy of extension 2000 code)

   <extension name="group_dial_primrose">
      <condition field="destination_number" expression="^100$">
            <action application="bridge" data="${group_call(primrose@${domain_name})}"/>
     </condition>
    </extension>

That's fine and the nominated phones all ring.

I'm struggling to get it to do what I want when some doesn't pick up though.

All extensions ring as required, but their own dialplan entries (copies of the 1001 to 1005 code in the default dialplan) don't answer the call. That's fine, as you would not want every extension's voice mail to kick in.

What I want to happen is for extension 100's voice mail to kick in after a time delay.

So, get the dialed exetension number so that I can point at the right mailbox

<action application="set" data="dialed_extension=$1"/>

set the timeout for the call

 <action application="set" data="call_timeout=20"/>

Added these lines - but don't know why - they are in the default extension code ?????

 <action application="set" data="hangup_after_bridge=true"/>
 <action application="set" data="continue_on_fail=true"/>
 <action application="answer"/>

then go to voice mail on 100

 <action application="sleep" data="1000"/>
 <action application="voicemail" data="default ${domain_name}{dialed_extension}"/>


giving 

 <extension name="group_dial_primrose">
      <condition field="destination_number" expression="^100$">
 <action application="set" data="dialed_extension=$1"/>
 <action application="set" data="call_timeout=20"/>
 <action application="bridge" data="${group_call(primrose@${domain_name})}"/>
 <action application="set" data="hangup_after_bridge=true"/>
 <action application="set" data="continue_on_fail=true"/>
 <action application="answer"/>
 <action application="sleep" data="1000"/>
 <action application="voicemail" data="default ${domain_name}{dialed_extension}"/>

      </condition>
    </extension>

The voicemail kicks in, and prompts are correct (although the extension name is not spoken) but the wav file is saved in the 1001 directory not 100 and neither extension 100 or 1001 think that have any voice mail messages.

Can someone help please ?

Where am i going wrong ?

regards
Dave




 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20091109/78c113b9/attachment-0002.html 


More information about the FreeSWITCH-users mailing list