Hello world,

I have two freeswitch servers that I want to interconnect. Each one of them has their own sip domain and we want to enable sip communications between them. All the PC can ping together.

Client #1 ------- Freeswitch #1 --(gateway)--- Freeswitch #2 ------ Client# 2.

We have configured a sip gateway on Freeswitch #1 server with the configuration below:

  C:\Program Files\FreeSWITCH\conf\sip_profiles\external\gw.xml

  <include>
  <gateway name="gw">                                              
  <param name="username" value="3000"/>
  <param name="realm" value="192.168.2.10"/>
  <param name="from-domain" value="192.168.2.10"/>
  <param name="password" value="2009"/>
  <param name="expire-seconds" value="3600"/>
  <param name="register-transport" value="udp"/>
  <param name="retry-seconds" value="30"/>
  <param name="ping" value="25"/>
  </gateway>
</include>

  C:\Program Files\FreeSWITCH\conf\dialplan\default\01_example.com.xml

  <include>

  <extension name="gw">
  <!--<condition field="${toll_allow}" expression="gw"/>  -->
  <condition field="destination_number" expression="^(30[0-2][0-9])$">
    <action application="bridge" data="sofia/gateway/gw/[email protected]"/[1]>
  </condition>
</extension>

  </include>

  In the Freeswitch #2 server, we have configured the 3000 extension:

  C:\Program Files\FreeSWITCH\conf\directory\default\3000.xml

  <include>
  <user id="3000" mailbox="3000">
    <params>
      <param name="password" value="1234"/>
      <param name="vm-password" value="1000"/>
    </params>
    <variables>
      <variable name="toll_allow" value="domestic,international,local"/>
      <variable name="accountcode" value="3000"/>
      <variable name="user_context" value="default"/>
      <variable name="effective_caller_id_name" value="Extension 3000"/>
      <variable name="effective_caller_id_number" value="3000"/>
      <variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>       <variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
      <variable name="callgroup" value="techsupport"/>
    </variables>
  </user>
</include>

  We have our gateway working.

  >>sofia status gateway gw

  But we can't do a call between client#1 and client#2.

=================================================================================================
Name            gw
Scheme          Digest
Realm           10.0.2.10
Username        3000
Password        yes
From            <sip:[email protected];transport=udp>
Contact         <sip:[email protected]:5080;transport=udp>
Exten           3000
To              sip:[email protected]
Proxy           sip:192.168.2.10
Context         public
Expires         3600
Freq            3600
Ping            1248881849
PingFreq        25
State           REGED
Status          UP
CallsIN         0
CallsOUT        19
=================================================================================================

  We have the following debug when we make a call.

2009-07-29 17:19:52 [DEBUG] sofia_glue.c:2566 sofia_glue_negotiate_sdp() Set 2833 dtmf payload to 101

2009-07-29 17:19:52 [DEBUG] sofia.c:2962 sofia_handle_sip_i_state() (sofia/internal/[email protected]) State Change CS_NEW -> CS_INIT

2009-07-29 17:19:52 [DEBUG] switch_core_session.c:868 switch_core_session_signal_state_change() Send signal sofia/internal/[email protected] [BREAK]

2009-07-29 17:19:52 [DEBUG] switch_core_state_machine.c:390 switch_core_session_run() (sofia/internal/[email protected]) Running State Change CS_INIT

2009-07-29 17:19:52 [DEBUG] switch_core_state_machine.c:469 switch_core_session_run() (sofia/internal/[email protected]) State INIT

2009-07-29 17:19:52 [DEBUG] mod_sofia.c:83 sofia_on_init() sofia/internal/[email protected] SOFIA INIT

2009-07-29 17:19:52 [DEBUG] mod_sofia.c:111 sofia_on_init() (sofia/internal/[email protected]) State Change CS_INIT -> CS_ROUTING

2009-07-29 17:19:52 [DEBUG] switch_core_session.c:868 switch_core_session_signal_state_change() Send signal sofia/internal/[email protected] [BREAK]

