Manual of install PiTDM module

PiTDM Module hardware installation

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

FXO_2

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

IMG_7115

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

IMG_7122

The finally looks like below

IMG_7117

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-v103.img.tar.gz in here (switchpi-tdm-v101/2.img.tar.gz is EOL, please use v103). The switchpi-tdm firmware currently version is 1.0.3, 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.

SD

root@pitdm:~/pitdm# tar zxvf switchpi-tdm-v103.img.tar.gz switchpi-tdm-v1.img root@sipcap:~/pitdm#
root@sipcap:~/pitdm# dd if=switchpi-tdm-v103.img of=/dev/sdb bs=4M
1895+0 records in
1895+0 records out
7948206080 bytes (7.9 GB) copied, 1004.1 s, 7.9 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

IMG_7118

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 !!!

IMG_7119

The default IP address is 192.168.5.68, 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

PiTDM

The console login username and password same to SSH which is pi and pi.

The firmware will automatically detect you installed FXO or FXS modules and configure them. There is 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@192.168.5.68
The authenticity of host '192.168.5.68 (192.168.5.68)' 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 '192.168.5.68' (ECDSA) to the list of known hosts.
pi@192.168.5.68'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 192.168.5.18

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 dahdi_genconf 
pi@raspberrypi:~ $ sudo dahdi_scan 
[1]
active=yes
alarms=OK
description=Raspberry PiTDM FXS/FXO Board 5
name=PITDM/4
manufacturer=SwitchPi.com
devicetype=Raspberry PiTDM FXS/FXO
location=BCM2835 Bus 01 Slot 01
basechan=1
totchans=4
irq=0
type=analog
port=1,FXO
port=2,FXO
port=3,FXO
port=4,FXO
pi@raspberrypi:~ $ sudo dahdi_cfg -vv
DAHDI Tools Version - 2.11.0
DAHDI Version: 2.11.0
Echo Canceller(s): 
Configuration
======================
Channel map:
Channel 01: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01)
Channel 02: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02)
Channel 03: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 03)
Channel 04: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 04)
4 channels to configure.
Setting echocan for channel 1 to mg2
Setting echocan for channel 2 to mg2
Setting echocan for channel 3 to mg2
Setting echocan for channel 4 to mg2
*CLI> dahdi show channels 
   Chan Extension       Context         Language   MOH Interpret        Blocked    In Service Description                     
 pseudo                 default                    default                         Yes                                        
      1                 from-pstn                  default                         Yes                                        
      2                 from-pstn                  default                         Yes                                        
      3                 from-pstn                  default                         Yes                                        
      4                 from-pstn                  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.

ports

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

raspberrypi*CLI> 
    -- 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')
raspberrypi*CLI>

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 to 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 192.168.5.18:64128
       > Saved useragent "X-Lite release 5.0.3 stamp 88253" for peer 6000
    -- Unregistered SIP '6000'
    -- Registered SIP '6000' at 192.168.5.18:64128
  == 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 192.168.5.18:54806

For more PiTDM specification please check this link out.

Go here to order a PiTDM module now!

Warning!

Few customers reported that the PiTDM module might have the poor voice(receive) on PI 3+, we would like you to use this module on PI2 B (Released in February 2015[27]) first. 

 

Leave a Reply

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

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s