Summary:ASTERISK-02280: [request] Allow Asterisk to send the Caller Name in the q931 Facility Message
Reporter:cstephens (cstephens)Labels:
Date Opened:2004-08-26 18:42:34Date Closed:2004-11-04 18:17:58.000-0600
Versions:Frequency of
Environment:Attachments:( 0) Processing_IE_24.doc
( 1) q931-cname-facility-ie.diff.txt
Description:When Asterisk is configured as switchtype National with signalling pri_net, it does not send the Display information in the Facility message. Asterisk insead puts the Caller Name in the Display IE.


The Zapata.conf file
signalling = pri_net
group = 3
channel => 49-71

;PRI to Cisco CM4X
context = fromcisco
switchtype = dms100
signalling = pri_net
group = 4
channel => 73-95
switchtype = national
signalling = pri_net
usecallingpres = yes
group = 1
channel => 25-47

;PRI to Cisco CM3X
context = fromcisco
switchtype = dms100
signalling = pri_net
group = 3
channel => 49-71

;PRI to Cisco CM4X
context = fromcisco
switchtype = dms100
signalling = pri_net
group = 4
channel => 73-95
Comments:By: Mark Spencer (markster) 2004-08-26 21:17:40

If you want to be able to transmit in FACILITY we will have to have the COMPLETE specfication for how to do so.

By: cstephens (cstephens) 2004-08-29 13:47:36

I will work to understand the prociedures for providing the "how" specification. Telcordia has defined this as specification TR-NWT-001268 and any additional specifications.


"User Side Transmitting of Calling Name"
The name in the ISDN SETUP message from the customer is simply ignored when sent from the user to the network.  This is because it is standard practice in the US for a network switch to access a CNAM database to obtain the name information.  One switch vendor has introduced a proprietary scheme to optionally map the customer’s name information into the appropriate ISUP name parameter.  However, under NI-2, a standard ISDN trunk does not support private calling name delivery.  

What is required as many CPE switch vendors have discovered, is a way to either map to the display IE, or the Facility IE when the Asterisk server is operating in PRI_Network mode.

If the Calling Name information element is included in either a Setup or Facility message, here is how it should be presented .

Lets look at an exisiting carrier provided CNAM (Calling Party Name)

Here's how:

look for a Setup or Facility message.

look for a octet of a hex value of 80.
The following is the HEX code for a SETUP message

02 01 02 02 08 02 00 15 05 04
03 80 90 A2 18 03 A1 83 81 1C
1D 9F 8B 01 00 A1 17 02 01 01
02 01 00 80 0F 49 4E 54 45 4C
46 4C 49 46 4C 45 58 20 20 20
6C 0C 21 81 32 30 31 39 37 34
33 33 38 34 70 08 C1 32 34 33
30 35 39 31

You will find that the fourth octet in row 4 from the top has a value of 80 in hex. The octet, i.e. 0F following 80 indicates the number of octets for the calling name. In this case, the number of octets is 0F in hex, or 15 in decimal. Therefore the calling name octets are 0F 49 4E 54 45 4C 46 4C 49 46 4C 45 58 20 20 20. Translate them using IA5 characters (International Alphabet 5), which is very similar to the ASCII coding, the calling name is INTELLIFLEX followed by 3 blanks

d) The following is the HEX code for a FACILITY message

02 01 3C B0 08 02 03 24 62 1C
1B 9F 8B 01 00 A1 15 02 01 01
02 01 00 80 07 49 4E 54 45 4C
49 46 4C 45 58

Searching for octet value 80, you will find that the calling name octets are 49 4E 54 45 4C 46 4C 49 46 4C 45 58, i.e. INTELLIFLEX.

characters are 7 bit ASCII codes, coded  in 8 bit octets.

By: Mark Spencer (markster) 2004-08-29 14:27:31

Yes, that's basically how we decode right now.  The challenge is that to encode, we can't just fudge it like we do on the receive side.  We actually hvae to know how to encode it in the FACILITY IE.

By: Brian West (bkw918) 2004-09-12 20:59:13

Any input on this ?

By: Mark Spencer (markster) 2004-09-12 23:56:18

We've found just the starts of what we need, but we're working on it...

By: Brian West (bkw918) 2004-09-16 20:21:15

Any update on this?

By: dbruce (dbruce) 2004-09-24 06:47:26

Actually, the solution to this is not overly difficult...

reference to this document, middle of page 16 to middle of page 18... http://www.gkinc.com/PDFFiles/930T1RefDoc_15.pdf

Following the examples, I was able to work up a solution rather quickly. The FACILITY IE used for Caller name is relatively static... it is a quick-and-dirty fix and does not yet honor presentation restriction... although the code for "name not available" and "presentation restricted" is included (change the 'switch ( PRES_ALLOWED_NETWORK_NUMBER )' to check the appropriate flag will do the trick).

A unified diff, based on cvs from 09-15 is included...

edited on: 09-24-04 06:49

By: cstephens (cstephens) 2004-09-25 12:04:07

I will head into the office and test this and give everyone an update with final config documentation by 09/27/2004 Thank you to everyone for the assistance.

By: Mark Spencer (markster) 2004-09-25 19:28:15

That's the best documentation we've seen yet.  Thanks!  Hopefully we can make this a reality.

By: twisted (twisted) 2004-10-27 15:50:59

Any update on this?

By: Mark Spencer (markster) 2004-10-27 15:57:25

Matt Fredrickson has this almost finished.

By: Matthew Fredrickson (mattf) 2004-10-27 17:32:10

There's a pretty simple implementation that I just put into CVS for transmit and receive of calling name information over facility information element.  Have a go at it.

By: thunderz (thunderz) 2004-10-28 22:57:03

It'll be great if this can decode the Diverting Number as well.

By: Matthew Fredrickson (mattf) 2004-10-29 10:59:40

Nope, it won't work for diverting name/number.  It only works for calling name. :-(

By: Mark Spencer (markster) 2004-11-01 15:53:01.000-0600

Is this ready to close out with respect to calling name, cstephens?

By: Mark Spencer (markster) 2004-11-04 08:48:25.000-0600

Assuming this is fixed.