2009-07-29 17:19:52 [DEBUG] switch_core_state_machine.c:469 switch_core_session_run() (sofia/internal/[email protected]) State INIT going to sleep

2009-07-29 17:19:52 [DEBUG] switch_core_state_machine.c:390 switch_core_session_run() (sofia/internal/[email protected]) Running State Change CS_ROUTING

2009-07-29 17:19:52 [DEBUG] switch_core_state_machine.c:472 switch_core_session_run() (sofia/internal/[email protected]) State ROUTING

2009-07-29 17:19:52 [DEBUG] mod_sofia.c:130 sofia_on_routing() sofia/internal/[email protected] SOFIA ROUTING

2009-07-29 17:19:52 [DEBUG] switch_core_state_machine.c:71 switch_core_standard_on_routing() sofia/internal/[email protected] Standard ROUTING

2009-07-29 17:19:52 [INFO] mod_dialplan_xml.c:252 dialplan_hunt() Processing Chewaka (test)->3021 in context default

Dialplan: sofia/internal/[email protected] parsing [default->unloop] continue=false

Dialplan: sofia/internal/[email protected] Regex (PASS) [unloop] ${unroll_loops}(true) =~ /^true$/ break=on-false

Dialplan: sofia/internal/[email protected] Regex (FAIL) [unloop] ${sip_looped_call}() =~ /^true$/ break=on-false

Dialplan: sofia/internal/[email protected] parsing [default->global] continue=true

Dialplan: sofia/internal/[email protected] Regex (FAIL) [global] ${network_addr}(10.3.1.12) =~ /^$/ break=never

Dialplan: sofia/internal/[email protected] ANTI-Action set(use_profile=${cond(${acl(${network_addr} rfc1918)} == true ? nat : default)})

Dialplan: sofia/internal/[email protected] Regex (PASS) [global] ${numbering_plan}() =~ /^$/ break=never

Dialplan: sofia/internal/[email protected] Action set_user(defa...@${domain_name})

Dialplan: sofia/internal/[email protected] Regex (FAIL) [global] ${call_debug}(false) =~ /^true$/ break=never

Dialplan: sofia/internal/[email protected] Regex (FAIL) [global] ${sip_has_crypto}() =~ /^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$/ break=never

  Dialplan: sofia/internal/[email protected] Absolute Condition [global]

Dialplan: sofia/internal/[email protected] Action db(insert/${domain_name}-spymap/${caller_id_number}/${uuid})

Dialplan: sofia/internal/[email protected] Action db(insert/${domain_name}-last_dial/${caller_id_number}/${destination_number})

Dialplan: sofia/internal/[email protected] Action db(insert/${domain_name}-last_dial/global/${uuid})

Dialplan: sofia/internal/[email protected] parsing [default->Local_Extension] continue=false

Dialplan: sofia/internal/[email protected] Regex (FAIL) [Local_Extension] destination_number(3021) =~ /^(130[0-8] && 131[0-9])$/ break=on-false

Dialplan: sofia/internal/[email protected] parsing [default->IFAU_global_demonstrator_Conference_Room] continue=false

Dialplan: sofia/internal/[email protected] Regex (FAIL) [IFAU_global_demonstrator_Conference_Room] destination_number(3021) =~ /^1309$/ break=on-false

Dialplan: sofia/internal/[email protected] parsing [default->gw] continue=false

Dialplan: sofia/internal/[email protected] Regex (PASS) [gw] destination_number(3021) =~ /^(30[0-2][0-9])$/ break=on-false

Dialplan: sofia/internal/[email protected] Action bridge(sofia/gateway/gw/[email protected])

2009-07-29 17:19:52 [DEBUG] switch_core_state_machine.c:107 switch_core_standard_on_routing() (sofia/internal/[email protected]) State Change CS_ROUTING -> CS_EXEC

  UTE

2009-07-29 17:19:52 [DEBUG] switch_core_session.c:868 switch_core_session_signal_state_change() Send signal sofia/internal/[email protected] [BREAK]

