[Freeswitch-users] Gateway registration fails: IP used for realm in place of configured realm value

Robert Wilczyński r.wilczynski at gmail.com
Thu Oct 29 02:46:06 PDT 2009


Hi,

We have two FS instances production (prod) and gateway (gw)

when prod starts it tries to register a gateway:

<include>
    <gateway name="fs_gateway">
        <param name="realm" value="24ccdomain"/>
        <param name="proxy" value="$${local_ip_v4}:15060" />
        <param name="username" value="24cc"/>
        <param name="password" value="24ccpass"/>
        <param name="expire-seconds" value="60"/>
        <param name="register" value="true"/>
    </gateway>
</include>

and fails:

2009-10-29 10:19:45.449220 [NOTICE] sofia_glue.c:3534 Reload XML [Success]
2009-10-29 10:19:45.450221 [INFO] mod_enum.c:808 ENUM Reloaded
2009-10-29 10:19:45.450221 [NOTICE] sofia_reg.c:2117 Added gateway
'fs_gateway' to profile 'external'
2009-10-29 10:19:45.450221 [NOTICE] sofia.c:3093 Adding Alias
[outbound] for profile [external]
2009-10-29 10:19:45.450221 [NOTICE] sofia.c:3093 Adding Alias [nat]
for profile [external]
2009-10-29 10:19:45.451221 [NOTICE] sofia.c:3108 Started Profile
external [sofia_reg_external]
2009-10-29 10:19:45.452221 [INFO] switch_time.c:661 Timezone reloaded
530 definitions
2009-10-29 10:19:45.628743 [NOTICE] sofia_reg.c:333 Registering fs_gateway
2009-10-29 10:19:45.996790 [NOTICE] sofia.c:1202 Waiting for worker thread
2009-10-29 10:19:45.998790 [NOTICE] sofia.c:1729 Adding Alias
[192.168.1.20] for profile [internal]
2009-10-29 10:19:45.998790 [NOTICE] sofia.c:3093 Adding Alias
[default] for profile [internal]
2009-10-29 10:19:45.998790 [NOTICE] sofia.c:3108 Started Profile
internal [sofia_reg_internal]
2009-10-29 10:19:53.354724 [ERR] sofia_reg.c:1425 fs_gateway
Registration Failed with status Forbidden [403]. failure #1
2009-10-29 10:19:53.440735 [WARNING] sofia_reg.c:364 fs_gateway Failed
Registration, setting retry to 60 seconds.
2009-10-29 10:20:53.108812 [NOTICE] sofia_reg.c:333 Registering fs_gateway
2009-10-29 10:20:53.116813 [ERR] sofia_reg.c:1425 fs_gateway
Registration Failed with status Forbidden [403]. failure #2
2009-10-29 10:20:53.208825 [WARNING] sofia_reg.c:364 fs_gateway Failed
Registration, setting retry to 90 seconds.

gw is configured like that:

<include>
    <domain name="24ccdomain">
        <params>
            <param name="dial-string"
value="{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"/>
        </params>

        <groups>
            <group name="default">
                <users>
                    <user id="24cc">
                        <params>
                            <param name="password" value="24ccpass"/>
                        </params>
                        <variables>
                            <variable name="user_context" value="default"/>
                            <variable name="effective_caller_id_name"
value="24 CallCenter"/>
                        </variables>
                    </user>
                </users>
            </group>
        </groups>
    </domain>
</include>

and outputs:

2009-10-29 10:11:29.165700 [WARNING] sofia_reg.c:1737 Can't find user
[24cc at 192.168.1.20]
You must define a domain called '192.168.1.20' in your directory and
add a user with the id="24cc" attribute
and you must configure your device to use the proper domain in it's
authentication credentials.

on each registration attempt from prod.

This worked perfectly fine with one of previous revisions but started
failing on 15257. Using siptrace we were able to narrow down the issue
to prod sending an IP address as realm instead of gateway configured
realm (as it did in previous revision):

Authorization: Digest username="24cc", realm="192.168.1.20",
nonce="4d82d624-c884-6340-8f7f-a4575f2583bd",
cnonce="Es23bj8MEi29T7UQ80i7sw", algorithm=MD5,
uri="sip:192.168.1.20:15060",
response="afea161876aad137657bf1f923d18659", qop=auth, nc=00000004

Is there any configuration setting we are missing that would bring
back previous behavior?

--
Best regards,
Robert Wilczynski




More information about the FreeSWITCH-users mailing list