[VoIP] ZAPMICRO TDM clone & Pulse Dialling

Ian Jolly ian at uax.org.uk
Thu Feb 28 05:59:24 CST 2008


Problem solved!   

Looks as though the original recompile/make install etc hadn't taken!   

I can now dial lengthy New Zealand numbers and get through to the correct numbers!

Ian 
  ----- Original Message ----- 
  From: Jack Ryan 
  To: Ian Jolly ; Voice Over IP Tandem for Analog Switches 
  Sent: Thursday, February 28, 2008 9:45 AM
  Subject: Re: [VoIP] ZAPMICRO TDM clone & Pulse Dialling


  Ian,

  Here are my thoughts.

  Did the change to the debounce time make any difference. If it made no difference then it is either the wrong driver or the problem is elsewhere.

  If a change was noticed, then for some reason the dial pulses are still being seen as bounce and removed. If slowing the pulse rate increases the detection accuracy the debounce assumption is reinforced.

  Sadly, the way the code is written, halving the debounce time again would make the debounce logic hang. For the purpose of testing, can I suggest:

  1. Use a phone with selectable pulse (LD)/DTMF dialling to reduce the possibility of switch bounce.
  2. Remove the debounce logic altogether

  Save the original file

  There are changes in three places. The red lines are changed, the green bits are the changes. I have used "//" to indicate a comment. I guess the compiler you are using supports it. If it doesn't, you'll have to use the old ones. That is, instead of

         //8 * (4 * 8);

  you will need to use

          /* 8 * (4 * 8); */

  Watch the semicolons and good luck.


    979 static inline void wctdm_proslic_check_hook(struct wctdm *wc, int card)
    980 {
    981   char res;
    982   int hook;
    983 
    984   /* For some reason we have to debounce the
    985      hook detector.  */
    986 
    987   res = wc->reg0shadow[card];
    988   hook = (res & 1);
    989   if (hook != wc->mod[card].fxs.lastrxhook) {
    990     /* Reset the debounce (must be multiple of 4ms) */
    991     wc->mod[card].fxs.debounce = 1; //8 * (4 * 8);
    992 #if 0
    993     printk("Resetting debounce card %d hook %d, %d\n", card, hook, wc->mod[card].fxs.debounce);
    994 #endif
    995   //} else {
    996     if (wc->mod[card].fxs.debounce > 0) {
    997       wc->mod[card].fxs.debounce-= 1; //16 * ZT_CHUNKSIZE;
    998 #if 0
    999       printk("Sustaining hook %d, %d\n", hook, wc->mod[card].fxs.debounce);
  1000 #endif
  1001       if (!wc->mod[card].fxs.debounce) {
  1002 #if 0
  1003         printk("Counted down debounce, newhook: %d...\n", hook);
  1004 #endif
  1005         wc->mod[card].fxs.debouncehook = hook;
  1006       }
  1007       if (!wc->mod[card].fxs.oldrxhook && wc->mod[card].fxs.debouncehook) {
  1008         /* Off hook */
  1009 #if 1
  1010         if (debug)
  1011 #endif
  1012           printk("wctdm: Card %d Going off hook\n", card);
  1013         zt_hooksig(&wc->chans[card], ZT_RXSIG_OFFHOOK);
  1014         if (robust)
  1015           wctdm_init_proslic(wc, card, 1, 0, 1);
  1016         wc->mod[card].fxs.oldrxhook = 1;
  1017 
  1018       } else if (wc->mod[card].fxs.oldrxhook && !wc->mod[card].fxs.debouncehook) {
  1019         /* On hook */
  1020 #if 1
  1021         if (debug)
  1022 #endif
  1023           printk("wctdm: Card %d Going on hook\n", card);
  1024         zt_hooksig(&wc->chans[card], ZT_RXSIG_ONHOOK);
  1025         wc->mod[card].fxs.oldrxhook = 0;
  1026       }
  1027     }
  1028   }
  1029   wc->mod[card].fxs.lastrxhook = hook;
  1030 }
   

  Jack


More information about the VoIP mailing list