2009-07-29 17:19:52 [DEBUG] switch_core_state_machine.c:472 switch_core_session_run() (sofia/internal/[email protected]) State ROUTING going to sleep

2009-07-29 17:19:52 [DEBUG] switch_core_state_machine.c:390 switch_core_session_run() (sofia/internal/[email protected]) Running State Change CS_EXECUTE

2009-07-29 17:19:52 [DEBUG] switch_core_state_machine.c:479 switch_core_session_run() (sofia/internal/[email protected]) State EXECUTE

2009-07-29 17:19:52 [DEBUG] mod_sofia.c:173 sofia_on_execute() sofia/internal/[email protected] SOFIA EXECUTE

2009-07-29 17:19:52 [DEBUG] switch_core_state_machine.c:144 switch_core_standard_on_execute() sofia/internal/[email protected] Standard EXECUTE

  EXECUTE sofia/internal/[email protected] set(use_profile=default)

2009-07-29 17:19:52 [DEBUG] mod_dptools.c:747 set_function() sofia/internal/[email protected] SET [use_profile]=[default]

  EXECUTE sofia/internal/[email protected] set_user([email protected])

2009-07-29 17:19:52 [WARNING] switch_ivr.c:2042 switch_ivr_set_user() can't find user [[email protected]]

EXECUTE sofia/internal/[email protected] db(insert/192.168.1.10-spymap/1311/d851bbd1-c09c-474b-b1df-d433420b132b)

EXECUTE sofia/internal/[email protected] db(insert/192.168.1.10-last_dial/1311/3021)

EXECUTE sofia/internal/[email protected] db(insert/192.168.1.10-last_dial/global/d851bbd1-c09c-474b-b1df-d433420b132b)

EXECUTE sofia/internal/[email protected] bridge(sofia/gateway/gw/[email protected])

2009-07-29 17:19:52 [NOTICE] switch_channel.c:592 switch_channel_set_name() New Channel sofia/external/[email protected] [35a85e69-d109-134f-81d3-1d21016f43e5]

2009-07-29 17:19:52 [DEBUG] mod_sofia.c:2567 sofia_outgoing_channel() (sofia/external/[email protected]) State Change CS_NEW -> CS_INIT

2009-07-29 17:19:52 [DEBUG] switch_core_session.c:868 switch_core_session_signal_state_change() Send signal sofia/external/[email protected] [BREAK]

2009-07-29 17:19:52 [DEBUG] switch_core_state_machine.c:390 switch_core_session_run() (sofia/external/[email protected]) Running State Change CS_INIT

2009-07-29 17:19:52 [DEBUG] switch_core_state_machine.c:469 switch_core_session_run() (sofia/external/[email protected]) State INIT

2009-07-29 17:19:52 [DEBUG] mod_sofia.c:83 sofia_on_init() sofia/external/[email protected] SOFIA INIT

2009-07-29 17:20:18 [ERR] sofia_glue.c:568 sofia_glue_ext_address_lookup() STUN Failed! stun.freeswitch.org:3478 [Timeout]

2009-07-29 17:20:18 [NOTICE] mod_sofia.c:103 sofia_on_init() Hangup sofia/external/[email protected] [CS_INIT] [DESTINATION_OUT_OF_ORDER]

2009-07-29 17:20:18 [DEBUG] switch_channel.c:1612 switch_channel_perform_hangup() Send signal sofia/external/[email protected] [KILL]

2009-07-29 17:20:18 [DEBUG] switch_core_session.c:868 switch_core_session_signal_state_change() Send signal sofia/external/[email protected] [BREAK]

With Wireshark, we have seen two sip error frame : "407 Proxy authentication required" and "502 bad gateway".

  What I must do to make calls between the two sip domains ?

  Best regards.

  G.C.

Liens:
------
[1] mailto:sofia/gateway/gw/[email protected]

_______________________________________________
FreeSWITCH-users mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Reply via email to