Manual of install PiTDM module

PiTDM Module hardware installation

Install the FXS or FXO modules to PiTDM module as below picture shows


Insert the PiTDM module to a Raspberry Pi 2 or 3 board like below picture shows


We provide 4 plastic screws, use them to fix the PiTDM board to Raspberry Pi board such as below shows


The finally looks like below


Until now, the PiTDM module installation is done, let us move to software installation.

PiTDM Module software installation

Go to the SwitchPi official website download the switchpi tdm firmware – switchpi-tdm-v102.img.tar.gz in here (switchpi-tdm-v101.img.tar.gz is EOL, please use v102). The switchpi-tdm firmware currently version is 1.0.2, built-in Asterisk-13.17.1 and Dahdi-2.11.0.

Put the downloaded firmware to a Linux distro PC, then following below steps to clone it to an 8G SD card (we strongly suggested to use a class 10 HC SD card such as below SanDisk one), insert micro SD card to your PC with a USB SD card adaptor, the Linux will recognized it like /dev/sda or /dev/sdb which depends on your OS how many drives, you can check it out with command “dmesg”, we are using the /dev/sdb in here.


root@pitdm:~/pitdm# ls -l
total 1849476
-rw-r--r-- 1 root root 1893858236 Jan 11 18:46 switchpi-tdm-v101.img.tar.gz
root@pitdm:~/pitdm# tar zxvf switchpi-tdm-v101.img.tar.gz
root@sipcap:~/pitdm# dd if=switchpi-tdm-v102.img of=/dev/sdb bs=4M
1024+0 records in
1024+0 records out
4294967296 bytes (4.3 GB) copied, 606.742 s, 7.1 MB/s


Remove the SD card from Linux PC and insert it to your Raspberry Pi 2/3 board, plug the 12V 1A power supply which is with your PiTDM module together when you received your order as below shows


Please pay attention in here, as our PiTDM will feeding your Raspberry Pi power as well, thus you DO NOT need to require to insert the Raspberry Pi USB DC power supply anymore !!!


The default IP address is, you can ssh log into it with username “pi”, password “pi”. We also provide the serial console login your Raspberry Pi, please connect your serial cable like below picture shows, the terminal parameters is 115200/8/n1


The console login username and password same to SSH.

The firmware will automatically detect you installed FXO or FXS modules and configure them. There are few demonstrations Asterisk extension script which we configured you can use it directly to make a first call or test, here are the steps.

root@pitdm:~/pitdm# ssh pi@
The authenticity of host ' (' can't be established.
ECDSA key fingerprint is 68:47:f0:e8:c9:48:a4:4c:8b:aa:27:9f:2xxxxxxxxxx.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '' (ECDSA) to the list of known hosts.
pi@'s password:
Linux raspberrypi 4.9.53-v7+ #1 SMP Mon Oct 9 10:28:56 UTC 2017 armv7l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Nov 25 14:28:53 2017 from

pi@raspberrypi:~ $ dmesg
[ 7.168609] Module 0: Installed -- AUTO FXS/DPO
[ 9.418584] Module 1: Installed -- AUTO FXS/DPO
[ 11.468594] Module 2: Installed -- AUTO FXS/DPO
[ 13.638572] Module 3: Installed -- AUTO FXS/DPO
[ 13.638584] Found a Wildcard TDM: Raspberry PiTDM FXS/FXO (4 modules)

pi@raspberrypi:~ $ sudo asterisk -cvvvvvvvvvgr

Asterisk 13.17.1, Copyright (C) 1999 - 2014, Digium, Inc. and others.

Created by Mark Spencer <>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
Connected to Asterisk 13.17.1 currently running on raspberrypi (pid = 411)

raspberrypi*CLI> dahdi show status 
Description Alarms IRQ bpviol CRC Fra Codi Options LBO
Raspberry PiTDM FXS/FXO Board 5 OK 0 0 0 CAS Unk 0 db (CSU)/0-133 feet (DSX-1)

raspberrypi*CLI> dahdi show channels 
Chan Extension Context Language MOH Interpret Blocked In Service Description 
pseudo default default Yes 
1 from-internal default Yes 
2 from-internal default Yes 
3 from-internal default Yes 
4 from-internal default Yes

As we installed 2 dual ports FXS modules in this examples, you can see there are 4 ports were recognized by Asterisk. Now you can make a call to test, insert your FXS phone cable to one of 4 ports of PiTDM module as below picture shows port1 to port 4 location.


Then dial extension 6000, you will hear the Asterisk welcome demo-instruct voice out from the phone.

    -- Starting simple switch on 'DAHDI/1-1'
    -- Executing [6000@from-internal:1] Answer("DAHDI/1-1", "") in new stack
    -- Executing [6000@from-internal:2] Playback("DAHDI/1-1", "demo-instruct") in new stack
    -- <DAHDI/1-1> Playing 'demo-instruct.gsm' (language 'en')

Or you can use a SIP phone to register to the Asterisk with username 6000 and secret 6000, and try dial extension 6000 (or you can check the sip.conf out for how to add a SIP phone), please be noticed, this test requires you connect your FXS phone to port 3 of PiTDM module.

Connected to Asterisk 13.17.1 currently running on raspberrypi (pid = 411)
    -- Registered SIP '6000' at
       > Saved useragent "X-Lite release 5.0.3 stamp 88253" for peer 6000
    -- Unregistered SIP '6000'
    -- Registered SIP '6000' at
  == Using SIP RTP CoS mark 5
    -- Executing [6000@sipphone:1] Set("SIP/6000-00000001", "whoHungUp=CALLER") in new stack
    -- Executing [6000@sipphone:2] Dial("SIP/6000-00000001", "dahdi/3/6000,,g") in new stack
    -- Called dahdi/3/6000
    -- DAHDI/3-1 is ringing
    -- DAHDI/3-1 is ringing
    -- DAHDI/3-1 answered SIP/6000-00000001
    -- Channel DAHDI/3-1 joined 'simple_bridge' basic-bridge <b62863bd-8daf-4932-a971-bd963fcaa562>
    -- Channel SIP/6000-00000001 joined 'simple_bridge' basic-bridge <b62863bd-8daf-4932-a971-bd963fcaa562>
       > 0x743f9250 -- Probation passed - setting RTP source address to

For more PiTDM specification please check this link out.

Go here to order a PiTDM module now!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s