IP-Adresse für Gateway-Verbindung ändern

575 views
Skip to first unread message

Jonas Metternich

unread,
Feb 15, 2013, 3:58:09 AM2/15/13
to gs5-...@googlegroups.com
Hallo allerseits,

nach den ersten internen Tests wollen wir unsere GS5-Installation (GS5.1beta2) jetzt an unser SIP-Gateway (Antilo) anbinden. Die Gemeinschaft-VM hat dafür zwei Netzwerk-Interfaces, eins zum LAN und eins zu Antilo. Leider verbindet sich FreeSWITCH mit der LAN-IP zum Gateway, was dazu führt, dass keine Antworten zurückkommen.

Es scheint, dass dafür die Settings ext-rtp-ip bzw. ext-sip-ip gesetzt werden müssen (http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files#ext-rtp-ip). Wenn ich diese in Gemeinschaft als Gateway-Parameter einfüge, nutzt FreeSwitch jedoch weiterhin die LAN-IP für die Verbindung - auch nach einem Restart.

Mache ich etwas falsch? Hat jemand eine Idee, woran es liegen könnte?

Vielen Dank und freundliche Grüße,

  Jonas Metternich

Jonas Metternich

unread,
Feb 24, 2013, 5:09:41 AM2/24/13
to gs5-...@googlegroups.com
Bin leider bisher nicht weitergekommen, würde mich sehr über Hinweise freuen! Hier die Log-Ausgabe nach Löschen des Gateways und "sofia profile gemeinschaft rescan":

2013-02-24 10:48:52.188930 [DEBUG] switch_cpp.cpp:1274 #C# [sofia.conf] SOFIA_PROFILE 1 - name: gemeinschaft, domain: 192.168.68.2,  sip_bind: 192.168.68.2:5060
2013-02-24 10:48:52.188930 [DEBUG] switch_cpp.cpp:1274 #C# [sofia.conf] SIP_GATEWAY - name: Antilo
2013-02-24 10:48:52.188930 [DEBUG] freeswitch_lua.cpp:370 DBH handle (nil) released.
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 ext-sip-ip [auto-nat]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 manage-presence [true]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 force-register-domain [192.168.68.2]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 rtp-hold-timeout-sec [1800]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 outbound-codec-prefs [PCMA,G7221@32000h,G7221@16000h,G722,PCMU,GSM]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 manual-redirect [true]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 tls-cert-dir [/opt/freeswitch/conf/ssl]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 auth-all-packets [false]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 dialplan [XML]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 pass-rfc2833 [true]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 debug [0]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 rtp-ip [192.168.68.2]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 tls-sip-port [5061]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 challenge-realm [auto_from]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 auth-calls [false]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 accept-blind-reg [false]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 sip-expires-max-deviation [600]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 disable-transcoding [false]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 sip-ip [192.168.68.2]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 registration-thread-frequency [300]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 tls [false]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 force-register-db-domain [192.168.68.2]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 user-agent-string [Gemeinschaft5]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 inbound-reg-force-matching-username [true]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 odbc-dsn [gemeinschaft:gemeinschaft:AjcuaxxxxxxxxxxxxdikhyafEbEk9]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 NDLB-force-rport [false]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 outbound-use-callid-as-uuid [false]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 mark-dead-on-options-fail [true]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 rtp-timeout-sec [300]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 inbound-use-callid-as-uuid [false]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 record-template [${user_name}_${uuid}_${strftime(%Y-%m-%d-%H-%M-%S)}.wav]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 disable-transfer [false]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 nonce-ttl [60]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 context [default]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 rfc2833-pt [101]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 dtmf-duration [2000]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 force-subscription-expires [3600]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 ext-rtp-ip [auto-nat]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 rtp-timer-name [soft]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 log-auth-failures [false]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 hold-music [local_stream://moh]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 sip-port [5060]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 sip-force-expires [3000]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 inbound-codec-prefs [PCMA,G7221@32000h,G7221@16000h,G722,PCMU,GSM]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 sip-trace [no]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 all-reg-options-ping [true]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 disable-register [false]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 rtp-rewrite-timestamps [true]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 accept-blind-auth [false]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 force-subscription-domain [192.168.68.2]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 inbound-codec-negotiation [greedy]
2013-02-24 10:48:52.188930 [NOTICE] sofia_reg.c:3004 Added gateway 'gateway1' to profile 'gemeinschaft'

Meines Erachtens sind diese zwei Zeilen das Problem:

2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 rtp-ip [192.168.68.2]
2013-02-24 10:48:52.188930 [DEBUG] sofia.c:3581 sip-ip [192.168.68.2]

Hier sollte die externe IP-Adressen stehen, nicht die interne. Bei den Gateway-Parametern habe ich folgendes gesetzt:

Name: rtp-ip
Value: 172.254.x.x
Type: String

Name: sip-ip
Value: 172.254.x.x
Type: String

Vielen Dank im voraus,

   Jonas Metternich

Peter Kozak

unread,
Feb 24, 2013, 8:18:12 AM2/24/13
to gs5-...@googlegroups.com
On 02/24/2013 11:09 AM, Jonas Metternich wrote:
> Hier sollte die externe IP-Adressen stehen, nicht die interne. Bei den
> Gateway-Parametern habe ich folgendes gesetzt:
>
> Name: rtp-ip
> Value: 172.254.x.x
> Type: String
>
> Name: sip-ip
> Value: 172.254.x.x
> Type: String


Du kannst rtp-ip und sip-ip nicht einzelnen Gateways zuordnen. Man kann
aber ein neues Profil erzeugen mit den obigen Parametern und dort die
Gateways anbinden.

Also in gs_parameters folgende zwei Zeilen einfuegen (geht nur per MySQL
oder Rails-Konsole):

Entity | Section | Name | Value
sofia profile:antilo rtp-ip 172.254.x.x
sofia profile:antilo sip-ip 172.254.x.x


Und Gateway-Settings des entsprechenden Gateways dann das Profil auswaehlen:

Name | Value
profile antilo



Mit freundlichen Gr��en

Peter Kozak

--

AMOOMA GmbH - Bachstr. 124 - 56566 Neuwied --> http://www.amooma.de
Gesch�ftsf�hrer: Stefan Wintermeyer, Handelsregister Montabaur B14998

B�cher: http://das-asterisk-buch.de - http://ruby-auf-schienen.de

Jonas Metternich

unread,
Mar 6, 2013, 5:26:23 PM3/6/13
to gs5-...@googlegroups.com


Am Sonntag, 24. Februar 2013 14:18:12 UTC+1 schrieb Peter Kozak:
Also in gs_parameters folgende zwei Zeilen einfuegen (geht nur per MySQL
oder Rails-Konsole):

Entity | Section       | Name   | Value
sofia         profile:antilo  rtp-ip         172.254.x.x
sofia         profile:antilo  sip-ip         172.254.x.x


Und Gateway-Settings des entsprechenden Gateways dann das Profil auswaehlen:

Name    | Value
profile  antilo

Top, das war's! Vielen Dank. Ich musste allerdings in der Tabelle gs_parameters noch das Profil selbst hinzufügen:

Entity | Section       | Name   | Value 
sofia    profiles         antilo       2  (fortgezählt nach dem vorigen Wert für diese section)

Sobald wirklich alles funktioniert, werde ich das mal im Wiki verewigen müssen... ist doch relativ viel Gebastel.

Schöne Grüße,

Jonas

mar...@mihl-it.de

unread,
May 10, 2013, 5:53:57 PM5/10/13
to gs5-...@googlegroups.com
Hallo zusammen,

der letzte Eintrag zu diesem Problem ist eine Weile her. Ich stehe vor dem gleichen Problem. Ich habe eine Gemeinschaft 5.1.2 mit einem internen Interface 10.49.8.246 und einem externen Interface mit öffentlicher IP-Adresse 31.xx.xx.xx. Ankommende Anrufe werden entgegengenommen.Abgehende Anrufe laufen über das interne Interface zum Standard-Gateway des Netzes 10.49.8.0/24 und dann zum Router, welcher aber eine andere öffentliche Adresse hat. Mein SIP-Provider "authentifiziert" auf Grund der öffentlichen, festen IP-Adresse. Kein Username, kein Passwort.
Ein neues Profil habe ich entsprechend der Anleitung angelegt und in den Gateway Einstellungen bekannt gemacht.
Entity      | Section         | Name         | Value
sofia         profile:DeuTelAG  rtp-ip         31.xx.xx.xx
sofia         profile:DeuTelAG  sip-ip         31.xx.xx.xx

Entity | Section        | Name     | Value 
sofia    profiles         DeuTelAG   2                  (ist bei mir auch die 2)

Name: profile
Value: DeuTelAG


@Jonas: Konntest Du das Wiki vervollständigen? Wo finde ich das?

Nächtliche Grüße
MarIhl

Peter Kozak

unread,
May 11, 2013, 1:04:16 AM5/11/13
to gs5-...@googlegroups.com
On 05/10/2013 11:53 PM, mar...@mihl-it.de wrote:
> entgegengenommen.Abgehende Anrufe laufen �ber das interne Interface zum
> Standard-Gateway des Netzes 10.49.8.0/24 und dann zum Router, welcher
> aber eine andere �ffentliche Adresse hat. Mein SIP-Provider
> "authentifiziert" auf Grund der �ffentlichen, festen IP-Adresse. Kein
> Username, kein Passwort.

Der folgende Befehl auf der FS Konsole (fs_cli) sollte anzeigen, welche
Profile es gibt, wie deren Einstellungen tatsaechlich aussehen und
welche Gateways welchem Profil zugeordnet sind:

xml_locate configuration configuration name sofia.conf

mar...@mihl-it.de

unread,
May 13, 2013, 9:52:31 AM5/13/13
to gs5-...@googlegroups.com
Hallo zusammen,
hier die Ausgabe:

<configuration description="Sofia configuration" name="sofia.conf">
  <global_settings>
    <param name="debug-presence" value="0"></param>
    <param name="log-level" value="3"></param>
  </global_settings>
  <profiles>
    <profile name="gemeinschaft">
      <gateways>
        <gateway name="gateway9">
          <param name="username" value="gateway9"></param>
          <param name="extension" value="gateway9"></param>
          <param name="register" value="false"></param>
          <param name="extension-in-contact" value="true"></param>
          <param name="realm" value="10.49.8.253"></param>
        </gateway>
      </gateways>
      <domains>
        <domain alias="true" name="all" parse="false"></domain>
      </domains>
      <settings>
        <param name="ext-sip-ip" value="auto-nat"></param>
        <param name="rfc2833-pt" value="101"></param>
        <param name="force-register-domain" value="10.49.8.246"></param>
        <param name="rtp-hold-timeout-sec" value="1800"></param>
        <param name="outbound-codec-prefs" value="PCMA,G7221@32000h,G7221@16000h,G722,PCMU,GSM"></param>
        <param name="manual-redirect" value="true"></param>
        <param name="rtp-timeout-sec" value="300"></param>
        <param name="mark-dead-on-options-fail" value="true"></param>
        <param name="NDLB-force-rport" value="false"></param>
        <param name="pass-rfc2833" value="true"></param>
        <param name="debug" value="0"></param>
        <param name="rtp-ip" value="10.49.8.246"></param>
        <param name="tls-sip-port" value="5061"></param>
        <param name="challenge-realm" value="auto_from"></param>
        <param name="auth-calls" value="false"></param>
        <param name="odbc-dsn" value="gemeinschaft:gemeinschaft:HutLyevDoydHuefUgBylfyedithid5"></param>
        <param name="sip-expires-max-deviation" value="600"></param>
        <param name="disable-transcoding" value="false"></param>
        <param name="sip-ip" value="10.49.8.246"></param>
        <param name="registration-thread-frequency" value="300"></param>
        <param name="tls" value="false"></param>
        <param name="force-register-db-domain" value="10.49.8.246"></param>
        <param name="inbound-use-callid-as-uuid" value="false"></param>
        <param name="username" value="Gemeinschaft"></param>
        <param name="inbound-reg-force-matching-username" value="true"></param>
        <param name="inbound-codec-negotiation" value="greedy"></param>
        <param name="user-agent-string" value="Gemeinschaft5"></param>
        <param name="outbound-use-callid-as-uuid" value="false"></param>
        <param name="dialplan" value="XML"></param>
        <param name="auth-all-packets" value="false"></param>
        <param name="disable-register" value="false"></param>
        <param name="record-template" value="${user_name}_${uuid}_${strftime(%Y-%m-%d-%H-%M-%S)}.wav"></param>
        <param name="tls-cert-dir" value="/opt/freeswitch/conf/ssl"></param>
        <param name="nonce-ttl" value="60"></param>
        <param name="disable-transfer" value="false"></param>
        <param name="force-subscription-expires" value="3600"></param>
        <param name="dtmf-duration" value="2000"></param>
        <param name="manage-presence" value="true"></param>
        <param name="ext-rtp-ip" value="auto-nat"></param>
        <param name="rtp-timer-name" value="soft"></param>
        <param name="log-auth-failures" value="false"></param>
        <param name="hold-music" value="local_stream://moh"></param>
        <param name="sip-port" value="5060"></param>
        <param name="sip-force-expires" value="3000"></param>
        <param name="inbound-codec-prefs" value="PCMA,G7221@32000h,G7221@16000h,G722,PCMU,GSM"></param>
        <param name="sip-trace" value="no"></param>
        <param name="all-reg-options-ping" value="true"></param>
        <param name="context" value="default"></param>
        <param name="rtp-rewrite-timestamps" value="true"></param>
        <param name="accept-blind-auth" value="false"></param>
        <param name="force-subscription-domain" value="10.49.8.246"></param>
        <param name="accept-blind-reg" value="false"></param>
      </settings>
    </profile>
    <profile name="DeuTelAG">
      <gateways>
        <gateway name="gateway8">
          <param name="username" value="gateway8"></param>
          <param name="extension" value="gateway8"></param>
          <param name="register" value="false"></param>
          <param name="extension-in-contact" value="true"></param>
          <param name="realm" value="92.60.208.117"></param>
        </gateway>
      </gateways>
      <domains>
        <domain alias="true" name="all" parse="false"></domain>
      </domains>
      <settings>
        <param name="ext-sip-ip" value="auto-nat"></param>
        <param name="rfc2833-pt" value="101"></param>
        <param name="rtp-hold-timeout-sec" value="1800"></param>
        <param name="outbound-codec-prefs" value="PCMA,G7221@32000h,G7221@16000h,G722,PCMU,GSM"></param>
        <param name="manual-redirect" value="true"></param>
        <param name="rtp-timeout-sec" value="300"></param>
        <param name="mark-dead-on-options-fail" value="true"></param>
        <param name="NDLB-force-rport" value="false"></param>
        <param name="pass-rfc2833" value="true"></param>
        <param name="debug" value="0"></param>
        <param name="tls-sip-port" value="5061"></param>
        <param name="challenge-realm" value="auto_from"></param>
        <param name="auth-calls" value="false"></param>
        <param name="odbc-dsn" value="gemeinschaft:gemeinschaft:HutLyevDoydHuefUgBylfyedithid5"></param>
        <param name="sip-expires-max-deviation" value="600"></param>
        <param name="disable-transcoding" value="false"></param>
        <param name="registration-thread-frequency" value="300"></param>
        <param name="tls" value="false"></param>
        <param name="username" value="Gemeinschaft"></param>
        <param name="inbound-reg-force-matching-username" value="true"></param>
        <param name="inbound-codec-negotiation" value="greedy"></param>
        <param name="user-agent-string" value="Gemeinschaft5"></param>
        <param name="outbound-use-callid-as-uuid" value="false"></param>
        <param name="dialplan" value="XML"></param>
        <param name="auth-all-packets" value="false"></param>
        <param name="disable-register" value="false"></param>
        <param name="record-template" value="${user_name}_${uuid}_${strftime(%Y-%m-%d-%H-%M-%S)}.wav"></param>
        <param name="tls-cert-dir" value="/opt/freeswitch/conf/ssl"></param>
        <param name="nonce-ttl" value="60"></param>
        <param name="disable-transfer" value="false"></param>
        <param name="force-subscription-expires" value="3600"></param>
        <param name="dtmf-duration" value="2000"></param>
        <param name="manage-presence" value="true"></param>
        <param name="ext-rtp-ip" value="auto-nat"></param>
        <param name="rtp-timer-name" value="soft"></param>
        <param name="log-auth-failures" value="false"></param>
        <param name="hold-music" value="local_stream://moh"></param>
        <param name="sip-port" value="5060"></param>
        <param name="sip-force-expires" value="3000"></param>
        <param name="inbound-codec-prefs" value="PCMA,G7221@32000h,G7221@16000h,G722,PCMU,GSM"></param>
        <param name="sip-trace" value="no"></param>
        <param name="all-reg-options-ping" value="true"></param>
        <param name="context" value="default"></param>
        <param name="rtp-rewrite-timestamps" value="true"></param>
        <param name="accept-blind-auth" value="false"></param>
        <param name="inbound-use-callid-as-uuid" value="false"></param>
        <param name="accept-blind-reg" value="false"></param>
      </settings>
    </profile>
  </profiles>
</configuration>
2013-05-13 15:31:49.259515 [DEBUG] freeswitch_lua.cpp:352 DBH handle 0x8fd03c8 Connected.
2013-05-13 15:31:49.259515 [DEBUG] switch_cpp.cpp:1274 #C# [sofia.conf] SOFIA_PROFILE 1 - name: gemeinschaft, domain: 10.49.8.246,  sip_bind: 10.49.8.246:5060
2013-05-13 15:31:49.259515 [DEBUG] switch_cpp.cpp:1274 #C# [sofia.conf] SIP_GATEWAY - name: Berofix
2013-05-13 15:31:49.279525 [DEBUG] switch_cpp.cpp:1274 #C# [sofia.conf] SOFIA_PROFILE 2 - name: DeuTelAG - no domains
2013-05-13 15:31:49.279525 [DEBUG] switch_cpp.cpp:1274 #C# [sofia.conf] SIP_GATEWAY - name: DeuTelAG
2013-05-13 15:31:49.279525 [DEBUG] freeswitch_lua.cpp:370 DBH handle (nil) released.


Ziel ist nach wie vor das Profil DeuTelAG über die IP-Adresse des externen Interfaces (31.3.x.x) anzusprechen.

Vielen Dank
Grüße
MarIhl


mar...@mihl-it.de

unread,
May 15, 2013, 6:55:37 AM5/15/13
to gs5-...@googlegroups.com
Sorry, ich muss hier mal pushen.


Grüße
MarIhl

Reply all
Reply to author
Forward
0 new messages