Wrong Request-URI Host in outbound INVITE

Hi guys,

I’m setting up (for a 2nd time) my asteriskNow server. I have a few SIP phones with a single trunk to my SIP Provider. The first time around, a few months back, it all worked out fine.

This time, my inbound calls are fine, but I can’t generate outbound calls.

The problem I see is that my outbound calls INVITE Request-URI Host has my own IP address ( instead of my Provider’s (

INVITE sip:6478691125@ SIP/2.0
So when my INVITE reaches the Provider, they route the invite right back to me, instead of connecting my call.

No. Time Source Destination Protocol Info 4 *REF* SIP/SDP Request: INVITE sip:6478691125@, with session description 5 0.065184 SIP Status: 100 Giving a try 6 0.069175 SIP/SDP Request: INVITE sip:6478691125@, with session description 7 0.069356 SIP Status: 100 Trying 8 0.070812 SIP Request: CANCEL sip:6478691125@ 9 0.141846 SIP Request: CANCEL sip:6478691125@ 10 0.141987 SIP Status: 487 Request Terminated 11 0.142039 SIP Status: 200 OK 12 0.142573 SIP Status: 200 canceling 13 1.141913 SIP Status: 487 Request Terminated

The rest of the SIP packet looks just right. The message header To: section is correct and has my Provider’s IP:

To: <sip:6478691125@> SIP to address: sip:6478691125@ SIP to address User Part: 6478691125 SIP to address Host Part:

Why would the Request-URI differ from the To: header? What I’m I configuring wrong or not configuring?
Its a pretty basic installation.

All I have for my trunk config is (which worked the first time):

disallow=all allow=ulaw dtmfmode=rfc2833 fromdomain=vp.thinktel.ca host= insecure=invite,port type=friend nat=yes

The full text of the an initial INVITE decoded packet follows:

No.     Time        Source                Destination           Protocol Info
     13 6.307536         SIP/SDP  Request: INVITE sip:6478691125@, with session description

Frame 13 (828 bytes on wire, 828 bytes captured)
    Arrival Time: Oct 30, 2010 14:53:42.786416000
    [Time delta from previous captured frame: 1.869409000 seconds]
    [Time delta from previous displayed frame: 2.873301000 seconds]
    [Time since reference or first frame: 6.307536000 seconds]
    Frame Number: 13
    Frame Length: 828 bytes
    Capture Length: 828 bytes
    [Frame is marked: False]
    [Protocols in frame: sll:ip:udp:sip:sdp]
    [Coloring Rule Name: UDP]
    [Coloring Rule String: udp]
Linux cooked capture
    Packet type: Sent by us (4)
    Link-layer address type: 512
    Link-layer address length: 0
    Source: <MISSING>
    Protocol: IP (0x0800)
Internet Protocol, Src: (, Dst: (
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0x60 (DSCP 0x18: Class Selector 3; ECN: 0x00)
        0110 00.. = Differentiated Services Codepoint: Class Selector 3 (0x18)
        .... ..0. = ECN-Capable Transport (ECT): 0
        .... ...0 = ECN-CE: 0
    Total Length: 812
    Identification: 0x3ac0 (15040)
    Flags: 0x00
        0.. = Reserved bit: Not Set
        .0. = Don't fragment: Not Set
        ..0 = More fragments: Not Set
    Fragment offset: 0
    Time to live: 64
    Protocol: UDP (0x11)
    Header checksum: 0x1bb1 [correct]
        [Good: True]
        [Bad : False]
    Source: (
    Destination: (
User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
    Source port: sip (5060)
    Destination port: sip (5060)
    Length: 792
    Checksum: 0x35e9 [validation disabled]
        [Good Checksum: False]
        [Bad Checksum: False]
Session Initiation Protocol
    Request-Line: INVITE sip:6478691125@ SIP/2.0
        Method: INVITE
        Request-URI: sip:6478691125@
            Request-URI User Part: 6478691125
            Request-URI Host Part:
            Request-URI Host Port: 5060
        [Resent Packet: False]
    Message Header
        Via: SIP/2.0/UDP;branch=z9hG4bK11cac908;rport
            Transport: UDP
            Sent-by Address:
            Sent-by port: 5060
            Branch: z9hG4bK11cac908
            RPort: rport
        From: "6473172818" <sip:6473172818@vp.thinktel.ca>;tag=as76a0018a
            SIP Display info: "6473172818" 
            SIP from address: sip:6473172818@vp.thinktel.ca
                SIP from address User Part: 6473172818
                SIP from address Host Part: vp.thinktel.ca
            SIP tag: as76a0018a
        To: <sip:6478691125@>
            SIP to address: sip:6478691125@
                SIP to address User Part: 6478691125
                SIP to address Host Part:
        Contact: <sip:6473172818@>
            Contact Binding: <sip:6473172818@>
                URI: <sip:6473172818@>
                    SIP contact address: sip:6473172818@
        Call-ID: 0230a1f07327c4323b4e96dc630a6f3f@vp.thinktel.ca
        CSeq: 102 INVITE
            Sequence Number: 102
            Method: INVITE
        User-Agent: Asterisk PBX
        Max-Forwards: 70
        Date: Sat, 30 Oct 2010 18:53:42 GMT
        Supported: replaces
        Content-Type: application/sdp
        Content-Length: 215
    Message Body
        Session Description Protocol
            Session Description Protocol Version (v): 0
            Owner/Creator, Session Id (o): root 5212 5212 IN IP4
                Owner Username: root
                Session ID: 5212
                Session Version: 5212
                Owner Network Type: IN
                Owner Address Type: IP4
                Owner Address:
            Session Name (s): session
            Connection Information (c): IN IP4
                Connection Network Type: IN
                Connection Address Type: IP4
                Connection Address:
            Time Description, active time (t): 0 0
                Session Start Time: 0
                Session Stop Time: 0
            Media Description, name and address (m): audio 16720 RTP/AVP 0 101
                Media Type: audio
                Media Port: 16720
                Media Protocol: RTP/AVP
                Media Format: ITU-T G.711 PCMU
                Media Format: DynamicRTP-Type-101
            Media Attribute (a): rtpmap:0 PCMU/8000
                Media Attribute Fieldname: rtpmap
                Media Format: 0
                MIME Type: PCMU
                Sample Rate: 8000
            Media Attribute (a): rtpmap:101 telephone-event/8000
                Media Attribute Fieldname: rtpmap
                Media Format: 101
                MIME Type: telephone-event
                Sample Rate: 8000
            Media Attribute (a): fmtp:101 0-16
                Media Attribute Fieldname: fmtp
                Media Format: 101 [telephone-event]
                Media format specific parameters: 0-16
            Media Attribute (a): ptime:20
                Media Attribute Fieldname: ptime
                Media Attribute Value: 20
            Media Attribute (a): sendrecv

note: My own IP and telephone numbers have been changed for privacy reasons.
edit: I’m using asteriskNow 1.7.1-2: Asterisk 1.4.36-1 and freepbx 2.7.0-7 CentOS 5.5

Your help is appreciated.