Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] GotoIf

Goto page 1, 2  Next
 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
brian at freeswitch.org
Guest





PostPosted: Fri Oct 03, 2008 3:22 am    Post subject: [Freeswitch-users] GotoIf Reply with quote

Hope this helps.


<extension name="ext1">
<condition field="destination_number" expression="^32484120169$">
<action application="transfer" data="1000 XML default"/>
</condition>
</extension>

<extension name="ext2">
<condition field="destination_number" expression="^4732803429$">
<action application="transfer" data="terje XML default"/>
</condition>
</extension>

<extension name="ext3">
<condition field="destination_number" expression="^32476378561$">
<action application="transfer" data="henk_gsm_disa XML default"/>
</condition>
</extension>


/b


On Oct 3, 2008, at 2:18 AM, henkoegema wrote:

Quote:

How do I do this in FS ? :
exten => s,n,GotoIf($[${CALLERID(num)}=32484120169]?default,1000,1)
exten => s,n,GotoIf($[${CALLERID(num)}=4732803429]?default,terje,1)
exten => s,n,GotoIf($[${CALLERID(num)}=32476378561]?henk_gsm_disa,s,1)


The Asterisk to Freeswitch Rosetta stone says:
GotoIf Conditions in dialplan (<condition field="blah"
expression="foo">
but I can't figure out the right syntax.

Henk
--
View this message in context: http://www.nabble.com/GotoIf-tp19793170p19793170.html
Sent from the Freeswitch-users mailing list archive at Nabble.com.


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
pabx_freeswitch at tel...
Guest





PostPosted: Fri Oct 03, 2008 3:29 am    Post subject: [Freeswitch-users] GotoIf Reply with quote

henkoegema wrote:
Quote:

How do I do this in FS ? :
exten => s,n,GotoIf($[${CALLERID(num)}=32484120169]?default,1000,1)
exten => s,n,GotoIf($[${CALLERID(num)}=4732803429]?default,terje,1)
exten => s,n,GotoIf($[${CALLERID(num)}=32476378561]?henk_gsm_disa,s,1)


The Asterisk to Freeswitch Rosetta stone says:
GotoIf Conditions in dialplan (<condition field="blah" expression="foo">
but I can't figure out the right syntax.

Henk



I've made some progress in the mean time.
I made a test extension 2020:

<extension name="2020">
<condition field="destination_number" expression="^2020$"/>
<condition field="^${caller_id_number}$" expression="2000">
:clap:
<action application="bridge" data="sofia/internal/9999@$${domain}"/>
</condition>
<condition field="^${caller_id_number}$" expression="2002">
<action application="bridge" data="sofia/internal/9999@$${domain}"/>
</condition>
</extension>

When I call 2020 from 2000, I'l get the MOH.


When I swap 2000 and 2002 I will NOT get MOH :
<extension name="2020">
<condition field="destination_number" expression="^2020$"/>
<condition field="^${caller_id_number}$" expression="2002">
<action application="bridge" data="sofia/internal/9999@$${domain}"/>
</condition>
<condition field="^${caller_id_number}$" expression="2000">
:confused:
<action application="bridge" data="sofia/internal/9999@$${domain}"/>
</condition>
</extension>


Henk


--
View this message in context: http://www.nabble.com/GotoIf-tp19793170p19793801.html
Sent from the Freeswitch-users mailing list archive at Nabble.com.


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
brian at freeswitch.org
Guest





PostPosted: Fri Oct 03, 2008 3:55 am    Post subject: [Freeswitch-users] GotoIf Reply with quote

Actually try this:

<extension name="ext1">
<condition field="${caller_id_number}" expression="^32484120169$">
<action application="transfer" data="1000 XML default"/>
</condition>
</extension>

<extension name="ext2">
<condition field="${caller_id_number}" expression="^4732803429$">
<action application="transfer" data="terje XML default"/>
</condition>
</extension>

<extension name="ext3">
<condition field="${caller_id_number}" expression="^32476378561$">
<action application="transfer" data="henk_gsm_disa XML default"/>
</condition>
</extension>


Your condition field= shouldn't have a ^ or a $ in it like yours does.

/b



On Oct 3, 2008, at 3:23 AM, henkoegema wrote:

Quote:


henkoegema wrote:
Quote:

How do I do this in FS ? :
exten => s,n,GotoIf($[${CALLERID(num)}=32484120169]?default,1000,1)
exten => s,n,GotoIf($[${CALLERID(num)}=4732803429]?default,terje,1)
exten => s,n,GotoIf($[${CALLERID(num)}=32476378561]?henk_gsm_disa,s,
1)


The Asterisk to Freeswitch Rosetta stone says:
GotoIf Conditions in dialplan (<condition field="blah"
expression="foo">
but I can't figure out the right syntax.

Henk



I've made some progress in the mean time.
I made a test extension 2020:

<extension name="2020">
<condition field="destination_number" expression="^2020$"/>
<condition field="^${caller_id_number}$" expression="2000">
:clap:
<action application="bridge" data="sofia/internal/9999@$$
{domain}"/>
</condition>
<condition field="^${caller_id_number}$" expression="2002">
<action application="bridge" data="sofia/internal/9999@$$
{domain}"/>
</condition>
</extension>

When I call 2020 from 2000, I'l get the MOH.


When I swap 2000 and 2002 I will NOT get MOH :
<extension name="2020">
<condition field="destination_number" expression="^2020$"/>
<condition field="^${caller_id_number}$" expression="2002">
<action application="bridge" data="sofia/internal/9999@$$
{domain}"/>
</condition>
<condition field="^${caller_id_number}$" expression="2000">
:confused:
<action application="bridge" data="sofia/internal/9999@$$
{domain}"/>
</condition>
</extension>


Henk


--
View this message in context: http://www.nabble.com/GotoIf-tp19793170p19793801.html
Sent from the Freeswitch-users mailing list archive at Nabble.com.


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
pabx_freeswitch at tel...
Guest





PostPosted: Fri Oct 03, 2008 4:59 am    Post subject: [Freeswitch-users] GotoIf Reply with quote

Brian West-3 wrote:
Quote:

Actually try this:

<extension name="ext1">
<condition field="${caller_id_number}" expression="^32484120169$">
<action application="transfer" data="1000 XML default"/>
</condition>
</extension>

<extension name="ext2">
<condition field="${caller_id_number}" expression="^4732803429$">
<action application="transfer" data="terje XML default"/>
</condition>
</extension>

<extension name="ext3">
<condition field="${caller_id_number}" expression="^32476378561$">
<action application="transfer" data="henk_gsm_disa XML default"/>
</condition>
</extension>

.....
.....


The above works. :jumping:


===========================================================

But I'm still puzzling with this:

<extension name="2020">
<condition field="destination_number" expression="^2020$"/>
<condition field="${caller_id_number}" expression="2000">
<action application="bridge" data="sofia/internal/9999@$${domain}"/>
</condition>
<condition field="${caller_id_number}" expression="2002">
<action application="bridge" data="sofia/internal/2004@$${domain}"/>
</condition>
</extension>

When I call 2020 from 2000 it's ok.
When I call 2020 from 2002 i't NOT ok. (Call failed: 404 Not found)

Is my syntax wrong?



However this works:

<extension name="2020">
<condition field="destination_number" expression="^2020$"/>
<condition field="${caller_id_number}" expression="2000">
<action application="bridge" data="sofia/internal/9999@$${domain}"/>
</condition>
</extension>

<extension name="2020">
<condition field="destination_number" expression="^2020$"/>
<condition field="${caller_id_number}" expression="2002">
<action application="bridge" data="sofia/internal/2004@$${domain}"/>
</condition>
</extension>

Isn't it possible to combine the two extension name="2020" into one
extension 2020

Henk

--
View this message in context: http://www.nabble.com/GotoIf-tp19793170p19794894.html
Sent from the Freeswitch-users mailing list archive at Nabble.com.


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
anthony.minessale at g...
Guest





PostPosted: Fri Oct 03, 2008 8:21 am    Post subject: [Freeswitch-users] GotoIf Reply with quote

Hey!, I remember gotoif one of the many things in asterisk that I added before I started FS. Wink



On Fri, Oct 3, 2008 at 4:57 AM, henkoegema <pabx_freeswitch@telenet.be (pabx_freeswitch@telenet.be)> wrote:
Quote:


Brian West-3 wrote:
Quote:

Actually try this:

<extension name="ext1">
<condition field="${caller_id_number}" expression="^32484120169$">
<action application="transfer" data="1000 XML default"/>
</condition>
</extension>

<extension name="ext2">
<condition field="${caller_id_number}" expression="^4732803429$">
<action application="transfer" data="terje XML default"/>
</condition>
</extension>

<extension name="ext3">
<condition field="${caller_id_number}" expression="^32476378561$">
<action application="transfer" data="henk_gsm_disa XML default"/>
</condition>
</extension>


Quote:
.....
.....


The above works. :jumping:


===========================================================

But I'm still puzzling with this:

<extension name="2020">
<condition field="destination_number" expression="^2020$"/>
<condition field="${caller_id_number}" expression="2000">

<action application="bridge" data="sofia/internal/9999@$${domain}"/>
</condition>
<condition field="${caller_id_number}" expression="2002">

<action application="bridge" data="sofia/internal/2004@$${domain}"/>
</condition>
</extension>

When I call 2020 from 2000 it's ok.
When I call 2020 from 2002 i't NOT ok. (Call failed: 404 Not found)

Is my syntax wrong?



However this works:

<extension name="2020">
<condition field="destination_number" expression="^2020$"/>
<condition field="${caller_id_number}" expression="2000">

<action application="bridge" data="sofia/internal/9999@$${domain}"/>
</condition>
</extension>


<extension name="2020">
<condition field="destination_number" expression="^2020$"/>
<condition field="${caller_id_number}" expression="2002">

<action application="bridge" data="sofia/internal/2004@$${domain}"/>
</condition>
</extension>

Isn't it possible to combine the two extension name="2020" into one
extension 2020

Henk

--
View this message in context: http://www.nabble.com/GotoIf-tp19793170p19794894.html

Sent from the Freeswitch-users mailing list archive at Nabble.com.


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org





--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
brian at freeswitch.org
Guest





PostPosted: Fri Oct 03, 2008 9:34 am    Post subject: [Freeswitch-users] GotoIf Reply with quote

Might want to try this:

<condition field="destination_number" expression="^2020$"
break="never"/>

Otherwise it's gonna stop trying and never get to the second condition.

/b

On Oct 3, 2008, at 8:17 AM, Anthony Minessale wrote:

Quote:

<extension name="2020">
<condition field="destination_number" expression="^2020$"/>
<condition field="${caller_id_number}" expression="2000">
<action application="bridge" data="sofia/internal/9999@$$
{domain}"/>
</condition>
<condition field="${caller_id_number}" expression="2002">
<action application="bridge" data="sofia/internal/2004@$$
{domain}"/>
</condition>
</extension>


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
pabx_freeswitch at tel...
Guest





PostPosted: Fri Oct 03, 2008 1:49 pm    Post subject: [Freeswitch-users] GotoIf Reply with quote

Brian West-3 wrote:
Quote:

Might want to try this:

<condition field="destination_number" expression="^2020$"
break="never"/>




When I try this I get a strange (looping ?) effect and not even the fist
condition is executed (calling from 2000)

<extension name="2020">
Quote:
<condition field="destination_number" expression="^2020$"
break="never"/>
<condition field="${caller_id_number}" expression="2000">
<action application="bridge" data="sofia/internal/9999@$$
{domain}"/>
</condition>
<condition field="${caller_id_number}" expression="2002">
<action application="bridge" data="sofia/internal/2004@$$
{domain}"/>
</condition>
</extension>

Maybe it's not possible to test multiple caller_id_numbers inside one
<extension>
At least when I separate them in multiple extensions, it works.

--
View this message in context: http://www.nabble.com/GotoIf-tp19793170p19803514.html
Sent from the Freeswitch-users mailing list archive at Nabble.com.


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
pabx_freeswitch at tel...
Guest





PostPosted: Sat Oct 04, 2008 3:24 am    Post subject: [Freeswitch-users] GotoIf Reply with quote

I discovered some small errors in previous threads concerning this item.
(transfer i.s.o bridge)

To conclude:

Asterisk:
-----------
exten => s,n,GotoIf($[${CALLERID(num)}=32476478861]?default,1000,1)


FS:
----
<extension name="Henk GSM">
<condition field="caller_id_number" expression="^32476378861$">
<action application="bridge"
data="sofia/internal/1000%$${domain}"/>
</condition>
</extension>


Henk
--
View this message in context: http://www.nabble.com/GotoIf-tp19793170p19810038.html
Sent from the Freeswitch-users mailing list archive at Nabble.com.


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
ap at arnaldopereira.com
Guest





PostPosted: Sat Oct 04, 2008 5:47 am    Post subject: [Freeswitch-users] GotoIf Reply with quote

On Sat, Oct 4, 2008 at 5:21 AM, henkoegema <pabx_freeswitch@telenet.be (pabx_freeswitch@telenet.be)> wrote:
Quote:

I discovered some small errors in previous threads concerning this item.
(transfer i.s.o bridge)

To conclude:

Asterisk:
-----------
exten => s,n,GotoIf($[${CALLERID(num)}=32476478861]?default,1000,1)


FS:
----
<extension name="Henk GSM">
<condition field="caller_id_number" expression="^32476378861$">
<action application="bridge"
data="sofia/internal/1000%$${domain}"/>
</condition>
</extension>

Remember that this analogy is wrong. Asterisk's dialplan runs a goto when the expression is true, while FS' originates a call and bridge the two parties.

Quote:



Henk
--
View this message in context: http://www.nabble.com/GotoIf-tp19793170p19810038.html

Sent from the Freeswitch-users mailing list archive at Nabble.com.


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org





--
Arnaldo M Pereira
ap@arnaldopereira.com (ap@arnaldopereira.com)
http://www.arnaldopereira.com
Back to top
anthony.minessale at g...
Guest





PostPosted: Sat Oct 04, 2008 11:21 am    Post subject: [Freeswitch-users] GotoIf Reply with quote

we also have the cond fsapi
<action application="transfer" data="${cond(${caller_id_number}==1234 ? ${ext1} : ${ext2})}"/>

On Sat, Oct 4, 2008 at 5:45 AM, Arnaldo de Moraes Pereira <ap@arnaldopereira.com (ap@arnaldopereira.com)> wrote:
Quote:
On Sat, Oct 4, 2008 at 5:21 AM, henkoegema <pabx_freeswitch@telenet.be (pabx_freeswitch@telenet.be)> wrote:

Quote:

I discovered some small errors in previous threads concerning this item.
(transfer i.s.o bridge)

To conclude:

Asterisk:
-----------
exten => s,n,GotoIf($[${CALLERID(num)}=32476478861]?default,1000,1)


FS:
----
<extension name="Henk GSM">
<condition field="caller_id_number" expression="^32476378861$">
<action application="bridge"
data="sofia/internal/1000%$${domain}"/>
</condition>
</extension>


Remember that this analogy is wrong. Asterisk's dialplan runs a goto when the expression is true, while FS' originates a call and bridge the two parties.

Quote:



Henk
--
View this message in context: http://www.nabble.com/GotoIf-tp19793170p19810038.html

Sent from the Freeswitch-users mailing list archive at Nabble.com.


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org






--
Arnaldo M Pereira
ap@arnaldopereira.com (ap@arnaldopereira.com)
http://www.arnaldopereira.com


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
brian at freeswitch.org
Guest





PostPosted: Sat Oct 04, 2008 11:27 am    Post subject: [Freeswitch-users] GotoIf Reply with quote

On Oct 4, 2008, at 3:21 AM, henkoegema wrote:

Quote:

I discovered some small errors in previous threads concerning this
item.
(transfer i.s.o bridge)

To conclude:

Asterisk:
-----------
exten => s,n,GotoIf($[${CALLERID(num)}=32476478861]?default,1000,1)


You wanted an example that does this. The example I provided does
exactly what gotoif does. It sends to call to extension 1000 in
context default.

Its not an error but a matter of choice on how you want to handle the
situation.


Quote:

FS:
----
<extension name="Henk GSM">
<condition field="caller_id_number"
expression="^32476378861$">
<action application="bridge"
data="sofia/internal/1000%$${domain}"/>
</condition>
</extension>


You can bridge or transfer. If you wanted the exact behavior of
gotoif then transfer was it. Since you wanted to send it to extension
1000 in context default. Using bridge doesn't do that. If you notice
in the default config their are things like voicemail, and various
other things that get set when you call 1000 but when you bridge you
bypass all that and the extension now has NO voicemail or any of the
features setup by calling 1000 directly in the dialplan.

/b


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
pabx_freeswitch at tel...
Guest





PostPosted: Sat Oct 04, 2008 3:38 pm    Post subject: [Freeswitch-users] GotoIf Reply with quote

Brian West-3 wrote:
Quote:

You can bridge or transfer. If you wanted the exact behavior of
gotoif then transfer was it. Since you wanted to send it to extension
1000 in context default. Using bridge doesn't do that. If you notice
in the default config their are things like voicemail, and various
other things that get set when you call 1000 but when you bridge you
bypass all that and the extension now has NO voicemail or any of the
features setup by calling 1000 directly in the dialplan.



This doesn't work:
<extension name="ext1">
<condition field="destination_number" expression="2020"/>
<condition field="caller_id_number" expression="2000">
<action application="transfer" data="999 XML default"/>
</condition>
</extension>

But this does:

<extension name="ext1">
<condition field="destination_number" expression="2020"/>
<condition field="caller_id_number" expression="2000">
<action application="bridge" data="sofia/internal/9999@$${domain}"/>
</condition>
</extension>

I've been testing endless with these examples. That's why I came to the
(wrong) conclusion that transfer doesn't work and bridge does.
Until I saw my mistake:
<action application="transfer" data="999 XML default"/>
should have been
<action application="transfer" data="9999 XML default"/>

Sorry for the confusion.
You were so right Brian. :clap:

--
View this message in context: http://www.nabble.com/GotoIf-tp19793170p19817097.html
Sent from the Freeswitch-users mailing list archive at Nabble.com.


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
pabx_freeswitch at tel...
Guest





PostPosted: Sat Oct 04, 2008 3:44 pm    Post subject: [Freeswitch-users] GotoIf Reply with quote

Anthony Minessale-2 wrote:
Quote:

we also have the cond fsapi
<action application="transfer" data="${cond(${caller_id_number}==1234 ?
${ext1} : ${ext2})}"/>


Thanks for the hint.
Never knew about this one.

--
View this message in context: http://www.nabble.com/GotoIf-tp19793170p19817205.html
Sent from the Freeswitch-users mailing list archive at Nabble.com.


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
brian at freeswitch.org
Guest





PostPosted: Sat Oct 04, 2008 3:54 pm    Post subject: [Freeswitch-users] GotoIf Reply with quote

Now if you really wanna get fancy and you're running SVN trunk you can
do this:

<extension name="ext1">
<condition field="destination_number" expression="2020"/>
<condition field="caller_id_number" expression="2000">
<action application="bridge" data="loopback/9999"/>
</condition>
</extension>

Now if loopback is used and you come to a point where the underlying
channels bridge to each other the loopback channel will bow out and
leave the two channels bridged.


/b
PS: everyone PLEASE test SVN trunk! Wink

On Oct 4, 2008, at 3:36 PM, henkoegema wrote:

Quote:
Sorry for the confusion.
You were so right Brian. :clap:


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
pabx_freeswitch at tel...
Guest





PostPosted: Sat Oct 04, 2008 5:21 pm    Post subject: [Freeswitch-users] GotoIf Reply with quote

Brian West-3 wrote:
Quote:

Now if you really wanna get fancy and you're running SVN trunk you can
do this:

<extension name="ext1">
<condition field="destination_number" expression="2020"/>
<condition field="caller_id_number" expression="2000">
<action application="bridge" data="loopback/9999"/>
</condition>
</extension>

Now if loopback is used and you come to a point where the underlying
channels bridge to each other the loopback channel will bow out and
leave the two channels bridged.


freeswitch@ubuntu> version
FreeSWITCH Version 1.0.trunk (9841)
freeswitch@ubuntu> 2008-10-05 00:16:26 [NOTICE] switch_channel.c:552
switch_channel_set_name() New Channel sofia/internal/2000@192.168.2.11
[16089410-9262-11dd-ae2c-771a315e7f60]
2008-10-05 00:16:26 [INFO] mod_dialplan_xml.c:232 dialplan_hunt() Processing
2000->2020 in context default
2008-10-05 00:16:26 [ERR] switch_core_session.c:249
switch_core_session_outgoing_channel() Could not locate channel type
loopback
2008-10-05 00:16:26 [ERR] switch_ivr_originate.c:964 switch_ivr_originate()
Cannot create outgoing channel of type [loopback] cause:
[CHAN_NOT_IMPLEMENTED]
2008-10-05 00:16:26 [INFO] mod_dptools.c:1848 audio_bridge_function()
Originate Failed. Cause: CHAN_NOT_IMPLEMENTED


--
View this message in context: http://www.nabble.com/GotoIf-tp19793170p19818399.html
Sent from the Freeswitch-users mailing list archive at Nabble.com.


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services