Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

Solved How to provision Fanvil X3S second line

Discussion in '3CX Phone System - General' started by James Talbott, Jan 13, 2018.

Thread Status:
Not open for further replies.
  1. James Talbott

    Joined:
    Dec 27, 2017
    Messages:
    21
    Likes Received:
    0
    We have a Patton 4112 FXO that has been configured so that each port looks like a separate gateway to the 3CX server. One line is port 5060 and the other is 5062. Our issue is on the phone side in that the Line 1 of the Fanvil phone (SIP 1) goes to port 5060 and works fine. Line 2 (SIP 2) is set for port 5062 but it won't register at all. It gets a "timeout error" and in looking at Wireshark the 3CX server does not even respond. I have noticed that each time it ties to register the Fanvil phone tries to register from a different phone port ( I don't know if this is important or not), but always to the 3CX port 5062 on Line 2.

    Will the 3CX only respond to a register on port 5060 and if so how do I get the phone Line 2 to be assigned to the gateway line port 5062. We need each incoming PSTN to go to a individual phone line button.
     
  2. lneblett

    lneblett Well-Known Member

    Joined:
    Sep 7, 2010
    Messages:
    2,086
    Likes Received:
    65
    Actually, I think you may be mistaken. So, maybe I can clear things up some.
    The Patton as well as any other device that registers to (sends to) 3CX will all do so using a common SIP port (5060 being the default). However, the devices when they do register, will tell 3CX to respond back to each device on what is defined as their local SIP port(s). When a single device has multiple registrars it will have a unique local SIP port for each as well as unique local RTP ports for each when in a call. The effect being not that the device is trying to use different ports when talking to 3CX, but rather the devices will tell and expect 3CX to communicate back to the devices using unique SIP and RTP ports associated to each registrar. This allows the two lines/trunks on the Patton or 2 extensions on the Fanvil to maintain their "uniqueness". 3CX sees them as trunks or extensions with registrations on 5060, but the returns in either case are going back to a single IP each having 2 registrations (5060, 5062, or different as setup in the local SIP port by you). If you look at the phone tab in 3CX, you will see the extension, along with its IP and the port that 3CX is using to communicate back to same.

    If each port on the Patton is set within 3CX to be an individual trunk, then you set each inbound trunk rule to go to the extension of interest on the Fanvil as it should be set with two extensions. This assumes that the telco provider is not set to use rollover should the PSTN be busy on one line or the other.
     
  3. James Talbott

    Joined:
    Dec 27, 2017
    Messages:
    21
    Likes Received:
    0
    Thanks for your reply. I should have mentioned that we are running a static IP setup, not DHCP which seems to be why we are having so many problems. Now, since I'm new to this, any your obviously know what you are talking about, one of the issues I have with getting into this VOIP is the terminology. You use terms such as "multiple registrars" etc. which I really have no background in, but I'm slowly learning thanks to people like you.

    What I can say is what I am working on and I'll try to be more precise in what I am doing as I may not use the correct terms. The Fanvil phone has two 'Line buttons." One is set up on port 5060, this is SIP 1 under the phone setup. If I set the Line 2 button, SIP 2, to 5060 either PSTN line will ring the phone, but not on the correct line button. However if I set the Fanvil phone up on SIP 2 to use 5062, to differentiate that Line 2 button from the Line 1 button and which is also the port address of the Patton 4112 FXO it will not register. I have done a port scan and found that port 5062 is closed so that it probably why 3CX won't respond to a register request as I can see with Wireshark. I was going to got into Debian and modify the iptables firewall to open 5062 to see if this would work, but I'm a little confused by your answer as it uses some terms that I'm unfamiliar with.

    Hopefully I've cleared up what we are doing, and if you could explain what you initially said, in a more basic level, it would really be appreciated. Oh, and, no, we don't have the hunting feature from our telco provider.

    Thanks for your help.
     
  4. James Talbott

    Joined:
    Dec 27, 2017
    Messages:
    21
    Likes Received:
    0
    I have some addition information to the above. I did try opening the 5062 port and I did get a response from the server, but the server did not recognize it as a SIP register and rejected it. So I guess that 3CX only recognizes on SIP port.

    As to the Favnil phones. The Fanvil web configuration has a "line" setup which has a pulldown menu for SIP1 or SIP2. Also it has a "username" field that corresponds to the extension number of the phone, in this case 01 as the phone is registered as extension 01 with 3CX. When the phone sends the register request to the 3CX server it uses that username and sends the request as sip01@xxx.xxx.xxx.xxx Now if you go to the SIP2 pulldown you still have to use that 01 in the username field as that is the extension number as far as 3CX is concerned. If you input 02, for example, the phone will send a sip02@xxx.xxx.xxx.xxx and you get an authentication error as that extension is registered to another phone. So if you use username 01 for both SIP pulldowns the phone works, but both PSTN lines will ring on Line 1, assuming the other PSTN line is not being used, and this is not what we want. We want a specific PSTN line to ring on a certain line. That's why Patton configured the 4112 FXO gateway as two different gateways as far as the 3CX is concerned. One is 5060 the other is 5062. So how do we get a certain gateway to a certain line button on the Fanvil phones, or is it hopeless with 3CX?

    I've tried registering another extension to that phone, but 3CX will not accept a duplicate MAC number. You can't seem to win.
     
    #4 James Talbott, Jan 14, 2018
    Last edited: Jan 14, 2018
  5. lneblett

    lneblett Well-Known Member

    Joined:
    Sep 7, 2010
    Messages:
    2,086
    Likes Received:
    65
    You are making this more complicated than it needs to be. I understand that you have a Patton FXO gateway that has two PSTN lines coming into it and that you have created within 3CX a trunk for each - presumably so that the Patton is not controlling inbound/outbound call handling in a collective manner. Each PSTN resides and operates independently from one another.

    Additionally, you have a multi-account capable Fanvil phone and the desire is to be able to use the single phone and have the first trunk from the Patton ring on one account and then have the 2nd Patton trunk ring on a different phone account.

    The auto provisioning is an issue given your statement about MACs. The 3CX templates are somewhat generic in their appearance in the 3CX provisioning tab. This is because there are simply too many phone makes, models and firmware versions which might require its own custom page. The fields you see in 3CX are the common ones and you will note that the accommodation for a second account on a given phone is not there for any make and model.

    To get around the issue, you can either manually provision the phone as I will indicate below, or you can edit and customize the template and then save with a unique name (in case you need to add more X3 phones later that do not need this). I suggest that you factory reset the phone and Manually Provision using the phone web interface. PS - static and dhcp have nothing to do with it provided the phone is on the same local LAN as 3CX. The phone will apprise 3CX of its address upon registering. Of course, I personally prefer a reserved address or static rather than allowing the phone to be assigned a random IP. I also try and do this and then group the phones into sequential address ranges as it makes managing and possible QoS easier. Manually provisioning will give you a better feel for how the phone and system work and then, if desired, you can go back and see how it relates to modifying a template and do so if desired. Unless you understand the inner-workings first, trying to modify a template could be a problem.

    So.....the phone has two (or more) accounts -
    In 3CX you will create the 2 extensions of interest, say extension 100 and 200 (use whatever extension numbers you like that the system is set to use 2, 3, 4, or 5 digit) and once created, you will use the details in each to populate the above in SIP Line 1 and SIP Line 2 in the phone. I will assume 3 digit extensions and use the above settings as well as reference all system extension in the same 3 digit format. If you have set-up something different, you will then need to modify to your settings accordingly. I will mark the system extensions with a "^", so you know which ones you may need to change to meet your extension length.

    Get into the phone web interface and go to VoIP where you will be able to select the desired lines - SIP 1 and SIP 2. The fields that show up are simply the fields used to establish an identity, tell the phone what is needed to get to 3CX and are used to register and authenticate with 3CX. They can be the same, or they can be different, but from a 3CX perspective they form extensions and in your case they will be the different extensions of 100 and 200. You need 5 pieces of info for each line - user ID (extension number) AuthID (as taken from the extension settings in 3CX), password (also from 3CX), the server IP/FQDN (3CX server) and the port which will be 5060 for BOTH LINES. Once into the phone, enter in the info for extension 100 in SIP line 1 and then enter extension 200's info into SIP line 2. In the Advanced SIP page for SIP line 1 scroll down until you see local port and enter in 5060 and then for SIP line 2 local port enter in 5062. On the same page, look for MWI number and input the voice mail extension number 999^ into the field for both lines. This will allow you to use the phone's button to access VM, but you will need to select the line key first so that when pressed, 3CX will know if the request is for extension 100 or 200. The phone will handle the RTP ranges as these can be found in the Network tab service ports. There you will see that the phone has a beginning port and then a range. Just leave these at the defaults.

    Once both accounts have been established, applied or saved and made active, the phone should register to 3CX and both extensions (100 and 200) should be shown as up (registered) extensions. You should now be able to dial *777^ using either line key on the phone and see in the active call section of 3CX which extension is making the call. You should also be able to speak into the handset and get an echo of what you said. If so, the phone is functional.

    Once the phone is up, get into the 3CX management console and go to SIP Trunks. Here you should see your Patton gateway trunks. Edit the first trunk and scroll down until you see "Route Call To" and then populate the fields with the extension 100 or 200, whichever is desired, for the desired conditions/options. Do the same for the Patton's 2nd trunk and route to the other extension.

    Assuming you do indeed have the trunks set individually and that they are functional as such, and that the phone company is not doing any busy forwarding (rollover) on either telephone line, then when a call comes into trunk 1, it will ring the extension you set in the route for same, just as trunk 2 will do for the extension there.

    You should then go to outbound rules and set extension 100 to use its trunk and then again do the same for extension 200. This will insure that on outbound calls, each extension will have the correct caller-id association as the phone company most likely controls this rather than 3CX (if in the US).
     
  6. James Talbott

    Joined:
    Dec 27, 2017
    Messages:
    21
    Likes Received:
    0
    I really appreciate your detailed response, and from what I think you are saying is that I can add an extension and leave it as a 3CX client and not use the pull down menu as that menu is actually the phone template that does not work and I don't need. I think you have lifted a major misunderstanding that I had about how the system works. Then I can just fill everything I need on the phone web page. WOW! Thanks. For some reason I thought you had to select a phone and that the 3CX client was only for remotely provisioned phones, like cell phones. I presume I do change the phone type from Softphone to IP Phone or do I just leave it at the Softphone default.

    In regards to the phone settings the only thing I am not clear on is your comments on the MWI settings and putting them into both lines. The Fanvil does have a "voice mail number" under advanced setting and it seems to cover both lines. I'll check it out and let you know.

    I have to be gone all day tomorrow and I'll try to get this done today, but if you don't hear back from me for a couple days you can be sure I'll get back to you to let you know the outcome now that you have cleared up my misunderstanding of the system.
     
  7. James Talbott

    Joined:
    Dec 27, 2017
    Messages:
    21
    Likes Received:
    0
    Of course, one other thing. The Fanvil has a global SIP port setting and you can't change it for one or the other. If you change it, it changes for both. However each SIP page does have a SIP proxy server port and an outbound proxy server port field that you can change for each SIP. I'll see if changing this is the equivalent of your "local port."
     
  8. lneblett

    lneblett Well-Known Member

    Joined:
    Sep 7, 2010
    Messages:
    2,086
    Likes Received:
    65
    It is not the same thing. So, in the advanced page for the LINE in the phone, set specific server type to 3CX. Leave the proxy port to 5060 for both
     
  9. Rob24h

    Joined:
    Mar 20, 2017
    Messages:
    85
    Likes Received:
    6
    Is it true that when provisioing the Fanvil from 3CX the first 2 BLF buttons are reserved for MWI and headset? And if yes, is this something that can be changed?
     
  10. lneblett

    lneblett Well-Known Member

    Joined:
    Sep 7, 2010
    Messages:
    2,086
    Likes Received:
    65
    That is the default, and yes they can be changed. Download the user manual from www.fanvil.com
     
  11. datamerge

    datamerge New Member

    Joined:
    Nov 19, 2014
    Messages:
    181
    Likes Received:
    25
    It does depend on the model. The X4 does this, but the X6 has dedicated buttons for MWI and headset so all 12 buttons (x 2 pages) are free for your use.
     
    YiannisH_3CX likes this.
  12. narkumas

    narkumas New Member

    Joined:
    Nov 28, 2016
    Messages:
    227
    Likes Received:
    29
    It is also default by 3CX, because the MWI and Headset are set by the 3CX provisioning file.
    And they are annoying. I have spent some time in changing the provisioning file (You have to shift every single BLF entry down 2 steps). But when the provisioning files are replaced by an update all the work was useless.
    Since the X4 has a main display with softkeys the MWI and Headset Keys should be placed there instead of the BLF display.

    I already made a change request, but iiieeeeeeehh! Not enough supporters!
    Vote:
    https://www.3cx.com/community/threads/stop-waste-of-blf-keys-on-deskphones.51051/
     
  13. James Talbott

    Joined:
    Dec 27, 2017
    Messages:
    21
    Likes Received:
    0
    lneblett-

    Just wanted to let you know that everything worked as you said it would. Thanks for all of your help and if I ever get to Texas I'll let you know and maybe we can meet. Let me know if you get East although I do tend to spend the winters in SoCal.

    Thanks again. You were right. Just dump the templates and provision them manually.
     
  14. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    7,400
    Likes Received:
    535
    Glad to see the issue has been resolved.
     
Thread Status:
Not open for further replies.