[Asterisk-Dev] Outbound proxy: Asterisk not using fromdomain when REGISTERing

Michael Lunsford michael.lunsford at cbeyond.net
Wed Aug 10 15:24:14 MST 2005


We are running a Broadsoft system offering SIP services to small /
medium size businesses and are having issues with the Asterisk
registration process. We need the Asterisk to be able to send the
REGISTER messages to an "outbound proxy" instead of the address returned
by the customer's domain (more below).

To implement the outbound proxy, we configure the "fromdomain" of the
sip peer to be the customer's host domain and we configure the "host" to
be our App Servers. For example:

[customer3.lab1.cbeyond.net]
type=peer
host=sipconnect.lab1.cbeyond.net   <-- outbound proxy
username=6783972034
secret=slk3adk2
fromdomain=customer3.lab1.cbeyond.net  <-- customer's domain
canreinvite=no
context=sip-internal

We expect the message to be sent to sipconnect.lab1.cbeyond.net (via
SRV) but with customer3.lab1.cbeyond.net to be used as the host for all
URIs in the SIP message (Request URI, From URI, and To URI). Like I
said, this works for INVITE but not for REGISTER.

This is the message that is sent:

Session Initiation Protocol
    Request line: REGISTER sip:customer3.lab1.cbeyond.net SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 90.1.1.203:5060;branch=z9hG4bK6aa0971b
        From:
<sip:6783972034 at sipconnect.lab1.cbeyond.net>;tag=as37928848
                              ^^^^^^^^^^
        To: <sip:6783972034 at sipconnect.lab1.cbeyond.net>
                            ^^^^^^^^^^
        Call-ID:
461bb6ab2ef04be2145ea5fb66b62276 at customer3.lab1.cbeyond.net
        CSeq: 102 REGISTER
        User-Agent: Asterisk PBX
        Expires: 3600
        Contact: <sip:6783972034 at 90.1.1.203>
        Event: registration
        Content-Length: 0

The message should read:

Session Initiation Protocol
    Request line: REGISTER sip:customer3.lab1.cbeyond.net SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 90.1.1.203:5060;branch=z9hG4bK6aa0971b
        From: <sip:6783972034 at customer3.lab1.cbeyond.net>;tag=as37928848
                              ^^^^^^^^^
        To: <sip:6783972034 at customer3.lab1.cbeyond.net>
                            ^^^^^^^^^
        Call-ID:
461bb6ab2ef04be2145ea5fb66b62276 at customer3.lab1.cbeyond.net
        CSeq: 102 REGISTER
        User-Agent: Asterisk PBX
        Expires: 3600
        Contact: <sip:6783972034 at 90.1.1.203>
        Event: registration
        Content-Length: 0

Reason for Outbound Proxy model:
The customer's "host" domain for SIP services will resolve to a gateway
to the Internet that will allow SIP connectivity to our customers from
the Internet. This will not necessarily be our App Servers. However, we
want our customer's to register directly to our App Servers. An outbound
proxy will meet these requirements and we successfully do this today for
INVITEs but it does not work for REGISTERs.

Is this a bug?

Thanks,
Michael




More information about the asterisk-dev mailing list