Ctr21 Standard

Ctr21 Standard

  • Post Author:
  • Post Category:Wholesale Voice
  • Post last modified:June 29, 2020

UK Caller-id on X100P SE, Ctr21 Standard

 

Intro

I desired to use an X100P SE to incorporate my united kingdom property line together with my PBX, ctr21 standard. The intent with this guide would be to record the setup changes built. And talk about the discovery of caller identification working with this card first.

 

Webpage Contents

Components

Program

Setup

/etc/dahdi/genconf_parameters

Crank out config documents

/etc/dahdi/system. Conf

dialogue

Polarity discovery through SDO

Polarity discovery through Ring Pins (RDTP along with RDTN)

Got-Cha’s

Background buffer patch

asterisk-1.6.1.10-x100p-uk-callerid-usehist. Patch

This variant fixes formatting topics previously and upgrades such as Asterisk 1.6.2.11

dahdi-linux-2.2.0.2-x100p-uk-callerid-usehist. Patch

This variant fixes formatting topics previously mentioned and upgrades to get Dahdi variation 2.3.0.1+2.3.0

listed here will be the alterations to Dahdi 2.6.1+2.6.1 along with Asterisk 11.2.1

Dahdi 2.6.1+2.6.1

Asterisk 11.2.1

On-Hook Line observe (ONHM)

Impedance fitting

References

components

True X100P SE’Wild Card’ bought Sep 09

 

Pc software

dahdi-linux-2.2.0.2

dahdi-tools-2.2.0

 

asterisk-1.4.26.2

asterisk-addons-1.4.9

 

freepbx-2.5.2

 

I’ve upgraded the repairs beneath to comprise Dahdi 2.6.1+2.6.1 and also Asterisk 11.2.1

 

Setup

The appropriate modules ended up mechanically loaded and also the proper time origin mechanically selected by way of the dahdi in it script, ctr21 standard. Even the wcfxo module manages that the si3034 chip-set utilized from the X100P SE, in addition, it manages other very similar chipsets and cards.

 

/ / etc/dahdi/genconf_parameters

Lc_country              United Kingdom 

Context_lines           from-zaptel

freepbx                 indeed 

Instantly you might need to uncomment the subsequent point touse the oslec replicate canceller

 

Echo_can                oslec

Crank out config documents

dahdi_genconf method chandahdi=verbose

This ought to make /etc/dahdi/system. Conf and etc/asterisk/dahdi-channels. cons

 

/etc/dahdi/system. conf

# If you edit this document and also implement /usr/sbin/dahdi_genconf again, then # your handbook improvements will probably undoubtedly be misplaced. # Dahdi Configuration File # # This document is parsed from the Dahdi Configurator, respectively dahdi_cfg Number 4 Span inch: WCFXO/0″wild card X100P Board inch” (grasp ) fxsks=inch echocanceller=mg2,1 # Worldwide statistics loadzone = uk defaultzone = uk

/etc/asterisk/dahdi-channels. conf

; Auto-generated by /usr/sbin/dahdi_genconf on Wed Sep 2-3 20:58:21 2009

; Should you edit the document and also implement /usr/sbin/dahdi_genconf back,; the manual improvements will probably undoubtedly be misplaced.

  Conf);

nonetheless; This really isn’t designed to become an entire chan_dahdi. conf.  Instead, it’s thought; yet to become #include-f /etc/chan_dahdi.conf that’ll incorporate the worldwide configurations;

 

nonetheless; Span inch: WCFXO/0″wild card X100P Board inch” (grasp );nonetheless;; lineup =”inch WCFXO/0/0 FXSKS  (SWEC: MG2)”

signalling=fxs_ks

callerid=asreceived

group=0

circumstance =from-zaptel

channel =# inch caller-id =

category =

circumstance =default option 

/etc/asterisk/chan_dahdi.conf

;# Flash Operator Panel will display the document to get dahdi backward buttons

;# 4 AMPLABEL is going to be properly used for your own display tags around the switches;# 5 percent do Dahdi Channel variety;# 5 percent n Line amount;# 5 percent N Line amount, however counter counter;# 5 illustration:;# 5;AMPLABEL:Channel%do – Button percent ;# 5 For Dahdi/* switches make use of exactly the subsequent;# 1 (where x=quantity of switches into dislpay);# 5;AMPWILDCARDLABEL(x):MyLabel

 

[channels]

language=en

usecallerid=certainly cidsignalling=v23

