Author Topic: X100P  (Read 3809 times)

joerod

  • Guru
  • ****
  • Posts: 159
    • View Profile
X100P
« on: December 18, 2013, 04:54:12 am »
Before I get start I just want to clarify why I'm using an X100P card instead of a SIP provider...

My cable company gave me a free phone line that I have no use for, so why not connect it to dcerouter.


OK, I'm trying to compile information on how to get my X100P card I purchased from http://x100p.com/products/FXO.php last week.  I started a wiki page http://wiki.linuxmce.org/index.php/X100P where I will documenting the process. I would greatly appreciate any help from the linuxmce gods. 

ATM, I have only installed the Dahdi package and ran dahdi_genconf.  I have noticed that lspci does say something is connected and dahdi_hardware seems to like the card, but thats as far as Ive gotten.

Thanks.

joerod

  • Guru
  • ****
  • Posts: 159
    • View Profile
Re: X100P
« Reply #1 on: December 18, 2013, 08:37:31 pm »
once dahdi was installed I had to add the driver to /etc/dahdi/modules file: for the X100P card the driver name was: wcfxo
then restarted dahdi: service dahdi restart
then I noticed in dmesg that the correct module was installed for the card that showed lspci
then I ran dahdi_cfg and dahdi_genconf
it generated the correct configuration files for both dahdi and asterisk, but asterisk did not have the dahdi modules installed so I ran: apt-get install asterisk-dahdi and then uncommented the dahdi module from /etc/asterisk/modules.conf
I then created a /etc/asterisk/chan_dahdi.conf file with the contents of the previously mentioned zapata.conf file.
I restarted asterisk and connected to the console using asterisk -vvvvr
and typing dahdi show channels I can see my card. I can also execute dahdi_tool and see my card.

--------

how do I set my card as the out route now that freebpx isnt available?

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: X100P
« Reply #2 on: December 18, 2013, 10:52:57 pm »
All of that happens now in the asterisk database in mysql, using the res_mysql module. You may want to talk to foxi352.

-Thom

joerod

  • Guru
  • ****
  • Posts: 159
    • View Profile
Re: X100P
« Reply #3 on: December 21, 2013, 06:09:48 pm »
Ok, I got it working and from I can tell its working the way its suppose to (no crazy hacks, but yes I had to change code). I will try to document it as best I can in wiki http://wiki.linuxmce.org/index.php/X100P and will try to comunicate with developers to get this committed, but here what I did:

/var/www/lmce-admin/operations/phones/phoneLines.php
Line: 24 (REPLACE):
Code: [Select]
$ProtocolList=array('SIP','IAX','SPA','GTALK','DAHDI');
Line: 106 (REPLACE):
Code: [Select]
<td><B>'.translate('TEXT_HOST_CONST').' / Channel *</B></td>
/usr/pluto/bin/db_phone_config.sh
Line: 366 (APPEND):
Code: [Select]
        elif [[ $protocol == "DAHDI" ]]; then
                LINESSQL="$LINESSQL INSERT INTO $DB_Extensions_Table (context,exten,priority,app,appdata) VALUES \
                ('$context','_$prefix.','1','Macro','dialout-trunk,$protocol/$host,+\${EXTEN}:1},,'),\
                ('$context','_$prefix.','2','Macro','outisbusy,');"
Lines: 382-387 (REPLACE):
Code: [Select]
        context="from-trunk-$phonenumber"
        LINESSQL="$LINESSQL DELETE FROM $DB_Extensions_Table WHERE context like '$context';"

        if [[ $protocol == "DAHDI" ]]; then
                LINESSQL="$LINESSQL INSERT INTO $DB_Extensions_Table (context,exten,priority,app,appdata) VALUES \
                ('$context','_.','1','Set','GROUP()=OUT_$LineCounter'), \
                ('$context','_.','2','Goto','from-trunk,$phonenumber,1');"
        else
                LINESSQL="$LINESSQL INSERT INTO $DB_Extensions_Table (context,exten,priority,app,appdata) VALUES \
                ('$context','_.','1','Set','GROUP()=OUT_$LineCounter'), \
                ('$context','_.','2','Goto','from-trunk,\${EXTEN},1');"
        fi

After the configure/installation of DAHDI and /etc/asterisk/chan_dahdi.conf I can access Phone Lines from web admin and add a new FX0 trunk.