How does the 3CXPhone determine "Out of Office" for tunnel?

Discussion in 'Windows' started by livn46, Jan 12, 2015.

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

    Joined:
    Oct 24, 2014
    Messages:
    78
    Likes Received:
    1
    We have an issue where if we have the 3CXTunnel enabled and set a phone to "Out of Office", then the phone works fine. However, the "Out of Office" setting isn't sticky: the phone seems to be putting itself back "In Office" again when the phone is re-started, like it's running some kind of test to determine whether it is "In Office" or "Out of Office" relative to the 3CX Server.

    How does the phone determine that it is "In Office" or "Out of Office"? I can't find this documented anywhere.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    10,757
    Likes Received:
    286
    Re: How does the 3CXPhone determine "Out of Office" for tunn

    I have away assumed that it looks at the IP it has been assigned by the DHCP server it is currently using, and compares that to the IP that you put in for the 3CX server. If they are on the same network, then it attempts to contact the server directly, if unsuccessful, or a different subnet, then it assumes itself to be out of the office.

    You could try leaving out the 3CX server IP, then it would have nothing to compare to. If you only used the phone from out of the office, there is no need to have that in there as the public IP/Domain Name, plus port, would always be used.
     
  3. livn46

    Joined:
    Oct 24, 2014
    Messages:
    78
    Likes Received:
    1
    Re: How does the 3CXPhone determine "Out of Office" for tunn

    Yeah, that's kind of what we thought. It seems to be more complicated. We actually don't have our server open to the internet: we are having everyone connect to the office over a VPN, so 3CX should behave like the 3CXPhones are local to it. All ports are allowed, and the 3CXPhones used to be able to work fine with this configuration ("In Office"). Suddenly now they will only make outbound calls using the 3CXTunnel ("Out of Office"), and we can't figure out what's changed. They can still register with the server and receive incoming calls but not initiate calls.

    So we need either a way to block the exact port that will convince 3CXPhone that it is "Out of Office" when it starts, or figure out what is preventing 3CXPhone from initiating a successful call while in "In Office" configuration. So far we haven't been able to figure out either one.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Vali_3CX

    Vali_3CX Well-Known Member
    Staff Member 3CX Support

    Joined:
    Dec 12, 2008
    Messages:
    1,479
    Likes Received:
    67
    Re: How does the 3CXPhone determine "Out of Office" for tunn

    Hi
    I suggest you to post 3CXPhone's version and log, because could be several reasons for the behavior you described.
    Regards
    vali
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    10,757
    Likes Received:
    286
    Re: How does the 3CXPhone determine "Out of Office" for tunn

    If this is the case, then there is no requirement to tick "use the Tunnel", nor even datafill it. There is also no reason to put in any information used to access the server from outside the local LAN (the public IP/Domain Name). You should only have to provide the local IP of the server, and the port, along with the extension parameters, of course. No different from any other SIP phone used exclusivity on the local LAN.
     
  6. livn46

    Joined:
    Oct 24, 2014
    Messages:
    78
    Likes Received:
    1
    Re: How does the 3CXPhone determine "Out of Office" for tunn

    Thanks for the replies.

    vali,
    3CX is fully updated: 3CXPhone version is 12.0.37098. Server version is 37098.738.
    I'm not sure which logs you're referring to: the Server Activity Log for a call? Or some logs from the client itself? The Server Activity Log shows no traffic at all for an attempted call, like it never receives it at all. However, registrations happen normally and if someone calls the phone it answers fine and expected traffic is successful both directions.

    leejor,
    I agree, and that's the way it's worked for the past year. We can't figure out what's changed. The tunnel over the VPN is a workaround. The network firewall is allowing all ports except, I think, 3389, and Windows firewall on the server is turned off, so we're kind of baffled why what you're describing isn't working.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. livn46

    Joined:
    Oct 24, 2014
    Messages:
    78
    Likes Received:
    1
    Re: How does the 3CXPhone determine "Out of Office" for tunn

    Okay, let me try approaching this problem from a different way. We have a test 3CX server, and we set up a test laptop. Both of them are doing basically nothing else at the moment except servicing this call: no other clients or programs running. The test laptop has Wireshark installed.

    First, I made a call with the phone "Out of Office" (using the tunnel), and the call successfully went to voicemail (this was from 2627 to 5010). Then, I put the phone "In Office", told it to re-register, and made the same call. It said "Dialing" until it timed out.

    I'm pasting the most recent entries in the Server Activity Log. Call #1 is the 16:21 call. Call #2 doesn't even show up at all, although it happened a minute or two afterward.

    14-Jan-2015 16:21:29.091 Leg L:4.2[VMail] is terminated: Cause: BYE from PBX
    14-Jan-2015 16:21:29.091 [CM503008]: Call(C:4): Call is terminated
    14-Jan-2015 16:21:29.085 Leg L:4.1[Extn] is terminated: Cause: BYE from 172.18.3.179:5080
    14-Jan-2015 16:21:22.129 [CM503007]: Call(C:4): VMail:9999 has joined, contact <sip:9999@127.0.0.1:40600>
    14-Jan-2015 16:21:22.125 [CM503007]: Call(C:4): Extn:2627 has joined, contact <sip:2627@127.0.0.1:55781>
    14-Jan-2015 16:21:22.123 L:4.2[VMail] has joined to L:4.1[Extn]
    14-Jan-2015 16:21:21.974 [CM503025]: Call(C:4): Calling T:VMail:9999@[Dev:sip:9999@127.0.0.1:40600;rinstance=b86d629859d870be] for L:4.1[Extn]
    14-Jan-2015 16:21:21.924 [CM503005]: Call(C:4): Forwarding: T:VMail:9999@[Dev:sip:9999@127.0.0.1:40600;rinstance=b86d629859d870be]
    14-Jan-2015 16:21:21.924 L:4.1[Extn] forwards call from Extn:5010 to VMail:9999 based on rule Fwd[Available/NotReg]
    14-Jan-2015 16:21:21.924 L:4.1[Extn] failed to reach Extn:5010, reason Not Registered
    14-Jan-2015 16:21:21.924 [CM503017]: Call(C:4): Target is not registered: Extn:5010
    14-Jan-2015 16:21:21.924 [CM503001]: Call(C:4): Incoming call from Extn:2627 to <sip:5010@172.18.3.179:5060>
    14-Jan-2015 16:21:06.798 Leg L:3.2[VMail] is terminated: Cause: BYE from PBX
    14-Jan-2015 16:21:06.798 [CM503008]: Call(C:3): Call is terminated
    14-Jan-2015 16:21:06.787 Leg L:3.1[Extn] is terminated: Cause: BYE from 172.18.3.179:5080
    14-Jan-2015 16:21:02.675 [CM503007]: Call(C:3): VMail:9999 has joined, contact <sip:9999@127.0.0.1:40600>
    14-Jan-2015 16:21:02.672 [CM503007]: Call(C:3): Extn:2627 has joined, contact <sip:2627@127.0.0.1:55781>
    14-Jan-2015 16:21:02.670 L:3.2[VMail] has joined to L:3.1[Extn]
    14-Jan-2015 16:21:02.439 [CM503025]: Call(C:3): Calling T:VMail:9999@[Dev:sip:9999@127.0.0.1:40600;rinstance=b86d629859d870be] for L:3.1[Extn]
    14-Jan-2015 16:21:02.390 [CM503005]: Call(C:3): Forwarding: T:VMail:9999@[Dev:sip:9999@127.0.0.1:40600;rinstance=b86d629859d870be]
    14-Jan-2015 16:21:02.390 L:3.1[Extn] forwards call from Extn:5010 to VMail:9999 based on rule Fwd[Available/NotReg]
    14-Jan-2015 16:21:02.390 L:3.1[Extn] failed to reach Extn:5010, reason Not Registered
    14-Jan-2015 16:21:02.390 [CM503017]: Call(C:3): Target is not registered: Extn:5010
    14-Jan-2015 16:21:02.388 [CM503001]: Call(C:3): Incoming call from Extn:2627 to <sip:5010@172.18.3.179:5060>
    14-Jan-2015 16:20:55.087 [CM504001]: Endpoint Extn:2627: new contact is registered. Contact(s): [sip:2627@172.18.4.49:58535 / 2627,sip:2627@127.0.0.1:55781 / 2627]

    The wireshark captures for both calls is attached. What I'm most suspicious of is the fact that for the unsuccessful call the SIP INVITE appears like this (and you can see that it keeps trying for about 30 seconds).

    17 1.816859000 192.168.97.36 172.18.3.179 SIP/SDP 1092 Request: INVITE sip:5010@172.18.3.179:5060 |

    and the successful call SIP INVITE looks like this:

    24 4.808329000 192.168.97.36 172.18.3.179 SIP/SDP 1120 Unknown request: &\004\331\373Sip0INVITE sip:5010@172.18.3.179:5060 |

    I can't tell what this signifies. Is it just because the Tunnel adds a header that Wireshark doesn't know how to interpret?

    Can anyone see clues here as to what is going wrong? We can't see how anything on the network could be blocking anything, but I also can't think of any other explanation to why the SIP INVITES aren't making it to the server. Port 5060, which I think is the port being used, is open between the server and the laptop: I just verified that with telnet. Are there other ports I should verify?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    10,757
    Likes Received:
    286
    Re: How does the 3CXPhone determine "Out of Office" for tunn

    I believe that Vali was referring to the log within the 3CX Phone itself. It would show what issues that phone was encountering when attempting to register. the fact that you see no logs, of a registration attempt at the 3CX PBX end would indicate that something is blocking it, or it is being directed to an incorrect destination.
     
  9. livn46

    Joined:
    Oct 24, 2014
    Messages:
    78
    Likes Received:
    1
    Re: How does the 3CXPhone determine "Out of Office" for tunn

    We finally figured out the problem. The Application Layer Gateway setting for SIP on our firewall had been turned on, and so it was interfering with SIP traffic (not blocking anything totally, but apparently dropping packets or something). After we turned it to off, things are back to normal again.

    I'm curious, though: where would I have gone to get logs for the 3CXPhone client? I can see a C:\ProgramData\3CXPhone for Windows\Logs folder, but it's empty on my machine, and I don't see logs in any of the other folders. Is logging something I have to turn on somewhere?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    10,757
    Likes Received:
    286
    Re: How does the 3CXPhone determine "Out of Office" for tunn

    I think my original reply to this disappeared last weekend.

    If you click the button at the bottom centre of the phone window, one of the icons that comes up is "Debug", there are a couple of tabs with options in there.
     
  11. livn46

    Joined:
    Oct 24, 2014
    Messages:
    78
    Likes Received:
    1
    Re: How does the 3CXPhone determine "Out of Office" for tunn

    I believe you're referring to the v11 softphone? We have the v12 one, and I can't find any debug anywhere. However, I did find in another post that there's a log located at %userprofile%\AppData\Roaming\3CXPhone for Windows\Logs, so that was new to me. I'll try looking through there. I have another issue that I'm researching now. The fun never ends...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.