[Freeswitch-users] DIalplan logic
Dave Stevenson
stevendt at primrosebank.net
Mon Nov 9 16:18:15 PST 2009
Well,
I thought it was fixed - it is more or less working, with one more stumbling block.
I have just posted a dump to the pastebin - from Dave (stevendt)
The voice mail works - but too well.
If the call is answered by a someone at this end - everything is fine until the user hangs up, then the remote party gets the voicemail messages.#
Is there something else wrong with the dialplan logic below ?
regards
Dave
----- Original Message -----
From: Dave Stevenson
To: freeswitch-users at lists.freeswitch.org
Sent: Monday, November 09, 2009 11:52 PM
Subject: Re: [Freeswitch-users] DIalplan logic
Michael,
thanks a lot - it's fixed......
you spotted exactly what the problem was !
<condition field="destination_number" expression="^(100)$">
<action application="voicemail" data="default ${domain_name} ${dialed_extension}"/>
regards
Dave
----- Original Message -----
From: Michael Collins
To: freeswitch-users at lists.freeswitch.org
Sent: Monday, November 09, 2009 11:26 PM
Subject: Re: [Freeswitch-users] DIalplan logic
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})}"/>
</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})}"/>
<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
----------------------------------------------------------------------------
_______________________________________________
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
------------------------------------------------------------------------------
_______________________________________________
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/20091110/a4515cf4/attachment-0002.html
More information about the FreeSWITCH-users
mailing list