cidstart=polarity  <– In case you’re employing the”usehist” patch cited beneath this should browse cidstart=usehist

faxdetect=no

echotraining=certainly #include dahdi-channels. Conf; comprise dahdi extensions found in FreePBX

#include chan_dahdi_additional. 

Be aware #include dahdi-channels. Conf needs to be inserted to pull on from the config document made by dahdi_genconf,

Even the cidstart placing is special for some settings plus really isn’t the accurate one for your own file buffer patch.   d/dahdi

 

I’ve implemented the patch to TBR21 (complicated impedance for both UK along with many others ) and place opermode=two  to use this.

 

Alternatives wcfxo opermode=two 

or

 

Alternatives wcfxo opermode=two debug# Inch 

for Scrub 

 

/etc/amportal. conf

changed

 

# ZAP2DAHDICOMPAT=authentic |untrue 

into 

 

ZAP2DAHDICOMPAT=authentic 

to empower’Zap Channel DIDs’ to function correctly 

 

Chat 

I believe CID to become a essential attribute and has been ready to find this working together with my own configuration ctr21 standard.  Initially I opted to look into the prospect of incorporating polarity detection into the wcfxo module whilst that the spec sheet to your own si3034 indicated this should be potential.  Following some testing I discovered that two distinct procedures to get polarity detection appear to be to do the job out. 

 

Polarity detection through SDO

Like a very first overhaul I experimented with make use of the info out of your SDO since that has been being used to find the ring sign, ctr21 standard.  I thought it may possibly even be potential to find that the polarity switch for a heartbeat similar to particulars from the shredder which say that info received by your SDO really should vary from cadence together with all the ring hooks that is often utilized to find the exact caller identification polarity shift. 

working method

This has a partly working method promptly, I later on identified the On-Hook Line observe (ONHM) was interfering using this specific approach along with turning off it which makes it do the job faithfully, ctr21 standard.  Battery discovery should become handicapped to create this do the job and also the ONHM should be changed on when attempting to learn the caller id signal and switched away after, ctr21 standard.  Watch below for More Information to the ONHM. 

I am not certain whether that the Ring Detector Total Wave Rectifier should be about by using this system, however, it turned out around within my screening, ctr21 standard.  The discovery was dealing using off it turned, however, the ONHM was on thus I am uncertain in regards to the consequences which revealed some failures.

 

Polarity detection through Ring Pins (RDTP and also RDTN)

The 2nd procedure exerts the ring hooks and also the Ring Detector Total Wave Rectifier that this way is clarified from the specification whilst the advised way along with details just allowing the ONHM for caller identification detection, ctr21 standard.  I accomplished this per specification with all an back off and squelch capabilities.

 

Got Cha’s 

At both of both preceding scenarios you can find instances whenever a fictitious detection may come about, ctr21 standard.  As an instance the station moving on hook i.e. that the OH (Off Twist ) snare being rid soon after a telephone was made/accepted. 

The situation this is the fact that thanks to this method by which in which the CID detection pattern within asterisk performs it’s going to indicate the station inaccessible until the CID detection has been completed possibly via time out or from way ring, ctr21 standard.  This may cause problems such to be powerless to earn a telephone prior to the CID discovery has completed. 

still ringing

The station may likewise not acknowledge the following polarity change if it’s still ringing.  This will happen every time a caller has hung up until the telephone was answered and somebody else earrings straight back until the prior telephone fully occasions outside on this station, ctr21 standard.  The call will fundamentally be recognized while the ring country always toggles on / away because the ring signal is pulsed, no matter how the CID is going to be obstructed because there’s now no solution to ship the info .

 

Heritage buffer patch

Personally, I think that this may be the optimal/optimally way since it should only be dismissed after A-Ring has ever been discovered and also certainly will forbid the aforementioned problems, ctr21 standard.  Further it really is maybe not incompatible with polarity detection and might possibly be toggled on / away making use of a module parameter. 

As clarified inside the BT SIN, polarity change is a event built to activate that the caller’s identification detection circuit, so it’s perhaps not there because of a temporary mark of an in coming telephone or caller identification info and will readily be brought about by several other factors, ctr21 standard.  As a result this scenario is now being medicated wrongly and also a better way would be to make use of the annals buffer (that it sounds has been rejected) or allowing detection over the module somehow.

published for usage

