Summary:ASTERISK-22020: ooh323 Q931DisplayIE causes Anonymous on phone displays
Reporter:Ross Beer (rossbeer)Labels:
Date Opened:2013-07-05 06:19:06Date Closed:2013-12-18 13:46:01.000-0600
Versions: Frequency of
Environment:Attachments:( 0) ASTERISK-22020-1.patch
( 1) ASTERISK-22020-trunk.patch
Description:When using Asterisk as a H323 <-> SIP gateway there is an issue with handsets on the H323 PBX showing 'Anonymous' on their displays which is the default Caller ID on Asterisk config.

The phones should display the called party number which requires the following modification on the source code:

if(!ooUtilsIsStrEmpty(call->calledPartyNumber) && (pq931Msg->messageType != Q931StatusMsg))
     msgbuf[i++] = Q931DisplayIE;
     ieLen = strlen(call->calledPartyNumber)+1;
     msgbuf[i++] = ieLen;
     memcpy(msgbuf+i, call->calledPartyNumber, ieLen-1);
     i += ieLen-1;
     msgbuf[i++] = '\0';

Would it be possible to have an option in the config to allow the setting of the Q931DisplayIE to either the local caller ID or the called party number?
Comments:By: Alexander Anikin (may213) 2013-07-05 16:06:34.669-0500

Hello Ross,

You suggest to setup Q931DisplayIE as Called Party number that is incorrect as Q931DisplayIE must contain Caller Party number. Codes that fill Q931DisplayIE are present in the stack and work properly.
I guess you would setup correct CALLERID(num) on SIP leg of call in asterisk before call to h.323. It must solve trouble.

By: Ross Beer (rossbeer) 2013-07-05 18:38:35.799-0500

The issue is that the person who makes the call is seeing 'Anonymous' after the call is answered.

For example the call flow is:

Originate Call -> H323 -> Asterisk -> SIP -> PSTN

The PSTN phone shows the correct Caller ID which is set in the H323 packet. However Asterisk's caller id is set to 'Anonymous', this string is passed back in the progress Q931 packet and is then show on the screen of the phone which is Originating the call.

As Asterisk is acting as a gateway converting H323 to SIP the phone originating the call should show the telephone number dialed and not the 'Anonymous' string.

In effect the PSTN number should be shown as this is the actual endpoint and not Asterisk it's self.

There is no issue with calls from the PSTN in the reverse flow.

By: Alexander Anikin (may213) 2013-07-06 05:35:42.035-0500

Ross, ooh323 setup correct value in DisplayIE on inoming call if there is correct CONNECTEDLINE indication message from asterisk core.
You might try to set CONNECTEDLINE(num)=${EXTEN} in your dialplan before calling SIP on those calls.

Anyway i will think about new config option to allow setting ANI (DisplayIE) number from h323id or from dialed number.

By: Ross Beer (rossbeer) 2013-07-30 10:56:31.527-0500

When setting CONNECTEDLINE(num)=${EXTEN} the display value is not updated, however CONNECTEDLINE(name)=${EXTEN} does set the value as expected.

By: Rusty Newton (rnewton) 2013-09-04 19:02:43.082-0500

Setting this in open for Alexander to decide what to do with it. Otherwise I'll keep seeing it while it sits in Triage/Waiting on Feedback state. :)

By: Alexander Anikin (may213) 2013-09-06 12:43:07.497-0500

it's time to do something here ;)

By: Alexander Anikin (may213) 2013-09-06 12:46:35.184-0500

Attach patch that implement 'aniasdni' option.

By: Alexander Anikin (may213) 2013-09-06 12:49:33.629-0500

There is new boolean option 'aniasdni'. It can be set on [general] or user section in ooh323.conf
If yes then asterisk will set Q931DisplayIE as called number on incoming calls for all or per user.

By: Alexander Anikin (may213) 2013-09-06 12:50:29.917-0500

Ross, please try attached patch with aniasdni=yes in your config.

By: Ross Beer (rossbeer) 2013-10-09 11:14:25.078-0500

Thank you, this appears to work as expected.

By: Alexander Anikin (may213) 2013-12-18 13:31:12.808-0600

goes to trunk only, it's new feature