Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Generating Captive Portal Vouchers

    Scheduled Pinned Locked Moved Captive Portal
    11 Posts 7 Posters 16.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      cmb
      last edited by

      from this voucher.c
      https://github.com/bsdperimeter/pfsense-tools/blob/master/pfPorts/voucher/files/voucher.c

      1 Reply Last reply Reply Quote 0
      • J
        jpardobl
        last edited by

        I have developed a REST API to create, delete and retrieve vouchers. All the info is at this link http://jpardobl.wordpress.com/2012/11/28/pfsense-voucher-rest-api/

        1 Reply Last reply Reply Quote 0
        • D
          dhatz
          last edited by

          @jpardobl:

          I have developed a REST API to create, delete and retrieve vouchers.

          Good work, however it solves a different problem (that of not having to give webGUI access) than what the original poster asked for.

          The original post asked for something similar to the commercial offerings which come with a thermal printer and print out one voucher at a time e.g. Zyxel N-4100.

          1 Reply Last reply Reply Quote 0
          • D
            dhatz
            last edited by

            @jpardobl:

            I have developed a REST API to create, delete and retrieve vouchers. All the info is at this link http://jpardobl.wordpress.com/2012/11/28/pfsense-voucher-rest-api/

            Javier, it occurred to me that your idea of a pfsense REST API could be applied in other ways, e.g. to remove stale states (probably the most commonly raised VoIP issue in the NAT subforum) e.g. Elastix has a "Monitor Trunk Failures" feature that allows you to invoke an custom AGI script.

            1 Reply Last reply Reply Quote 0
            • W
              wifimasters
              last edited by

              any of you guys knows an on-demand printer for the vouchers? example, a front desk staff would just press the button in the printer and it will generates the voucher.

              kind regards

              1 Reply Last reply Reply Quote 0
              • T
                twibowo
                last edited by

                Hi Guys,

                Is there any best practice on how to retrieve the vouchers?
                Considering that the operator/receptionist may not be technical people.
                How do you guys usually collect the vouchers code and then distribute it?

                Thanks! :)

                1 Reply Last reply Reply Quote 0
                • O
                  onlineph
                  last edited by

                  in our experience, after generating the code, we download it as csv file, open and save-as excell, we created a template, ticket-like, have used the 3 column feature in the MS word, populate it with tables and copy pasted the codes. So we had codes in each box, have it printed. Well I got 33 vouchers in an A4, had it cut manually and bundled it like "money" and ready for disposal. No more printed standing-by.

                  I know it's kind of old school preparation but it worked for us.

                  1 Reply Last reply Reply Quote 0
                  • T
                    twibowo
                    last edited by

                    Hi Guys,

                    How to generate random list of vouchers code?

                    The objective is actually to generate random vouchers periodically.
                    But it seems that every time I click the blue button (attached screenshot) the list of the voucher is always the same.
                    Is this the expected behavior?

                    If it is expected behavior, so we just have to keep reusing the same list of vouchers?

                    Please help :)

                    Thanks!

                    Services-Captive_portal-Vouchers.jpg
                    Services-Captive_portal-Vouchers.jpg_thumb

                    1 Reply Last reply Reply Quote 0
                    • O
                      onlineph
                      last edited by

                      in pfsense, once a voucher is expired, you can no longer re-use it. From your attachment you only created 100 tickets. Well we can create upto 1023 of tickets so you no longer worry to have a random. The blue one is a download button. It only downloads a copy of the generated vouchers. So if you already maxed out your tickers, all you need to do is to generate another roll. Instead of the blue button, click the |+| button instead and generate upto 1023 numbers of tickets.

                      1 Reply Last reply Reply Quote 0
                      • T
                        twibowo
                        last edited by

                        Thanks Bro onlineph for the clear explanation. :)
                        So I think we have to manually add new Roll, everytime the tickets runs out.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.