I understand this patch was initially published for usage together with zaptel and asterisk 1.4, however, once I hunted for its asterisk 1.6 along with dahdi variants I really can’t see them ctr21 standard.  They’ve been cited since being submitted on internet sites and so forth or readily available from asterisk.org however that I hunted high and low to no avail.

 

I’ve re worked the stains to do the job contrary to asterisk-1.6.1.10 along with dahdi-linux-2.2.0.2 motorists.  I can not locate any reference to those being confined by book thus they really are ctr21 standard.  Modified by the variant zaptel-142 and also asterisk 141 from Tony.  Out of lusyn.com.  I’d send duplicates into the site, however that I can not locate a contact for Marc.

 

 patch

 

undefined

 

+/* Unit inch */

 

+static int dahdi_get_history(int fd, void *buf, int buf_size)

 

+undefined

 

+/* Attachment 1 finish */

 

static int alloc_sub(struct dahdi_pvt *de, int x)

 

 “allowed”:”disabled”);

 

}

 

+/* co-op temp */

 

static void *ss_thread(void *info )

 

undefined

+/> Co-op 4 */

+ /* Retailer from the background buffer */

+ if(ms->background )

+ undefined

+/* Co-op 4 finish */

 

/> Require the rxc, twiddle it to get calculating should proper and then place it

 

Back */

 

++dahdi-linux-2.2.0.2.modified/include/dahdi/kernel.h 2009-11-25 15:26:35.000000000 +0000

 

Wait_queue_head_t writebufq; /p >! < compose wait queue */

 

Int blocksize; /p >! < Block Measurement /

 

+/> Co-op Inch transferred from user.h */

+              u_char                  *background;            /> Heritage buffer, such as pre-ring Caller-id (DAHDI_HISTORY_BUF_LEN) */

+              u_short                historypos;        /* Latest Place inside buffer */

+/* Unit Inch finish */

 

Int eventinidx;  /p >! < from indicator if buf (round ) */

 

Int eventoutidx;  /p >! < in index if buf (round ) */

 

++dahdi-linux-2.2.0.2.modified/include/dahdi/user.h 2009-11-25 15:31:43.000000000 +0000

@@ -114,6 +114,10 @@

 

specify DAHDI_MAX_NUM_BUFS 3 2 

specify DAHDI_MAX_BUF_SPACE 32768

+/> Co-op Inch */

+#define DAHDI_HISTORY_BUF_LEN            16384 /* String of U-LAW samples */

+/> Co-op Inch finish */

+

 

specify DAHDI_DEFAULT_BLOCKSIZE 10-24 

Establish DAHDI_DEFAULT_MTR_MRU 2048

*  60-80 are earmarked for personal motorists 

 

*  80-85 are earmarked for lively length material 

 

Decision /

 

+/> Co-op 3 currently transferred Here in Order to keep in Line with all amounts previously /

+ /> 

+ * Yield Background buffer

+ */

+#define DAHDI_GET_HISTORY _IOR(DAHDI_CODE, Sixty Six, struct dahdi_history)

+

+/* Gamble 3 finish */

+

+/* Gamble 2 */

+

+typedef struct dahdi_history

+undefined DAHDI_HISTORY;

+/* Co-op Two ending */

 

/*

 

* Produce a lively period 

 

This variant fixes formatting topics previously and upgrades to get Dahdi variant 2.3.0.1+2.3.0

The Writing below must Currently Be okay to”patch -p0″

 

Indicator: include/dahdi/user.h

===================================================================

— include/dahdi/user.h        (re vision 9129)

+++ include/dahdi/user.h        (working copy)

@@ -116,7 +116,10 @@

 #define DAHDI_DEFAULT_NUM_BUFS two #define DAHDI_MAX_NUM_BUFS     3 2 #define DAHDI_MAX_BUF_SPACE    32768

+/* co-op inch */

+#define DAHDI_HISTORY_BUF_LEN       16384 /* rely of u Law samples */

+/* Unit inch ending */

+

 #define DAHDI_DEFAULT_BLOCKSIZE 10-24 #define DAHDI_DEFAULT_MTR_MRU  2048

 

@@ -994,7 +997,22 @@

  2048 60-80 are earmarked for personal motorists *  80-85 are earmarked for lively length material */

+/* Unit 3 currently transferred here in order to keep in line with all amounts over */

+ /*

+ * Yield historical past buffer

+ */

+#define DAHDI_GET_HISTORY _IOR(DAHDI_CODE, sixty six, struct dahdi_history)

+

+/* Unit 3 ending */

+

