[asterisk-dev] libpri: handling additional calling number

Klaus Darilion klaus.mailinglists at pernau.at
Mon May 17 05:07:13 CDT 2010


Hi!

I just reviewed libpri and it seems that SETUP messages with two 
"Calling Number" IEs are not handled correctly. Below is a rather 
typical SETUP message within Austria: The subscriber provides an 
arbitrary CLI (e.g. a branch office signals the number of the head 
quarter) as "user number not screened" and the provider additionally 
adds the line identity as "network provided number".

For example:

< Protocol Discriminator: Q.931 (8)  len=46
< Call Ref: len= 2 (reference 5680/0x1630) (Originator)
< Message Type: SETUP (5)
< [04 03 80 90 a3]
< Bearer Capability (len= 5) [ Ext: 1  Q.931 Std: 0  Info transfer 
capability: Speech (0)
<                              Ext: 1  Trans mode/rate: 64kbps, 
circuit-mode (16)
<                                User information layer 1: A-Law (35)
< [18 03 a9 83 92]
< Channel ID (len= 5) [ Ext: 1  IntID: Implicit  Other(PRI)  Spare: 0 
Exclusive  Dchan: 0
<                        ChanSel: As indicated in following octets
<                       Ext: 1  Coding: 0  Number Specified  Channel Type: 3
<                       Ext: 1  Channel: 18 Type: CPE]
< [6c 0d 21 80 36 39 39 31 31 31 36 30 30 33 36]
< Calling Number (len=15) [ Ext: 0  TON: National Number (2)  NPI: 
ISDN/Telephony Numbering Plan (E.164/E.163) (1)
<                           Presentation: Presentation permitted, user 
number not screened (0)  '69911160036' ]
< [6c 08 21 83 31 32 35 33 39 37]
< Calling Number (len=10) [ Ext: 0  TON: National Number (2)  NPI: 
ISDN/Telephony Numbering Plan (E.164/E.163) (1)
<                           Presentation: Presentation allowed of 
network provided number (3)  '125397' ]
< [70 04 81 33 36 31]
< Called Number (len= 6) [ Ext: 1  TON: Unknown Number Type (0)  NPI: 
ISDN/Telephony Numbering Plan (E.164/E.163) (1)  '361' ]


In Asterisk (1.6.2.6), this incoming call is mapped that all CALLERID 
variables contain 125397, probably the last Calling Number IE overwrites 
the previous one.

Are there any plans to support that in near future?

IMO the CLIs in above SETUP message should be mapped to:
CALLERID(num) = 69911160036 and
CALLERID(ANI) = 125397

Of course, we would need a second "pres" option, e.g. ANIpres.

regards
Klaus



More information about the asterisk-dev mailing list