[Freeswitch-users] Proxy authorization

Dmitry Bely dmitry.bely at gmail.com
Fri Sep 4 14:33:22 PDT 2009


On Sat, Sep 5, 2009 at 1:08 AM, Brian West<brian at freeswitch.org> wrote:
> show me your XML for the gateway please.
> /b

It's fairly standard:

<!--
    Shell provider account should work with most providers.

-->
<include>
  <user id="$${default_provider}">
    <gateways>
      <gateway name="$${default_provider}">
        <param name="username" value="$${default_provider_username}"/>
        <param name="password" value="$${default_provider_password}"/>
        <param name="from-user" value="$${default_provider_username}"/>
        <param name="from-domain" value="$${default_provider_from_domain}"/>
        <param name="realm" value="$${default_provider_from_domain}"/>
        <param name="proxy" value="$${default_provider}"/>
        <param name="expire-seconds" value="600"/>
        <param name="register" value="$${default_provider_register}"/>
        <param name="retry-seconds" value="30"/>
        <param name="extension" value="$${default_provider_contact}"/>
        <!--<param name="contact-params" value="domain_name=$${domain}"/>-->
        <param name="context" value="public"/>
      </gateway>
    </gateways>
    <params>
      <param name="password" value="$${default_provider_password}"/>
    </params>
  </user>
</include>

default_provider_register is set to true.

In the meantime I looked into the sources. If I understand them right,
proxy address is always used in REGISTER header:

sofia.c, line 1471
                        gateway->register_url =
switch_core_sprintf(gateway->pool, "sip:%s", proxy);

Probably it's incorrect as RFC 3261 says:

Request-URI: The Request-URI names the domain of the location
           service for which the registration is meant (for example,
           "sip:chicago.com").  The "userinfo" and "@" components of the
           SIP URI MUST NOT be present.

So the domain name (from-domain?) should be used there, not the proxy address.

> On Sep 4, 2009, at 3:43 PM, Dmitry Bely wrote:
>
> I'm started to suspect another thing.. Successful register (SIP phone)
> contains
>
> REGISTER sip:Domain SIP/2.0
>
> while unsuccessful one is
>
> REGISTER sip:1.2.3.4 SIP/2.0
>
> What parameter is responsible for Request-URI? Note that I need both
> IP address for proxy and symbolic name for SIP domain  (which is not
> mapped the resolvable DNS name).

- Dmitry Bely




More information about the FreeSWITCH-users mailing list