+/* Unit 2 */

+

+typedef struct dahdi_history

+undefined DAHDI_HISTORY;

+/* Gamble two ending */

 /*

  Create a lively interval */

Indicator: include/dahdi/kernel.h

===================================================================

— include/dahdi/kernel.h      (re vision 9129)

++include/dahdi/kernel.h      (working copy)

@@ -454,6 +454,10 @@

        wait_queue_head_t writebufq; />! < compose wait queue */

 

        int             blocksize;      /p >! < Block Measurement /

+/> Unit Inch transferred here from user.h */

p u_char          *background;       /> Heritage buffer, to get pre-ring Caller-id (DAHDI_HISTORY_BUF_LEN) */

p u_short         historypos;     /* Latest Place inside buffer */

+/* Unit Inch finish */

 

        int             eventinidx;  /*! < from indicator if buf (round ) */

        int             eventoutidx;  /p >! < in index if buf (curved ) */

Indicator: drivers/dahdi/dahdi-base.c

===================================================================

— drivers/dahdi/dahdi-base.c  (re vision 9129)

+++ drivers/dahdi/dahdi-base.c  (working copy)

@@ -958,7 +958,22 @@

        unsigned char *oldrxbuf = NULL;

        Deadly long flags;

        int x;

+/* Yard inch */

+

+       /* Allocate heritage buffer, or maybe.   This possibly mustn’t +        * be all here, nonetheless it truly is practical */

+       if(! )  Blocksize)

+       undefined

+       else

+       undefined

+       ss-p historypos=0;

+

+/p Unit 1 finish */

        /* Assess numbufs */

        should (numbufs < two )

                numbufs = two;

@@ -4654,6 +4669,11 @@

        unsigned long flags;

        int I, j, y, rv;

        int ret, do;

+/* ^ 2 */

+        int k 1, k 2;

+        struct dahdi_history hist;

+/* co-op two ending */

+

        emptiness __consumer * const user_data = (emptiness __consumer )information;

 

        should (! Chan)

@@ -5132,6 +5152,31 @@

                        }

                }

                split;

p /* Unit 3 */

p instance DAHDI_GET_HISTORY:

p should (copy_from_user(&hist,(struct dahdi_history *) info,sizeof(hist)))

+        return -EIO;

+

+        if (! )   Chan->heritage ) return -EINVAL;

+        j=hist.len;

p k 1 =DAHDI_HISTORY_BUF_LEN-chan-p historypos;

+        k 2 =chan-p historypos;

+        if(j>0 && k 1 >0)

+        undefined

+        if(j>0 && k 2 >0)

+        undefined

+        /* Likely if maintain j==0 */

+        break;

+/* Unit 3 ending */ / default:

                /* Assess for shared ioctl’s and confidential kinds */

                rv = dahdi_common_ioctl(document, cmd, information, device );

@@ -7265,6 +7310,17 @@

                memcpy(ms->putraw, rxb, DAHDI_CHUNKSIZE);

        }

 

+/* Unit 4 */

+       /* Shop from the annals buffer */

+       if(ms->heritage )

+       undefined

+/p section 4 ending */

+

        /* Require the rxc, twiddle it to get calculating when acceptable and also put back it */

        if ((! )  Ms->confmute &&! Ms->afterdialingtimer) ||

 

listed here will be the fluctuations to Dahdi 2.6.1+2.6.1 along with Asterisk 11.2.1Dahdi 2.6.1+2.6.1

 

Indicator: linux/drivers/dahdi/dahdi-base.c

===================================================================

— linux/drivers/dahdi/dahdi-base.c    (re vision 10725)

+++ linux/drivers/dahdi/dahdi-base.c    (working copy)

@@ -1073,6 +1073,24 @@

        unsigned long flags;

        int x;

 

+/* Unit inch */

+

+       /* Allocate heritage buffer, or even maybe.   This possibly mustn’t +        * be all here, nonetheless it truly is practical */

+       if(! )  Blocksize)

+       undefined

+       else

+       undefined

+       ss->historypos=0;

+

+/p Unit 1 finish */

p +

        /* Assess numbufs */

        should (numbufs < two )

                numbufs = two;

@@ -5680,6 +5698,13 @@

        } pile;

        Deadly long flags;

        int I, j, rv;

+

+/* Unit 2 */

+        int k 1, k 2;

+        struct dahdi_history hist;

+/* co-op two ending */

+

