[Freeswitch-users] Connect two FreeSWITCH Boxes

Peder peder at networkoblivion.com
Wed Jun 30 04:47:25 PDT 2010


I would guess there is an error in public on A, but you didn't include all
of that context so I can't say for sure.  Note that it matches 10001 in
public, but when it gets to Local_Call, it just sees $1, not 10001.  That s
why the match is failing.  

 

 

Dialplan: sofia/internal/20001 at 10.3.3.10 Regex (PASS) [Calls from BoxB]
destination_number(10001) =~ // break=on-false

Dialplan: sofia/internal/20001 at 10.3.3.10 Action transfer($1 XML default)

"there are a bunch of state machine messages here"

Dialplan: sofia/internal/20001 at 10.3.3.10 parsing [default->Local_Call]
continue=false

Dialplan: sofia/internal/20001 at 10.3.3.10 Regex (FAIL) [Local_Call]
destination_number($1) =~ /^(10\d\d\d)$/ break=on-false

 

 

 

 

From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Kane,
Michael (mkane02)
Sent: Tuesday, June 29, 2010 9:41 AM
To: freeswitch-users at lists.freeswitch.org
Subject: [Freeswitch-users] Connect two FreeSWITCH Boxes

 

Hello newbie here.  I'm having difficulty routing calls between 2 FreeSWITCH
servers.  I'm following the instructions on the Wiki titled "Connect Two
FreeSWITCH Boxes" and I'm taking the IP authentication approach.  When I
originate a call from server "B" the Regex matches and forwards the call
onto Server "A".  Server "A" isn't matching in dialplan/default.xml
(Local_Call) for some reason.  Public.xml successfully transfers the call
into the default context, but for some reason it skips over the Local_Call
Regex.  Anyone's guidance would be greatly appreciated.

Server "B" (call origination dialing 10001 from 20001)

10.3.3.10

dialplan/default.xml

   <extension name="Dial to BoxA">

      <condition field="destination_number" expression="^(10\d\d\d)$">

        <action application="bridge" data="sofia/internal/$1 at 10.1.1.10"/>

      </condition>

   </extension>

outbound call trace from console

Dialplan: sofia/internal/20001 at 10.3.3.10 parsing [default->Local_Call]
continue=false

Dialplan: sofia/internal/20001 at 10.3.3.10 Regex (FAIL) [Local_Call]
destination_number(10001) =~ /^(20\d\d\d)$/ break=on-false

Dialplan: sofia/internal/20001 at 10.3.3.10 parsing [default->Dial to BoxA]
continue=false

Dialplan: sofia/internal/20001 at 10.3.3.10 Regex (PASS) [Dial to BoxA]
destination_number(10001) =~ /^(10\d\d\d)$/ break=on-false

Dialplan: sofia/internal/20001 at 10.3.3.10 Action
bridge(sofia/internal/10001 at 10.1.1.10)

 

dialplan/public.xml

 <extension name="Calls from BoxA">

      <condition field="destination_number" expression=^(10\d\d\d)$">

        <action application="transfer" data="$1 XML default"/>

      </condition>

    </extension>

**************************************************************************

Server "A" (Call termination)

10.1.1.10

dialplan/default.xml

<extension name="Local_Call">

     <condition field="destination_number" expression="^(10\d\d\d)$">

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

       <action application="bridge"
data="user/${dialed_extension}@${domain_name}"/>

       <action application="answer"/>

       <action application="hangup"/>

     </condition>

   </extension>

dialplan/public.xml

   <extension name="Dial to BoxB">

      <condition field="destination_number" expression="^(20\d\d\d)$">

        <action application="bridge" data="sofia/internal/$1 at 10.3.3.10"/>

      </condition>

   </extension>

inbound call trace from console

Dialplan: sofia/internal/20001 at 10.3.3.10 parsing [public->Calls from BoxB]
continue=false

Dialplan: sofia/internal/20001 at 10.3.3.10 Regex (PASS) [Calls from BoxB]
destination_number(10001) =~ // break=on-false

Dialplan: sofia/internal/20001 at 10.3.3.10 Action transfer($1 XML default)

"there are a bunch of state machine messages here"

Dialplan: sofia/internal/20001 at 10.3.3.10 parsing [default->Local_Call]
continue=false

Dialplan: sofia/internal/20001 at 10.3.3.10 Regex (FAIL) [Local_Call]
destination_number($1) =~ /^(10\d\d\d)$/ break=on-false

Dialplan: sofia/internal/20001 at 10.3.3.10 parsing [default->Dial to BoxB]
continue=false

Dialplan: sofia/internal/20001 at 10.3.3.10 Regex (FAIL) [Dial to BoxB]
destination_number($1) =~ /^(20\d\d\d)$/ break=on-false

Dialplan: sofia/internal/20001 at 10.3.3.10 parsing [default->outbound]
continue=false

Dialplan: sofia/internal/20001 at 10.3.3.10 Regex (FAIL) [outbound]
destination_number($1) =~ /^(\d)(\d{6})$/ break=on-false

Dialplan: sofia/internal/20001 at 10.3.3.10 parsing [default->pizza_demo]
continue=false

Dialplan: sofia/internal/20001 at 10.3.3.10 Regex (FAIL) [pizza_demo]
destination_number($1) =~ /^(pizza|74992)$/ break=on-false

Dialplan: sofia/internal/20001 at 10.3.3.10 parsing
[default->local.example.com] continue=false

Dialplan: sofia/internal/20001 at 10.3.3.10 Regex (FAIL) [local.example.com]
${toll_allow}() =~ /local/ break=on-false

Dialplan: sofia/internal/20001 at 10.3.3.10 parsing
[default->domestic.example.com] continue=false

Dialplan: sofia/internal/20001 at 10.3.3.10 Regex (FAIL) [domestic.example.com]
${toll_allow}() =~ /domestic/ break=on-false

Dialplan: sofia/internal/20001 at 10.3.3.10 parsing
[default->international.example.com] continue=false

Dialplan: sofia/internal/20001 at 10.3.3.10 Regex (FAIL)
[international.example.com] ${toll_allow}() =~ /international/
break=on-false

Dialplan: sofia/internal/20001 at 10.3.3.10 parsing [default->enum]
continue=false

Dialplan: sofia/internal/20001 at 10.3.3.10 Regex (PASS) [enum]
${module_exists(mod_enum)}(true) =~ /true/ break=on-false

Dialplan: sofia/internal/20001 at 10.3.3.10 Regex (PASS) [enum]
destination_number($1) =~ /^(.*)$/ break=on-false

Dialplan: sofia/internal/20001 at 10.3.3.10 Action transfer($1 enum)

 

I was expecting 

"Dialplan: sofia/internal/20001 at 10.3.3.10 Regex (FAIL) [Local_Call]
destination_number($1) =~ /^(10\d\d\d)$/ break=on-false"

to match the dialed number for which it would route the call to 10001.  By
the way 10001, 10002 and 20001, 20002 have sucessfully registered with

their respective servers and can place calls internally to the switch.  Also
when I run tcpdump on Server "B" I'm getting 404 Not Found, which indicates

either the endpoint is not registered or properly configured.  

 

Mike

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


More information about the FreeSWITCH-users mailing list