Public IP in SIP VIA Header, but not in the BYE message?

Discussion in '3CX Phone System - General' started by dan_tx, Oct 27, 2017.

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

    Joined:
    Nov 3, 2016
    Messages:
    92
    Likes Received:
    22
    So we are having an issue with a new install and the SIP provider (Intelepeer) believes it's on the 3cx side or the router side. We have another PBX (different software) setup behind the same router using the same trunk provider without this problem, so I'm leaning more towards the 3CX side. Hoping there is a fix for it in some settings that I can't find.

    The issue is we have a SIP trunk registered via IP address. We have the box checked "Put Public IP in SIP VIA Header" in order for it to register properly, which it does and we can make calls.

    upload_2017-10-27_14-48-3.png

    Audio and calls are all working great. The one issue is when we have an incoming call that is answered, when the answering party hangs up, the BYE message they send gets rejected by the SIP trunk provider due to the SIP VIA header has the private IP, not the public. This does not happen with the other PBX software we are currently using. It puts the public IP in the BYE message VIA: SIP header.

    Below is what the SIP trunk provider is saying the issue is (the yellow part).

    upload_2017-10-27_14-56-30.png

    Is this a bug or never had much a need to be addressed? I've rebuilt the trunk several times, same issue. If I use a different trunk provider that we register with (non-ip based) they don't care about the BYE message having the local IP in the VIA header and accept it. My understanding though is IP based authentication sip trunks needs this to match to not reject it.

    Anyone have a work around for this or some setting that is being missed?
     
  2. sip.bg

    sip.bg Active Member

    Joined:
    Nov 7, 2016
    Messages:
    704
    Likes Received:
    219
    Most probably you have SIP ALG enabled into your router, please run 3CX firewall checker. It must be disabled for 3CX to work properly and also you need port forwarding / NAT for specific ports (adhere 3CX documentation).

    If you have used Asterisk type of PBX, in contrary, you need SIP ALG been enabled in most cases.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. dan_tx

    Joined:
    Nov 3, 2016
    Messages:
    92
    Likes Received:
    22
    Thanks for the response.

    Firewall check in 3cx passes with no issues and the firewall is configure to documentation standards.

    I would also think that if it was the firewall it would effect the other non-3cx pbx behind it as well, which is sending the public ip in the bye message correctly. I’d also guess that if it was the firewall, it would be changing all the sip messages, not just the BYE.

    I guess I’m just confused how it’s so easy to tell when ticking the box in the trunk options to include the public ip in VIA header it obviously starts doing that per wireshark, but just does not do it for the bye signal on an incoming call. Again that makes it seem to me like a 3cx issue.
     
  4. jbryant84

    jbryant84 New Member

    Joined:
    Apr 6, 2016
    Messages:
    106
    Likes Received:
    38
    Try unchecking the sip header box and put the IP in here instead.
     

    Attached Files:

  5. Nick Galea

    Nick Galea Site Admin

    Joined:
    Jun 6, 2006
    Messages:
    1,913
    Likes Received:
    215
    Why not use a supported VoIP provider instead? There are so many to choose from in the US and you will have peace of mind that the interop is committed by both companies and fully supported. And re tested on a regular basis.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. dan_tx

    Joined:
    Nov 3, 2016
    Messages:
    92
    Likes Received:
    22
    Wow, didn’t expect a response from Nick. Thanks for one of the best PBX out there. I’ve been doing IT enough to value ease of use and expect it to look good too. Since I find out about 3cx, most other products fall way short in those areas now.

    The main reason for not changing at this time is the current sip provider has a long history with the business of providing reliable and quality service. While a move isn’t impossible, the understanding with the business is if it works well, don’t change it. Atleast don’t change it all at once. So getting the PBX updated was/is the first step, then explore if a better, officially supported, quality provider is available.

    Is it wrong for a sip provider to deny the bye message if it contains the private ip in the via header? I haven’t tried another sip provider that authenticates by IP address so don’t know if that’s the normal procedure or not.
     
    #6 dan_tx, Oct 29, 2017
    Last edited: Oct 29, 2017
    Nick Galea likes this.
  7. sip.bg

    sip.bg Active Member

    Joined:
    Nov 7, 2016
    Messages:
    704
    Likes Received:
    219
    You may try putting your internal address into 'Contact' (SIP) and 'Connection'(SDP) fields in SIP trunk settings and enable SIP ALG, it will work on Cisco routers and some others, firewall checker will give an error about SIP ALG, in case putting your public address in this field doesn't work with disabled SIP ALG in the router. Have you tried this?

    Where you check "Put Public IP in SIP VIA Header" ? If this is in your router, leave it unchecked. The normal strategy should be to not modify the SIP traffic packets into router in front of 3CX PBX.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Sopock

    Sopock Member

    Joined:
    Jul 11, 2012
    Messages:
    447
    Likes Received:
    20
    No, that checkbox is in 3CX!

    You can also try to set Dynamic IP in network settings. Maybe in this case it will use discovered IP?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. sip.bg

    sip.bg Active Member

    Joined:
    Nov 7, 2016
    Messages:
    704
    Likes Received:
    219
    Let dan_tx try it without checking this field (Put Public IP in SIP VIA Header), only put public IP into Contact' (SIP) and 'Connection'(SDP) fields with SIP ALG disabled into router. This worked for me in similar situation (with other provider).

    The next thing is to try using internal address of the PBX, if SIP ALG operation of the router is reliable, depends what make it is.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. dan_tx

    Joined:
    Nov 3, 2016
    Messages:
    92
    Likes Received:
    22
    I’ll try using the public ip in Contact SIP and Connections SDP tomorrow when back in the office. I’ll do it with and without using the Public IP in SIP VIA header selected.
     
  11. Nick Galea

    Nick Galea Site Admin

    Joined:
    Jun 6, 2006
    Messages:
    1,913
    Likes Received:
    215
    Hi Dan - Thank you for your nice comments, much appreciated!

    You can setup an account with SIP.US, Flowroute, Vitelity, Twilio free of charge and in minutes. Then you can really test how easy 3CX is and just use a different number for the moment. If you use an unsupported provider you will possibly have issues and 3CX would not have been given a "fair" comparison in our view. If the customer insists on using the provider then we suggest getting in writing that it is in fact SIPCONNECT 1.1/2 compliant, as it will work out of the box.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. dan_tx

    Joined:
    Nov 3, 2016
    Messages:
    92
    Likes Received:
    22

    I put the public IP in the Contact (SIP) field, still showing the private IP in the VIA: SIP header and the BYE message gets denied. Something that I find interesting is for outgoing calls, when thecalling party hangs up , it transmit the Public IP, which is accepted. It's only on incoming calls that the pbx doesn't replace the VIA: SIP BYE message with the public IP.
     
  13. dan_tx

    Joined:
    Nov 3, 2016
    Messages:
    92
    Likes Received:
    22
    Setup a flowroute IP based, looks like they accept the BYE even if the Via: SIP header has the private IP. Might have to setup migration over to Flowroute if there is no fix on Intelepeers side or 3CX. Defintly like how easy flowroutes web interface is :)
     
    Nick Galea likes this.
  14. sip.bg

    sip.bg Active Member

    Joined:
    Nov 7, 2016
    Messages:
    704
    Likes Received:
    219
    Last idea: Go to Settings | Parameters and set ALLOWSOURCEASOUTBOUNDVP to 1.
    Behavior of this provider (Intelepeer) is strange. Use public IP address in all fields ( Public IP in SIP VIA Header and Contact' (SIP) and 'Connection'(SDP)).

    What was your previous PBX?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. dan_tx

    Joined:
    Nov 3, 2016
    Messages:
    92
    Likes Received:
    22
    Tried changing the ALLOWSOURCEOUTBOUNDVP , still issue remains.

    Current PBX that we are moving away from is Altigen.
     
  16. sip.bg

    sip.bg Active Member

    Joined:
    Nov 7, 2016
    Messages:
    704
    Likes Received:
    219
    I don't have any other idea, sorry.
    Still 3CX support could help you. Place a ticket (directly or through your reseller).
    Please share the solution, if any.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. dan_tx

    Joined:
    Nov 3, 2016
    Messages:
    92
    Likes Received:
    22
    The reseller we are going through is/has opened a ticket today I believe.

    Side note, I was setting up a flowroute, and all of a sudden getting this. :/ Not a great first start. From cell phone as well so going to say it's not on my end.

    https://manage.flowroute.com

    upload_2017-10-30_11-49-11.png


    *Update*

    Looks like they are aware now. Didn't say this when I posted a minute ago.

    upload_2017-10-30_11-51-26.png


    *Update #2*

    And its back on phone
     
    #17 dan_tx, Oct 30, 2017
    Last edited: Oct 30, 2017
  18. sip.bg

    sip.bg Active Member

    Joined:
    Nov 7, 2016
    Messages:
    704
    Likes Received:
    219
    Revert setting of ALLOWSOURCEOUTBOUNDVP to '0'.
    Other settings discussed above are trunk specific, so they can't be an issue.
    Restart your 3CX services, just in case.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. Sopock

    Sopock Member

    Joined:
    Jul 11, 2012
    Messages:
    447
    Likes Received:
    20
    This provider is also offering interesting option:cool:
    [​IMG] This is the best option if you need to separate your voice traffic from all other data traffic. We will coordinate the delivery of a dedicated ethernet connection between your site and our data centers.

    • Doing VoIP over "Bring Your Own Bandwidth" (BYOB), is very risky and you either have to have a very low user count or a very liberal company that can tolerate bad voice quality on occasion.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #19 Sopock, Oct 30, 2017
    Last edited: Oct 30, 2017
  20. cobaltit

    cobaltit Active Member

    Joined:
    Mar 22, 2012
    Messages:
    817
    Likes Received:
    124
    So I'd put all your settings back to what they were and try the Update 2 Beta. Per the changelogs:

    • Fixed “Public IP in SIP Via Header” where the Bye message contained the PBX Local IP Address in the SIP Via Header.

    Looks like a 3CX bug.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    dan_tx likes this.
Thread Status:
Not open for further replies.