Connected Line Presentation (COLP)

Hi all,

I’m using Asterisk 1.2.9.1 with zaptel-1.2.6 and libpri-1.2.3.

have observed that in case of an incoming call to the Asterisk and the caller has activated the feature COLP (connected line presentation), he will not see the correct number (the dialed number) but the default PBX number of the Asterisk. Probably asterisk is not sending the Connected number information element in the Q931 CONNECT message (sent from Asterisk after the call has been answered).

Is there any way to turn this on so the COLP is sent?

thx in advance

only thing i can think of is before you Dial(), do

Set(CALLERID(number)=yourphonenumber|a) (this sets both CLID and ANI, which might fill out the field you want on BRI)

That is no problem, but I’m speaking for an incoming call. For outgoing calls I can set the presentation with no problems at all using CALLERID.

For example:

When asterisk default PBX number is 100 (or your base number is 100 (we have an ISDN30 line with 50numbers or so)), and someone dials number 110, as soon as asterisk connects the line, the number shown to the client is 100 (base number). This is incorrect, and should be 110.

Sorry for bumping this topic but I’ve found some old message on the maillist regarding this issue:


I have observed that in case of an incoming call to the Asterisk the Q931 message CONNECT (sent from Asterisk after the call has been answered) does not contain the Connected number information element. This is bad if the caller has activated the feature COLP (connected line presentation), because in this case he will not see the correct number (the dialed number) but the default PBX number of the Asterisk

Is there any configuration to be done that this IE is setup correctly.

My question is: is this possible?

My guess is that the libpri source needs to be changed for this, but my coding experience isn’t that good to know where to look and modify this. Can someone help me on this?

We’ve finally found a solution. As said before, it looked like libpri wasn’t sending the CONNECTED NUMBER element in the Q931 CONNECT message. We have modified the source from libpri (q931.c to be precize) and now the number displayed remains the number dialed.

If anyone wants to do the same, here is what we have done:

/home/source/libpri-1.2.3-org# diff q931.org.c q931.c
1958c1958
<       { 1, Q931_IE_CONNECTED_NUM, "Connected Number", dump_connected_number },
---
>       { 1, Q931_IE_CONNECTED_NUM, "Connected Number", dump_called_party_number, receive_called_party_number, transmit_called_party_number },
2551c2551,2552
< static int connect_ies[] = {  Q931_CHANNEL_IDENT, Q931_PROGRESS_INDICATOR, -1 };
---
> /* ADDED BY ML */
> static int connect_ies[] = {  Q931_CHANNEL_IDENT, Q931_PROGRESS_INDICATOR, Q931_IE_CONNECTED_NUM, -1 };
2721c2722,2723
< static int setup_ies[] = { Q931_BEARER_CAPABILITY, Q931_CHANNEL_IDENT, Q931_IE_FACILITY, Q931_PROGRESS_INDICATOR, Q931_NETWORK_SPEC_FAC, Q931_DISPLAY, Q931_IE_USER_USER,
---
> /* ADDED BY ML */
> static int setup_ies[] = { Q931_BEARER_CAPABILITY, Q931_CHANNEL_IDENT, Q931_IE_FACILITY, Q931_IE_CONNECTED_NUM, Q931_PROGRESS_INDICATOR, Q931_NETWORK_SPEC_FAC, Q931_DISPLAY, Q931_IE_USER_USER,

Came upon this solution while searching for the same problem, which apparently is still not solved. Adapted the patch for libpri 1.4.2 (just different line numbers). Could not yet evaluate its effectiveness as only very few contacts use COLP, but it does compile and Asterisk seems to run. :wink:

/usr/local/src/libpri-1.4.2#  diff q931.c.orig q931.c
2017c2017
<       { 1, Q931_IE_CONNECTED_ADDR, "Connected Number", dump_connected_number },
---
>       { 1, Q931_IE_CONNECTED_ADDR, "Connected Number", dump_called_party_number, receive_called_party_number, transmit_called_party_number },
2605c2605
< static int connect_ies[] = {  Q931_CHANNEL_IDENT, Q931_PROGRESS_INDICATOR, -1 };
---
> static int connect_ies[] = {  Q931_CHANNEL_IDENT, Q931_PROGRESS_INDICATOR, Q931_IE_CONNECTED_NUM, -1 };
2780c2780
< static int setup_ies[] = { Q931_BEARER_CAPABILITY, Q931_CHANNEL_IDENT, Q931_IE_FACILITY, Q931_PROGRESS_INDICATOR, Q931_NETWORK_SPEC_FAC, Q931_DISPLAY,
---
> static int setup_ies[] = { Q931_BEARER_CAPABILITY, Q931_CHANNEL_IDENT, Q931_IE_FACILITY, Q931_IE_CONNECTED_NUM, Q931_PROGRESS_INDICATOR, Q931_NETWORK_SPEC_FAC, Q931_DISPLAY,