+

        void __consumer * const user_data = (emptiness __consumer )information;

 

        should (! Chan)

@@ -5917,6 +5942,33 @@

                        }

                }

                split;

p +/p Unit 3 */

p instance DAHDI_GET_HISTORY:

p should (copy_from_user(&hist,(struct dahdi_history *) info,sizeof(hist)))

+        return -EIO;

+

+        if (! )   Chan->heritage ) return -EINVAL;

+        j=hist.len;

p k 1 =DAHDI_HISTORY_BUF_LEN-chan-p historypos;

+        k 2 =chan-p historypos;

+        if(j>0 && k 1 >0)

+        undefined

+        if(j>0 && k 2 >0)

+        undefined

+        /* Likely if maintain j==0 */

+        break;

+/* Unit 3 ending */

+

        default:

                /* Assess for shared ioctl’s and confidential kinds */

                rv = dahdi_common_ioctl(document, cmd, info );

@@ -8521,6 +8573,18 @@

                memcpy(ms->putraw, rxb, DAHDI_CHUNKSIZE);

        }

 

+/* Unit 4 */

+       /* Shop from the annals buffer */

+       if(ms->heritage )

+       undefined

+/p section 4 ending */

+

+

        /* Require the rxc, twiddle it to get calculating when acceptable and also put back it */

        if ((! )  Ms->confmute &&! Ms-p afterdialingtimer) || is_pseudo_chan(ms)) {

Indicator: linux/include/dahdi/user.h

===================================================================

— linux/include/dahdi/user.h  (re vision 10725)

+++ linux/include/dahdi/user.h  (working copy)

@@ -118,6 +118,11 @@

 #define DAHDI_MAX_NUM_BUFS     3 2 #define DAHDI_MAX_BUF_SPACE    32768

 

+/32 Gamble inch */ / +#define DAHDI_HISTORY_BUF_LEN       16384 /* rely of u Law samples */

+/* Attachment 1 finish */

+

+

 #define DAHDI_DEFAULT_BLOCKSIZE 10-24 #define DAHDI_DEFAULT_MTR_MRU  2048

 

@@ -1002,7 +1007,26 @@

  2048 80-85 are earmarked for lively length material */

 

+/* co-op 3 currently transferred here in order to keep in line with amounts over */

+

 /*

+ * Yield historical past buffer

+ */

+#define DAHDI_GET_HISTORY _IOR(DAHDI_CODE, sixty six, struct dahdi_history)

+

+/* Unit 3 ending */

+

+/* Unit 2 */

+

+  typedef struct dahdi_history

+undefined

+ DAHDI_HISTORY;

+/* co-op two ending */

+

+/*

  Create a lively interval */

 struct dahdi_dynamic_span undefined

 

+/> Co-op Inch */

 

+undefined

+/* Co-op Inch finish */

+

 

{

Struct dahdi_pvt *de = pvt;

 

Char *title, *num;

Int indicator = SUB_REAL;

int res;

 

+/* Co-op Two raise buffer size in 256 into 32768 to accommodate background buffer */

+/> unsigned char buf[256]; s /

 

+/* Co-op Two ending */

int flags;

 

* to allow slin style and devote cid sensor.  Get_callerid ought to have the ability to be predicted any range of occasions before 

* a time out does occur or CID is discovered (yields 0).  Returning 1 must function as event acquired, also -1 really should really be 

* a collapse and perish, also coming two signifies no incident had been acquired.  Decision /

+/> Co-op 3a attempt Heritage buffer differently should it neglects telephone see role in first code

+ * To utilize the background suggestion, in /etc/asterisk/chan_dahdi.conf, you also need to put 

+ * cidsignalling=v23; to Find the CID_SIG_V23 code Beneath 

+ * cidstart=ring; to Find this regular known as from the Lack of X100P polarity reversal detection

+ */

 

undefined

+/> Co-op 3b ending */

{if (res < 0) 

If (errno ! )  {= ELAST) 

Ast_log(LOG_WARNING,”examine returned mistake:%sn”, strerror(errno));

 

[vc_row][vc_column][mvc_advanced_button btn_animation=”button–wayra” caption_url=”” btn_text=”GET FREE SERVICES” btn_clr=”#ffffff” btn_icon=”fa fa-envelope-open” btn_url=”url:%2Ffree-services%2F|title:START%20SAVINGS%20WITH%20%2410%20FREE%20TRIAL||”][vc_column_text][/vc_column_text][/vc_column][/vc_row]