File doorpi.ini: what is the minimum content

  • Hello everyone,

    I will appreciate Doorpi when it will work. At the moment this is not the case.

    For my tests, I installed doorpi in pypi mode on my raspberry pi 3. I put a
    button on the pin 11 (gpio17) and a usb audio adapter with a microphone and
    an earphone.

    My problem is I do not know what to minimize initialize in the file doorpi.ini
    so that Doorpi works when I press the doorbell button.

    I have a "livebox play" from the access provider ORANGE (french).
    I do not have a fritzbox. Can Doorpi work with a livebox?

    Can anyone help me to start Doorpi with the technical minimum to put in the
    file doorpi.ini?

    Thanks in advance.


  • Hello Streicher,

    Thank you for your help.

    I installed Asterisk on my Raspberry pi3 with the command:
    Sudo apt-get install asterisk

    That's ok: I can start Asterisk (by start) and stopped (by stop)
    Then I can go into its CLI console ... etc.

    I saw that there were 3 important files in Asterisk:
    Sip.conf, users.conf and extensions.conf

    My first question is basic: these 3 files already contain code.
    To put my own code, should the existing code be deleted
    Or insert my parameters at the end of these files?

    Thank you in advance. Cordially.


  • Hello,

    you need to edit/add your configuration to the files.

    Here some example of my asterisk and doorpi configuration.

    I added in sip.conf at the end:

    My extesions.conf looks like:

    I did not change users.conf

    My doorpi.ini:

    Calls are working fine.
    However, I don't know how to use Video via SIP for the DoorPi with Asterisk.
    If you got it, please let me know.

  • Thank you.

    But you write in sip.conf:
    Permit = /

    IP What is it? (The BOX or the Raspberry that supports asterisk?)
    The iP What is it? (To the subnet mask of the BOX LAN?)

    For my part, I do not have a Piface card: my bell button is connected to the pin11 of the RPI3 GPIO17

    In the file doorpi.ini, you put:
    Sipserver_server =

    The IP corresponds to what? (The Raspberry that supports DoorPI?)

    All these IP's are a bit blurry for me. In the waiting, thank you. Cordially.


  • / is the IP network. Asterisk allows only clients with IPs from this network (192.168.1.x). is the subnetmask (other Notation is /24). is the Asterisk Server and in my case also doorpi itself since I have running both on the Raspi.

  • Good evening,

    I advanced in my project.

    At first, I tested my Asterisk server only (without DoorPi): it works!
    If this interferes with someone here is the procedure.

    Demonstration of the Asterisk server:
    -------------------------------------------------- -----------------------
    - In the sip.conf file, I changed "language = fr" to "language = fr" (because I'm French)
    - In the extensions.conf file, I put at the end of the content you (see above)
    - In the user file (which I use), I put at the end of the content:

    Permit = /
    Type = friend
    Context = phones
    Host = dynamic
    Secret = 12321

    Permit = /
    Type = friend
    Context = phones
    Host = dynamic
    Secret = 12322

    Of which IP is indeed the local address of my Livebox ORANGE
    And its local mask Lan network.

    - On my Android smartphone, I installed CSipSimple where I added an account, such as:
    - Account name: pat
    - User: 22
    - Server: (my server Asterisk)
    - Password: 12322

    - On a PC, I installed linphone for WINDOWS 10 where I initialize
    The SIP account 21@ (my PC) and my contact 22@ (my smartphone)

    - Test:
    - On the smartphone, in CSipSimple, 22 called 21 (on the keyboard), ring on PC, off hook, then on the hook
    => Ok it works!
    - On the PC, in Linphone, 21 called 22, ringing on the smartphone, picked up, talk and then hung up
    => Ok it works!

    - Why did you use the users.conf file? The reason is:
    When we are in the asterisk CLI console, we have with the command:

    * CLI> sip show pairs
    Host name / username Dyn Forcerport Comedia ACL Port Status Description
    21/21 D Auto (No) No A 5060 not monitored
    22/22 D Auto (No) No A 5060 not monitored
    2 sip pairs [Watched: 0 online, 0 online offline: 0 online, 0 online]

    Note: IP addresses 2 are my local addresses of my smartphone ( and my PC (

    And this with the command:

    * CLI> sip show users
    Username secret Accountcode Def.Context ACL Forcerport
    22 12322 phones Yes No
    21 12321 phones Yes No
    * CLI> - Registered SIP '22' at

    We can also see when PC leaves linphone: we have asterisk this:

    * CLI> - not registered SIP '21'

    We see the same thing for the smartphone when we leave CSipSimple: we have asterisk this:

    * CLI> - not registered SIP '22'

    All this verifies that Asterisk works well.

    Now I will continue to add DoorPi.

    Thank you again for your valuable information.

    Sincerely soon.


  • Permit = /

    This is wrong.
    If you mean this host you need to specify /

    If you mean the network (which I guess) you need to specify /

    Maybe Asterisk will correct it by itself, but please change it in your configuration.

  • Excuse me but I do not understand what you want to tell me.
    The fact is that with permit = /, it works.
    These are my local IP of my box and its associated mask.

    You want me to try 192.168.1. 0 / To see?

  • I made the change:

    21 calls 22, it sounds, I pick up, I speak, it's ok and I hang up.
    Conversely, 22 calls 21 and it's the same.

    Conclusion: / or /
    It is the same functioning.

    Why? mystery!

  • Hello,

    Waiting for your reply to my previous message .... I continue the adventure with the file doorpi.ini.

    I look at the content doorpi.ini and the first questions that come to me are:

    - What are the parameters to change? (Which will suit me)

    - In [DoorPiWeb] put: ip =; The asterisk server address?

    - What is used in [EVENT_OnStartup] code 10 = sleep: 1

    - In [onboardpins_InputPins]:
    what is the file /usr/local/etc/DoorPi/scripts/; What address is it?

    - In [EVENT_OnKeyPressed_onboardpins.0], can 10 = call: 21 be changed to 11 = call: 21?
    Because my button on my bell is wired on pin11 (GPIO17)

    - What does this block mean and what are the different parameters?
    Server = ----> server =
    Port = 465 ----> 587?
    Need_login = True
    Username = ---->
    Password = xyz ----> password at my access provider ORANGE
    Use_tls = False
    Use_ssl = True
    From = ----->

    Thanks in advance. Cordially.


  • Hello,

    Waiting for your reply to my previous message .... I continue the adventure with the file doorpi.ini. is correct.
    .1 is wrong. I already wrote it.
    If you don't trust me and for more Information Google "IPv4 subnetmask calculation" or something similar.

    Regarding your other questions, I think you should first read the doorpi documentation and searching in the forum before you ask every configuration line.
    Your questions for the SMTP can nobody answer in this forum. Ask your SMTP Provider if you don't know it.

  • I trust you.

    It's just that by being a beginner, I ask myself questions
    Techniques ... as far as I saw these settings in my Livebox.
    Ok for ipv4 calculation ....

    For the DOORPI documentation, it is very succinct.
    That's why the forum is there to help.

    For my settings, here they are:

    Serveur =
    Port = 587
    Need_login = True
    Username =
    Password = xyz (my email password
    Use_tls = False
    USE_SSL = True
    From =

    The documentation or forum does not address: how to run asterisk versus doorpi?

    For my part, I do this:

    Pi @ raspberrypi: ~ $ sudo /etc/init.d/asterisk start
    [Ok] Starting asterisk (via systemctl): asterisk.service.
    Pi @ raspberrypi: ~ $ sudo /etc/init.d/doorpi start
    [Ok] Starting doorpi (via systemctl): doorpi.service.
    Pi @ raspberrypi: ~ $ sudo doorpi_cli --trace
    2017-02-23 16: 27: 50,598 [INFO] [doorpi.main]
    ___ ___ _
    VoIP Door-Intercomstation with Raspberry Pi
    / / \ / _ \ / _ \ | '__ / / _) / | Version: 2.5.1
    / / _ // (_) | (_) | | / ___ / | | License: CC BY-NC 4.0
    / ___, '\ ___ / \ ___ / | _ | \ / | _ | URL: <>

    .... etc.

    Sqlite3.OperationalError: database is locked
    Pi @ raspberrypi: ~ $

    Is it well I do not know .... apparently: it crashes.



  • Good evening,

    I read the documentation and searched the forum but without success: I do not get away with it.

    When I run:

    Sudo doorpi_cli --trace

    I have this:

    I do not understand my button bell is connected to pin 11 (GPRIO17)
    And my doorpi.ini file is as follows:

    Where is the problem?

    Can someone help me. Thank you.



  • I had the same as you a few hours ago, the it indicates pin 17 to 3.3V (where the term GPIO17 is used by mistake ).
    The true GPIO17 is pin 11 according to the documentation of the Raspberry PI3.

    For my part it is the pin 11 named GPIO17 that I use for my pushbutton.

    In the doorpi.ini you sent me in your message (# 4), the pin used is the 10 or the GPIO15.
    Moreover, I do not understand this choice because it is a pin reserved RXD (reception of data) according to the documentation of the Raspberry PI.

    What I seek is the theme of my first message; What is the minimum content to put in the doorpi.ini
    For when a push button mounted on pin 11 is actuated, doorpi calls the number 21.

    Until now I have not managed to make this assembly work.

    On your side, your push button of your doorbell is physically mounted on which pin number (GPIO ??)?

  • Hello,

    I come back to Asterisk I did not know a week ago
    And that I may not have understood everything from A to Z.

    So far, in my message No. 7, I was able to call Asterisk from number 21 to 22
    And vice versa on my local WIFI network.

    Can we do the same in 3G or 4G with asterisk?

    In this case, what should be changed or added to the sip.conf and extensions.conf files to do so?

    Thank you in advance. Cordially.