3CX sends internal IP in Contact: Field / No ACK Response

Discussion in '3CX Phone System - General' started by startelecom, Mar 12, 2011.

Thread Status:
Not open for further replies.
  1. startelecom

    Joined:
    Mar 12, 2011
    Messages:
    17
    Likes Received:
    0
    Provider responds with ACK to 192.168.2.60:5095 which never makes it to the 3CX. Why isn't 3CX using the public (STUN detected) IP in the Contact field?

    Note: This is on inbound calls. So 8551234567 is my DID.

    X.Y.Z.A = Source IP
    X.Y.Z.b = Provider IP



    U 2011/03/12 15:05:20.459041 X.Y.Z.A:5095 -> X.Y.Z.b:5094
    SIP/2.0 200 OK.
    Via: SIP/2.0/UDP X.Y.Z.b:5094;rport=5094;branch=z9hG4bKH254D4rH78j3a.
    Contact: <sip:8551234567@192.168.2.60:5095>.
    To: <sip:8551234567@ X.Y.Z.15:5095>;tag=af65267a.
    From: "I ROBOT"<sip:9051234567@X.Y.Z.b>;tag=Z20SBa3mBmt5r.
    Call-ID: d4ed42e9-c786-122e-848c-00259010ee66.
    CSeq: 9644081 INVITE.
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE.
    Content-Type: application/sdp.
    Supported: replaces.
    User-Agent: 3CXPhoneSystem 9.0.15776.0.
    Content-Length: 271.
    .
    v=0.
    o=3cxPS 128731578368 464930209793 IN IP4 192.168.2.60.
    s=3cxPS Audio call.
    c=IN IP4 192.168.2.60.
    t=0 0.
    m=audio 7000 RTP/AVP 0 8 101.
    c=IN IP4 192.168.2.60.
    a=rtpmap:0 PCMU/8000.
    a=rtpmap:8 PCMA/8000.
    a=rtpmap:101 telephone-event/8000.
    a=fmtp:101 0-16.
    a=sendrecv.
     
  2. abc123

    abc123 Active Member

    Joined:
    Nov 9, 2009
    Messages:
    712
    Likes Received:
    1
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    On the Edit VOIP provider > Advanced tab there is a settting to say which ip to provide in the contact information.

    Your choices should be STUN, Internal or Specified. I think you accidentally (or something accidentally) clicked internal.

    I strongly suggest you put in a static public ip in there. use STUN as a last resort.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. startelecom

    Joined:
    Mar 12, 2011
    Messages:
    17
    Likes Received:
    0
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    Hi Mark,

    Thanks for your response. I checked the settings and "External(STUN resolved)" is currently selected. I will try using "Specified IP" option to see if it makes a difference.

    I should add... this is an IP Authenticated trunk, no registrations for either inbound or outbound.
     
  4. startelecom

    Joined:
    Mar 12, 2011
    Messages:
    17
    Likes Received:
    0
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    Hi Mark,

    Using "Specified IP" did not make a difference. 3CX is still sending the internal IP in the Contact field.
     
  5. abc123

    abc123 Active Member

    Joined:
    Nov 9, 2009
    Messages:
    712
    Likes Received:
    1
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    That was my fault.

    I thought the 200 was response to register but it is a response to the invite request. The setting i gave you was for registration but as you said you are using ip based then it is unnecessary (though i would keep it as the external ip).

    We have a couple of options to try here.

    on the voip provider (broadvox?) Oubound parameters, what is the Contact:Host Part currently set to?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. SY

    SY Well-Known Member
    3CX Support

    Joined:
    Jan 26, 2007
    Messages:
    1,825
    Likes Received:
    2
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    Hi startelecom,

    PBX log may explain some aspects of the problem. Could you please post a quotation from "Server activity Log" page (management console) which will show the flow of a problematic call?

    Thanks
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. startelecom

    Joined:
    Mar 12, 2011
    Messages:
    17
    Likes Received:
    0
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    Sure thing!

    One thing to note - the provider has multiple addresses from which the call could originate, in this case it comes through X.Y.Z.B, whereas only one IP is set up on the trunk for outbound purposes - X.Y.Z.C.


    10:18:30.546 [CM503008]: Call(11): Call is terminated
    10:18:30.546 [CM503021]: Call(11): ACK is not received
    10:18:11.375 [CM503007]: Call(11): Device joined: sip:205@192.168.2.106:5060;transport=udp
    10:18:11.375 [MS210002] C:11.1:Offer provided. Connection(transcoding mode): 192.168.2.60:7056(7057)
    10:18:11.375 [MS210001] C:11.3:Answer received. RTP connection[unsecure]: 192.168.2.106:3000(3001)
    10:18:11.375 Remote SDP is set for legC:11.3
    10:18:10.906 [CM505001]: Ext.205: Device info: Device Identified: [Man: Aastra;Mod: 9133i;Rev: General] Capabilities:[reinvite, replaces, unable-no-sdp, recvonly] UserAgent: [Aastra 9133i/1.4.2.3000 Brcm Callctrl/1.5.1.0 MxSF/v3.2.8.45] PBX contact: [sip:205@192.168.2.60:5095]
    10:18:10.906 [CM503002]: Call(11): Alerting sip:205@192.168.2.106:5060;transport=udp
    10:18:10.656 [CM503025]: Call(11): Calling Ext:Ext.205@[Dev:sip:205@192.168.2.106:5060;transport=udp]
    10:18:10.656 [MS210002] C:11.3:Offer provided. Connection(transcoding mode): 192.168.2.60:7060(7061)
    10:18:10.593 [CM503004]: Call(11): Route 1: Ext:Ext.205@[Dev:sip:205@192.168.2.106:5060;transport=udp]
    10:18:10.593 [CM503010]: Making route(s) to <sip:205@127.0.0.1:5095>
    10:18:10.593 [CM505003]: Provider:[Generic SIP Trunk -] Device info: Device Not Identified: User Agent not matched; Capabilities:[reinvite, replaces, able-no-sdp, recvonly] UserAgent: [FreeSWITCH-mod_sofia/1.0.6-svn-exported] PBX contact: [sip:pbx@192.168.2.60:5095]
    10:18:10.593 Refer: from=<sip:800@127.0.0.1:5095>;tag=c1410750; to="8551234567:6471234567"<sip:6471234567@127.0.0.1:5095>;tag=60737f71; RefTo=<sip:205@127.0.0.1:5095>
    10:18:10.375 [MS210003] C:11.2:Answer provided. Connection(transcoding mode[unsecure]):127.0.0.1:7058(7059)
    10:18:10.375 [MS210000] C:11.2:Offer received. RTP connection: 127.0.0.1:40626(40627)
    10:18:10.375 Remote SDP is set for legC:11.2
    10:18:06.390 [MS211000] C:11.1: X.Y.Z.B:21306 is delivering DTMF using RTP payload (RFC2833). In-Band DTMF tone detection is disabled for this call segment.
    10:18:05.203 Currently active calls - 1: [11]
    10:17:58.468 [CM503007]: Call(11): Device joined: sip:800@127.0.0.1:40600;rinstance=210059fd056f8681
    10:17:58.468 [CM503007]: Call(11): Device joined: sip:pbx@X.Y.Z.C:5094
    10:17:58.468 [MS210003] C:11.1:Answer provided. Connection(transcoding mode[unsecure]):192.168.2.60:7056(7057)
    10:17:58.453 [MS210001] C:11.2:Answer received. RTP connection[unsecure]: 127.0.0.1:40626(40627)
    10:17:58.453 Remote SDP is set for legC:11.2
    10:17:58.453 [CM505001]: Ext.800: Device info: Device Identified: [Man: 3CX Ltd.;Mod: 3CX IVR;Rev: General] Capabilities:[reinvite, replaces, able-no-sdp, recvonly] UserAgent: [3CX IVR] PBX contact: [sip:800@127.0.0.1:5095]
    10:17:58.453 [CM503002]: Call(11): Alerting sip:800@127.0.0.1:40600;rinstance=210059fd056f8681
    10:17:58.312 [CM503025]: Call(11): Calling Ext:Ext.800@[Dev:sip:800@127.0.0.1:40600;rinstance=210059fd056f8681]
    10:17:58.312 [MS210002] C:11.2:Offer provided. Connection(transcoding mode): 127.0.0.1:7058(7059)
    10:17:58.250 [MS210000] C:11.1:Offer received. RTP connection: X.Y.Z.B:21306(21307)
    10:17:58.250 Remote SDP is set for legC:11.1
    10:17:58.250 [CM503004]: Call(11): Route 1: Ext:Ext.800@[Dev:sip:800@127.0.0.1:40600;rinstance=210059fd056f8681]
    10:17:58.250 [CM503010]: Making route(s) to <sip:800@192.168.2.60:5095>
    10:17:58.250 [CM505003]: Provider:[Generic SIP Trunk -] Device info: Device Not Identified: User Agent not matched; Capabilities:[reinvite, replaces, able-no-sdp, recvonly] UserAgent: [FreeSWITCH-mod_sofia/1.0.6-svn-exported] PBX contact: [sip:pbx@192.168.2.60:5095]
    10:17:58.250 [MS210000] C:11.1:Offer received. RTP connection: X.Y.Z.B:21306(21307)
    10:17:58.250 Remote SDP is set for legC:11.1
    10:17:58.250 [CM503001]: Call(11): Incoming call from 6471234567@(Ln.10000@Generic SIP Trunk -) to <sip:800@192.168.2.60:5095>
    10:17:58.234 [CM503012]: Inbound any hours rule (8551234567) for 10000 forwards to DN:800
    10:17:58.234 Looking for inbound target: called=8551234567; caller=6471234567
    10:17:58.234 [CM500002]: Info on incoming INVITE:
    INVITE sip:8551234567@X.Y.Z.A:5095 SIP/2.0
    Via: SIP/2.0/UDP X.Y.Z.B:5094;rport=5094;branch=z9hG4bK5Kc8Sp7t5QBeD
    Max-Forwards: 67
    Contact: <sip:mod_sofia@X.Y.Z.B:5094>
    To: <sip:8551234567@X.Y.Z.A:5095>
    From: "6471234567"<sip:6471234567@X.Y.Z.B>;tag=UHyHy8U9DXS1r
    Call-ID: 89724be5-c81f-122e-13b3-00259010ee68
    CSeq: 9676875 INVITE
    Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY
    Supported: timer, precondition, path, replaces
    User-Agent: FreeSWITCH-mod_sofia/1.0.6-svn-exported
    Allow-Events: talk, refer
    Privacy: none
    P-Asserted-Identity: "6471234567" <sip:6471234567@X.Y.Z.B>
    Content-Length: 0
    P-hint: outbound->inbound
    X-PeerUuid: 3000
    X-SrcIp: X.Y.Z.B
    X-FS-Support: update_display
     
  8. SY

    SY Well-Known Member
    3CX Support

    Joined:
    Jan 26, 2007
    Messages:
    1,825
    Likes Received:
    2
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    The strange thing: PBX thinks that the address X.Y.Z.B is resided in the local network.
    Do you have any additional hints? (network topology, network layer configuration of the host, PBX configuration etc.)

    Thanks
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. startelecom

    Joined:
    Mar 12, 2011
    Messages:
    17
    Likes Received:
    0
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    Nothing really strange.

    The server itself - one NIC with the internal IP listed in the capture 192.168.2.60

    The server is behind a linksys router which itself has one external IP X.Y.Z.A. No SPI or anything fancy as far as I know.

    Couple of switches in between... again nothing too fancy.
     
  10. startelecom

    Joined:
    Mar 12, 2011
    Messages:
    17
    Likes Received:
    0
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    anyone?
     
  11. SY

    SY Well-Known Member
    3CX Support

    Joined:
    Jan 26, 2007
    Messages:
    1,825
    Likes Received:
    2
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    straight procedure to get straight answer:
    1. Make a wireshark capture of the network traffic (on the 3CX PhoneSystem host) for the problematic call.
    2. post it here.

    Thanks
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. smb1

    smb1 New Member

    Joined:
    Mar 18, 2009
    Messages:
    104
    Likes Received:
    0
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    On the linksys router, do you have SIP ALG turned on?

    I always disable this on any router being used to process SIP traffic.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. startelecom

    Joined:
    Mar 12, 2011
    Messages:
    17
    Likes Received:
    0
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    I see the bug still exists in v10. It's simply impossible to force 3CX to use the public IP.

    I have tried:

    1. Changing Providers>Advanced>Registration Settings > Specified IP (using my public IP)
    2. Settings > Netowrk > STUN Server > Turn Off Stun Server > Public IP to specify in Contact and SDP (using my public IP)


    Note regarding #1: I am using IP authentication with the provider server, so my 3CX does not actually register. So I am not sure if the setting effectively changes anything.
     
  14. netswork

    netswork Active Member

    Joined:
    Mar 11, 2011
    Messages:
    577
    Likes Received:
    1
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    Startelecom:

    To reiterate what David said above, you need to look at your router for the cause. Newer routers, the ones that do more than just route, have built in technology to "help" your sip traffic. If you do a wireshark from inside the network, and then from the outside of the router you will likely see were the problem is. Your router is over-writing the field.

    I have seen the same thing many times with fortigate firewalls. You need to make sure and disable all sip helper features. In fortigates this can only be disabled via the command line. Which model of linksys are you using?


    You could do a quick test by removing your router and plugging your phone system directly to the internet to make one quick test call.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. startelecom

    Joined:
    Mar 12, 2011
    Messages:
    17
    Likes Received:
    0
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    I am using Linksys WRT54GL, running Tomato Version 1.28. I don't think it does any packet inspection or ALG.

    More accurately, some versions of Tomato have SIP helper, but the version I am using does not. Just to be safe, I disabled the H323 helper, and the results are still the same. The contact address is the internal IP.
     
  16. netswork

    netswork Active Member

    Joined:
    Mar 11, 2011
    Messages:
    577
    Likes Received:
    1
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    Pasting a wireshark capture of the call from the 3cx server will help see whats going on.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. startelecom

    Joined:
    Mar 12, 2011
    Messages:
    17
    Likes Received:
    0
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    How is this?



    Session Initiation Protocol
    Request-Line: INVITE sip:16475551234@204.X.Y.Z:5060 SIP/2.0
    Method: INVITE
    Request-URI: sip:16475551234@204.X.Y.Z:5060
    Request-URI User Part: 16475551234
    Request-URI Host Part: 204.X.Y.Z
    Request-URI Host Port: 5060
    [Resent Packet: False]
    Message Header
    Via: SIP/2.0/UDP 192.168.2.60:5095;branch=z9hG4bK-d8754z-682b116ee9082e0c-1---d8754z-;rport
    Transport: UDP
    Sent-by Address: 192.168.2.60
    Sent-by port: 5095
    Branch: z9hG4bK-d8754z-682b116ee9082e0c-1---d8754z-
    RPort: rport
    Max-Forwards: 70
    Contact: <sip:default@192.168.2.60:5095>
    Contact-URI: sip:default@192.168.2.60:5095
    Contactt-URI User Part: default
    Contact-URI Host Part: 192.168.2.60
    Contact-URI Host Port: 5095
    To: <sip:16475551234@204.X.Y.Z:5060>
    SIP to address: sip:16475551234@204.X.Y.Z:5060
    SIP to address User Part: 16475551234
    SIP to address Host Part: 204.X.Y.Z
    SIP to address Host Port: 5060
    From: "8778008000"<sip:default@204.X.Y.Z:5060>;tag=8c34832e
    SIP Display info: "8778008000"
    SIP from address: sip:default@204.X.Y.Z:5060
    SIP from address User Part: default
    SIP from address Host Part: 204.X.Y.Z
    SIP from address Host Port: 5060
    SIP tag: 8c34832e
    Call-ID: YWNlM2I0M2VmMzU4ZDNiMTdlZjExMGZhOGEyMGQxZDM.
    CSeq: 1 INVITE
    Sequence Number: 1
    Method: INVITE
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE
    Content-Type: application/sdp
    Supported: replaces
    User-Agent: 3CXPhoneSystem 10.0.22539.0
    Content-Length: 276
    Remote-Party-ID: "8778008000"<sip:8778008000@204.X.Y.Z:5060>;party=calling
    [Expert Info (Note/Undecoded): Unrecognised SIP header (Remote-Party-ID)]
    [Message: Unrecognised SIP header (Remote-Party-ID)]
    [Severity level: Note]
    [Group: Undecoded]
    Message Body
    Session Description Protocol
    Session Description Protocol Version (v): 0
    Owner/Creator, Session Id (o): 3cxPS 434278236160 38990249985 IN IP4 192.168.2.60
    Owner Username: 3cxPS
    Session ID: 434278236160
    Session Version: 38990249985
    Owner Network Type: IN
    Owner Address Type: IP4
    Owner Address: 192.168.2.60
    Session Name (s): 3cxPS Audio call
    Connection Information (c): IN IP4 192.168.2.60
    Connection Network Type: IN
    Connection Address Type: IP4
    Connection Address: 192.168.2.60
    Time Description, active time (t): 0 0
    Session Start Time: 0
    Session Stop Time: 0
    Media Description, name and address (m): audio 7010 RTP/AVP 0 8 3 101
    Media Type: audio
    Media Port: 7010
    Media Protocol: RTP/AVP
    Media Format: ITU-T G.711 PCMU
    Media Format: ITU-T G.711 PCMA
    Media Format: GSM 06.10
    Media Format: DynamicRTP-Type-101
    Connection Information (c): IN IP4 192.168.2.60
    Connection Network Type: IN
    Connection Address Type: IP4
    Connection Address: 192.168.2.60
    Media Attribute (a): rtpmap:0 PCMU/8000
    Media Attribute Fieldname: rtpmap
    Media Format: 0
    MIME Type: PCMU
    Sample Rate: 8000
    Media Attribute (a): rtpmap:8 PCMA/8000
    Media Attribute Fieldname: rtpmap
    Media Format: 8
    MIME Type: PCMA
    Sample Rate: 8000
    Media Attribute (a): rtpmap:3 GSM/8000
    Media Attribute Fieldname: rtpmap
    Media Format: 3
    MIME Type: GSM
    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): sendrecv
     
  18. startelecom

    Joined:
    Mar 12, 2011
    Messages:
    17
    Likes Received:
    0
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    Hi Folks,

    Any feedback based on the trace?
     
  19. netswork

    netswork Active Member

    Joined:
    Mar 11, 2011
    Messages:
    577
    Likes Received:
    1
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    are you still using stun?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. startelecom

    Joined:
    Mar 12, 2011
    Messages:
    17
    Likes Received:
    0
    Re: 3CX sends internal IP in Contact: Field / No ACK Respons

    I have tried both using STUN and by forcing the public IP... it doesn't seem to make a difference.
     
Thread Status:
Not open for further replies.