[Asterisk-Users] DNID Digits - Australia

Adam Goryachev mailinglists at websitemanagers.com.au
Wed Apr 14 01:05:24 MST 2004


replying to my own message, but I notice the following in chan_zap.c
starting line 6276:
          /* If immediate=yes go to s|1 */
          if (pri->pvt[chan]->immediate) {
            if (option_verbose > 2)
              ast_verbose(VERBOSE_PREFIX_3 "Going to extension s|1
because of immediate=yes\n");
            strcpy(pri->pvt[chan]->exten, "s");
          }
          /* Get called number */
          else if (strlen(e->ring.callednum)) {
#ifndef PRI_COPY_DIGITS_CALLED_NUMBER
#error Please update the libpri package
#endif
            if (e->e==PRI_EVENT_RING)
              strncpy(pri->pvt[chan]->exten, e->ring.callednum,
sizeof(pri->pvt[chan]->exten)-1);
            else
              strncat(pri->pvt[chan]->exten, e->ring.callednum,
sizeof(pri->pvt[chan]->exten)-1);
            strncpy(pri->pvt[chan]->dnid, e->ring.callednum,
sizeof(pri->pvt[chan]->dnid));
          }
#if 0           else
            strcpy(pri->pvt[chan]->exten, "s"); #endif
          else
            strcpy(pri->pvt[chan]->exten, "");

So, it seems the answer is to use immediate => no.

I've tested it all, and that was indeed the solution. Of course, I am
now missing the ability to make the 'defualt' go to the s extension. ie,
calls arriving with DNID 83040033 are given  a number unavailable tone,
or sometimes a recorded message. Is there some way to specify that the s
extension is a catchall if there is no specific match for DNID's?

Maybe I'll take another foray into the source...

Regards,
Adam

-- 
 -- 
Adam Goryachev
Website Managers
Ph:  +61 2 9345 4395                        adam at websitemanagers.com.au
Fax: +61 2 9345 4396                        www.websitemanagers.com.au




More information about the asterisk-users mailing list