Return IP address for SDP

Discussion in '3CX Phone System - General' started by casilogic, Oct 30, 2009.

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

    Joined:
    Oct 30, 2009
    Messages:
    10
    Likes Received:
    0
    We want to use the PBX on one of our servers. We have a fixed external IP. The server is linked thru 192.168.0.2 to a router. Outgoing and ingoing calls work fine but we have can not hear the external sound. Checking packet sniffer logs and talking to our provider, this is due to a problem with 3CX "INVITE" message:

    INVITE sip:910060@sip.itsp.de:5060 SIP/2.0
    Via: SIP/2.0/UDP 192.168.0.2:5060;branch=z9hG4bK-d8754z-56101939c132c37e-1---d8754z-;rport
    Max-Forwards: 70
    Contact: <sip:4932229961237@80.72.254.70:5060>
    To: <sip:910060@sip.itsp.de:5060>
    From: "910060"<sip:4932229961237@sip.itsp.de:5060>;tag=4e4a3e12
    Call-ID: OTZjNTg0NmUxMjFlNTk2ZmM5ZmNhYjUwODg3ZDEzN2Q.
    CSeq: 1 INVITE
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO
    Content-Type: application/sdp
    User-Agent: 3CXPhoneSystem 8.0.9481.0
    Content-Length: 274
    v=0
    o=3cxPS 537542000640 314405027841 IN IP4 192.168.0.2
    s=3cxPS Audio call
    c=IN IP4 192.168.0.2

    Instead of 192.168.0.2 it should send the global IP address 80.72.254.70 so the provider can send back SDP to the correct IP.
    We have not found any parameter to adjust this.
    Anybody knows about it?
     
  2. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    10,869
    Likes Received:
    304
    Could it have something to do with the STUN settings in 3CX?
     
  3. casilogic

    Joined:
    Oct 30, 2009
    Messages:
    10
    Likes Received:
    0
    That was what the provider supposed to do. STUN works correctly.
    If we disable STUN and put our global IP in the field "IP for contact and SDP" nothing changes - no SDP packets come in. And no change in the INVITE message.
    Also the 3CX phone does the same thing and therefore does not work when connected directly to the provider. And the phone has not many parameters to deal with. Any other phones and systems we tested worked right from the beginning.
    Maybe we can put a proxy in front of the phone system...
     
  4. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    10,869
    Likes Received:
    304
    Perhaps there is someone on the forum that has , or is, using your VoIP provider and can shed some light on a solution. I know that there have been people running into problems with some providers. In many cases it has been an issue of SIP standards not being followed by the provider. It is very suspicious that the 3Cx softphone won't work.
     
  5. casilogic

    Joined:
    Oct 30, 2009
    Messages:
    10
    Likes Received:
    0
    Thank you, leejor, for your comments.
    The provider says that transferring the internal IP address in the mentioned INVITE fields is not conforming. If I have some spare time I may look into SIP definitions to find out. Anyway, other phones and PBXs send the global IP, and it works.
     
  6. archie

    archie Well-Known Member
    3CX Support

    Joined:
    Aug 18, 2006
    Messages:
    1,299
    Likes Received:
    0
    The message you've printed - is it taken from 3CX logs or it is captured on provider's site?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. casilogic

    Joined:
    Oct 30, 2009
    Messages:
    10
    Likes Received:
    0
    It is captured by a packet sniffer on our side, ie on the server.
     
  8. casilogic

    Joined:
    Oct 30, 2009
    Messages:
    10
    Likes Received:
    0
    The problem seems to be the classification of interfaces by the PBX as "external" and "internal". The server is attached via one NIC to the company network, so external traffic goes over it (to our router) as well as internal. The PBX sees all traffic as internal. This is indicated by its port assignment: all SDP traffic is assigned the same port range even if different ranges are assigned to external and internal traffic, resp.
    There seem to be some config file options handling this but teh documentation looks confusing. We tried a little bit but it did not work. Any recipe?
     
  9. nb

    nb Support Team
    Staff Member 3CX Support

    Joined:
    Jun 7, 2007
    Messages:
    2,129
    Likes Received:
    153
    What is the router Make and model?

    I am asking you this because I encountered problems with routers that have some SIP ALG on.

    Make sure you have PBX delivers audio checked and replaces and re-invites turned off.

    Is stun resolved correctly? Posting the whole logs will be better - there could be many factors on this - Stun, configuration of this provider (outbound parameters).

    Yes if that is an outbound call you should see the public ip in the SDP and contact headers.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. casilogic

    Joined:
    Oct 30, 2009
    Messages:
    10
    Likes Received:
    0
    Reinvite & Replace is off, audio is on.
    The router is a linux PC supplied by the provider. It is completely transparent.
    We feel the point is the distinction between "external" and "internal" interfaces. How is this done? Definitely, the PBX sees no "external" interface.
    As the router is in the same net and on the same NIC, we don't know how to tell the PBX the difference.
    Attached find a support file. We have added some lines in the ini file - it doesn_t work with or without these. Hope it helps.
     
  11. casilogic

    Joined:
    Oct 30, 2009
    Messages:
    10
    Likes Received:
    0
    Here is the file. Had to delete some files.
     
  12. nb

    nb Support Team
    Staff Member 3CX Support

    Joined:
    Jun 7, 2007
    Messages:
    2,129
    Likes Received:
    153
    You have the router and the PBX on the same machine?

    What is the default gateway in your scenario?

    Can you call 99? Do you hear audio?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. archie

    archie Well-Known Member
    3CX Support

    Joined:
    Aug 18, 2006
    Messages:
    1,299
    Likes Received:
    0
    19:50:41.959|.\BaseException.cxx(17)|Debug8|Resip|::ResipLogger:BaseException at .\ParseBuffer.cxx:79 .\ParseBuffer.cxx:79, Parse failed skipped over eof in context:
    80.72.254.70
    ^

    19:50:41.959|.\SipTemplates.cpp(1005)|Debug0||BuilderImpl::buildContact:Unknown exception

    Check Outbound parameters. What is set for Contact : Host / Port?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. casilogic

    Joined:
    Oct 30, 2009
    Messages:
    10
    Likes Received:
    0
    Yes / Yes
     
  15. casilogic

    Joined:
    Oct 30, 2009
    Messages:
    10
    Likes Received:
    0
    I checked the log files. This is pretty old stuff you refer to (from the first configuration). It only illustrates that the PBX was never aware that it connects to an "external" SIP server. As we did not understand this at that time, we adjusted host address etc. many times.
    Only the last few lines in the log files (since last restart) are useful.
     
  16. archie

    archie Well-Known Member
    3CX Support

    Joined:
    Aug 18, 2006
    Messages:
    1,299
    Likes Received:
    0
    Could you please perform 'route print' command from command-line console and send us results?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. archie

    archie Well-Known Member
    3CX Support

    Joined:
    Aug 18, 2006
    Messages:
    1,299
    Likes Received:
    0
    I'm refering to the logs files you've sent. I can not refer to anything else. And this log has only one call and for this call Contact : Host/Port is set incorrectly. Actually, it is set to $CustomField = '80.72.254.70', correct value would be '80.72.254.70:5060', port is mandatory.

    PBX uses info provided by operating system to find out if destination is external or internal. If you enable STUN mode, PBX will do all "research" itself and will operate correctly.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. casilogic

    Joined:
    Oct 30, 2009
    Messages:
    10
    Likes Received:
    0
    Fixed! The PC had a 2nd network port which was not connected and not preset (ie set for dhcp only). It caused a single route to 255.255.255.255 mask 255.255.255.255 gateway 192.168.0.2 and this confused the PBX assuming that outside traffic thru the other active active NIC 192.168.0.2 being on the "internal" net. Why? I don't know.
    After deactivating the NIC everything worked immediately as expected.
     
  19. nb

    nb Support Team
    Staff Member 3CX Support

    Joined:
    Jun 7, 2007
    Messages:
    2,129
    Likes Received:
    153
    Is the machine windows 2008 by any chance?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.