[Freeswitch-users] DIalplan logic
Michael Collins
msc at freeswitch.org
Mon Nov 9 15:26:25 PST 2009
See comment inline
On Mon, Nov 9, 2009 at 2:56 PM, Dave Stevenson <stevendt at primrosebank.net>wrote:
> 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})}"/ <primrose@$%7Bdomain_name%7D%29%7D%22/>>
> </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">
>
The following line needs to have 100 in parens like this: "^(100)$" because
that's how you get $1 to be populated.
> <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})}"/ <primrose@$%7Bdomain_name%7D%29%7D%22/>>
> <action application="set" data="hangup_after_bridge=true"/>
> <action application="set" data="continue_on_fail=true"/>
> <action application="answer"/>
> <action application="sleep" data="1000"/>
>
I think this might be a typo? Shouldn't this next line be ... data="default
${domain_name} ${dialed_extension}"
> <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 ?
>
>
Make those changes, reloadxml, and then try again. Be sure to capture a
debug log if it doesn't work and put that log in pastebin.freeswitch.org.
-MC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20091109/3389c076/attachment-0002.html
More information about the FreeSWITCH-users
mailing list