Hi,
Yet another question, now that I have callerid working correctly, I'm
trying to work out how to utilise the different numbers I have. I have a
100 number range allocated to my E1/PRI/OnRamp service.
My incoming calls are handled like this:
Advertised/published number is an analogue line terminating on a X101P.
If the analog line is busy, it has a call diversion to the PRI on a
TE405P
Whenever I look at a channel while a call is in progress I see something
like this:
Call on the analog line:
-- General --
Name: Zap/125-1
Type: Zap
UniqueID: 1081902956.34
Caller ID: (N/A)
DNID Digits: (N/A)
State: Up (6)
Rings: 1
NativeFormat: 68
WriteFormat: 4
ReadFormat: 4
1st File Descriptor: 28
Frames in: 1252
Frames out: 2500
Time to Hangup: 0
For a call on the PRI:
-- General --
Name: Zap/3-1
Type: Zap
UniqueID: 1081902207.29
Caller ID: 283040000
DNID Digits: (N/A)
State: Up (6)
Rings: 1
NativeFormat: 72
WriteFormat: 4
ReadFormat: 4
1st File Descriptor: 20
Frames in: 5346
Frames out: 1734
Time to Hangup: 0
So, from the above I can see the callerid of the call (nice) but I don't
know which one of the 100 possible numbers was dialled. Is this what
*should* appear as the DNID?
Does anyone know why I don't get this information showing up?
BTW, when enabling pri intense debug span 1 I do see this info:
< Bearer Capability (len= 3) [ Ext: 1 Q.931 Std: 0 Info transfer
capability: Speech (0)
< Ext: 1 Trans mode/rate: 64kbps,
circuit-mode (16)
< Ext: 1 User information layer 1: A-Law
(35)
< Channel ID (len= 5) [ Ext: 1 IntID: Implicit, PRI Spare: 0, Preferred
Dchan: 0
< ChanSel: Reserved
< Ext: 1 Coding: 0 Number Specified Channel
Type: 3
< Ext: 1 Channel: 5 ]
< Calling Number (len=13) [ Ext: 0 TON: National Number (2) NPI:
ISDN/Telephony Numbering Plan (E.164/E.163) (1)
< Presentation: Presentation permitted, user
number passed network screening (1) 'XXXXXXXXX' ]
< Called Number (len=11) [ Ext: 1 TON: Subscriber Number (4) NPI:
ISDN/Telephony Numbering Plan (E.164/E.163) (1) '83040022' ]
< IE: High-layer Compatibility (len = 4)
Sending Receiver Ready (67)
Where the 'XXXXXXXXX' was my callerid, and the 83040022 is the 8 digit
number that I had dialled from my mobile.
Any hints, etc would be appreciated!
Regards,
Adam
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@websitemanagers.com.au
Fax: +61 2 9345 4396 www.websitemanagers.com.au