Analog Display Services Interface ADSI

I am the maintainer for ADSI in Asterisk and probably one of the few people that cares about it. It was going to be removed but I saved it from being removed; it is still “deprecated”, however.

There seem to be some problems with ADSI in Asterisk currently, though I’m not sure how significant they are and I’m not sure if it’s my equipment. I’m trying a few different things to see if I can fix them.

If you could provide a channel or trunk level recording of the audio on the line, that would be helpful. I’ve noticed some funny things and sometimes Asterisk doesn’t generate the proper audio, seemingly.

Also, what type of CPE are you using for ADSI?

1 Like

Also, let me clarify something that isn’t clear from the error messages you have likely seen:

ADSI is not being removed in the near future. That is just there so that if it were decided to be removed in the future, it would not have any impact. However, there are currently no plans to remove it. So if you want to use it, use it.

I know how ADSI works to a good extent although how that is implemented in Asterisk is not necessarily the same thing. I can try to help to the extent possible.

For starters, I would recommend doing the following:

  • use TryExec around any ADSI application calls and print the value of the return variable in the dialplan (as a NoOp) afterwards
  • do core set debug 10 res_adsi (and repreat for app_getcpeid and app_adsiprog), so that any debug information from the ADSI modules are available to you.
  • as I said, you need a line-side recording of any audio that is being sent and received. If you have a butt set (lineman’s test set), that is ideal. A recording in Asterisk using MixMonitor is not likely to be useful here.

Hello InterLinked!

Thank you for your efforts to keep ADSI around… you can add me to one of the few who cares about it!

And thanks for responding…I am new to the ADSI sport, but I have a couple of customers who still hang onto their Vista phones, and would like to program them…

It’s my understanding that the CAS is sent to the phone, the phone should go into DATA mode, the phone ACKs and then Asterisk sends its messages? Unfortunately, there is a lack of info available - for example - what are all the available parameters in asdi.conf? It seems like I have a configuration error - what about the security codes? I have tried all of them I could find on the web, but no difference… is there a checklist for configuring ADSI? There seems to be .conf and .asdi files all over the place in asterisk…

Right now the equipment I am experimenting with consists of:

-FreePBX 16.0.19 with Asterisk 18.3.0 running on Intel Core i5 4460
-Digium Wildcard TDM410P with 2xFXO and 2xFXS, Kernel/Driver = wctdm24xxp+

-Northern Telecom Vista 350 Release 02 NT2N52AB12 1999 (33012119630000 201F83CB)
-Nortel Networks Vista 390 Release Unknown. (FW 00.30 CPE 4005BD77 EE FF)
-Aastra Vista 390 Release 14, NT2N63AAAB 2015, (FW 00.30 CPE 408951B8 EE FF)
-Aastra Vista 390 Release unknown, (FW 00.30 CPE FFFFFFFF EE FF)

I will work on getting a lineside recording captured, but in the meantime, if I can attempt to be descriptive, it sounds like a very very fast but short chirp/warble, in around the 2700 Hz range (CAS tone?), the transmitter of the telephone turns off (one click, no sidetone) for about a half second (data mode?) then the error “unexpected response to ack” shows up in asterisk and the phone goes back to normal (i am assuming voice) mode.

Any help you could offer would be awesome, especially: .conf files needed, security/FDN entry, etc
David!

Here’s my output with the debugs set on 10:

GETCPEID:
– Starting simple switch on ‘DAHDI/4-1’
– Executing [4268@from-internal:1] Answer(“DAHDI/4-1”, “”) in new stack
– Executing [4268@from-internal:2] TryExec(“DAHDI/4-1”, “GetCPEID()”) in new stack
[2022-04-26 06:43:42] DEBUG[14853][C-0000001a]: res_adsi.c:397 adsi_transmit_message_full: Switch to data is sent!
[2022-04-26 06:43:42] DEBUG[14853][C-0000001a]: res_adsi.c:294 __adsi_transmit_messages: ADSI Compatible CPE Detected
[2022-04-26 06:43:42] DEBUG[14853][C-0000001a]: res_adsi.c:309 __adsi_transmit_messages: Message 1, of 4 input bytes, 1734 output bytes
[2022-04-26 06:43:43] DEBUG[14853][C-0000001a]: res_adsi.c:324 __adsi_transmit_messages: Sent total spill of 1734 bytes
[2022-04-26 06:43:44] WARNING[14853][C-0000001a]: res_adsi.c:341 __adsi_transmit_messages: Unexpected response to ack: (retry 1)
[2022-04-26 06:43:44] DEBUG[14853][C-0000001a]: res_adsi.c:294 __adsi_transmit_messages: ADSI Compatible CPE Detected
[2022-04-26 06:43:44] DEBUG[14853][C-0000001a]: res_adsi.c:309 __adsi_transmit_messages: Message 1, of 4 input bytes, 1734 output bytes
[2022-04-26 06:43:44] DEBUG[14853][C-0000001a]: res_adsi.c:324 __adsi_transmit_messages: Sent total spill of 1734 bytes
[2022-04-26 06:43:45] WARNING[14853][C-0000001a]: res_adsi.c:341 __adsi_transmit_messages: Unexpected response to ack: (retry 2)
[2022-04-26 06:43:45] DEBUG[14853][C-0000001a]: res_adsi.c:294 __adsi_transmit_messages: ADSI Compatible CPE Detected
[2022-04-26 06:43:45] DEBUG[14853][C-0000001a]: res_adsi.c:309 __adsi_transmit_messages: Message 1, of 4 input bytes, 1734 output bytes
[2022-04-26 06:43:46] DEBUG[14853][C-0000001a]: res_adsi.c:324 __adsi_transmit_messages: Sent total spill of 1734 bytes
[2022-04-26 06:43:47] WARNING[14853][C-0000001a]: res_adsi.c:341 __adsi_transmit_messages: Unexpected response to ack: (retry 3)
[2022-04-26 06:43:47] DEBUG[14853][C-0000001a]: res_adsi.c:294 __adsi_transmit_messages: ADSI Compatible CPE Detected
[2022-04-26 06:43:47] DEBUG[14853][C-0000001a]: res_adsi.c:309 __adsi_transmit_messages: Message 1, of 4 input bytes, 1734 output bytes
[2022-04-26 06:43:47] DEBUG[14853][C-0000001a]: res_adsi.c:324 __adsi_transmit_messages: Sent total spill of 1734 bytes
[2022-04-26 06:43:48] WARNING[14853][C-0000001a]: res_adsi.c:341 __adsi_transmit_messages: Unexpected response to ack: (retry 4)
[2022-04-26 06:43:48] DEBUG[14853][C-0000001a]: res_adsi.c:294 __adsi_transmit_messages: ADSI Compatible CPE Detected
[2022-04-26 06:43:48] DEBUG[14853][C-0000001a]: res_adsi.c:309 __adsi_transmit_messages: Message 1, of 4 input bytes, 1734 output bytes
[2022-04-26 06:43:49] DEBUG[14853][C-0000001a]: res_adsi.c:324 __adsi_transmit_messages: Sent total spill of 1734 bytes
[2022-04-26 06:43:50] WARNING[14853][C-0000001a]: res_adsi.c:341 __adsi_transmit_messages: Unexpected response to ack: (retry 5)
[2022-04-26 06:43:50] WARNING[14853][C-0000001a]: res_adsi.c:345 __adsi_transmit_messages: Maximum ADSI Retries (5) exceeded
– Executing [4268@from-internal:3] NoOp(“DAHDI/4-1”, “FAILED”) in new stack
– Executing [4268@from-internal:4] Playback(“DAHDI/4-1”, “telephone-in-your-pocket”) in new stack
– <DAHDI/4-1> Playing ‘telephone-in-your-pocket.ulaw’ (language ‘en’)
– Executing [4268@from-internal:5] Hangup(“DAHDI/4-1”, “”) in new stack
== Spawn extension (from-internal, 4268, 5) exited non-zero on ‘DAHDI/4-1’
– Executing [h@from-internal:1] Macro(“DAHDI/4-1”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“DAHDI/4-1”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“DAHDI/4-1”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] Hangup(“DAHDI/4-1”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘DAHDI/4-1’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘DAHDI/4-1’
– Hanging up on ‘DAHDI/4-1’
– Hungup ‘DAHDI/4-1’

ADSIProg():

– Starting simple switch on ‘DAHDI/4-1’
– Executing [2580@from-internal:1] Answer(“DAHDI/4-1”, “”) in new stack
– Executing [2580@from-internal:2] TryExec(“DAHDI/4-1”, “ADSIProg(verulam.adsi)”) in new stack
– ADSI Available on CPE. Attempting Upload.
[2022-04-26 06:53:42] DEBUG[18117][C-0000001d]: res_adsi.c:397 adsi_transmit_message_full: Switch to data is sent!
[2022-04-26 06:53:42] DEBUG[18117][C-0000001d]: res_adsi.c:294 __adsi_transmit_messages: ADSI Compatible CPE Detected
[2022-04-26 06:53:42] DEBUG[18117][C-0000001d]: res_adsi.c:309 __adsi_transmit_messages: Message 1, of 4 input bytes, 1734 output bytes
[2022-04-26 06:53:43] DEBUG[18117][C-0000001d]: res_adsi.c:324 __adsi_transmit_messages: Sent total spill of 1734 bytes
[2022-04-26 06:53:44] WARNING[18117][C-0000001d]: res_adsi.c:341 __adsi_transmit_messages: Unexpected response to ack: (retry 1)
[2022-04-26 06:53:44] DEBUG[18117][C-0000001d]: res_adsi.c:294 __adsi_transmit_messages: ADSI Compatible CPE Detected
[2022-04-26 06:53:44] DEBUG[18117][C-0000001d]: res_adsi.c:309 __adsi_transmit_messages: Message 1, of 4 input bytes, 1734 output bytes
[2022-04-26 06:53:44] DEBUG[18117][C-0000001d]: res_adsi.c:324 __adsi_transmit_messages: Sent total spill of 1734 bytes
[2022-04-26 06:53:45] WARNING[18117][C-0000001d]: res_adsi.c:341 __adsi_transmit_messages: Unexpected response to ack: (retry 2)
[2022-04-26 06:53:45] DEBUG[18117][C-0000001d]: res_adsi.c:294 __adsi_transmit_messages: ADSI Compatible CPE Detected
[2022-04-26 06:53:45] DEBUG[18117][C-0000001d]: res_adsi.c:309 __adsi_transmit_messages: Message 1, of 4 input bytes, 1734 output bytes
[2022-04-26 06:53:46] DEBUG[18117][C-0000001d]: res_adsi.c:324 __adsi_transmit_messages: Sent total spill of 1734 bytes
[2022-04-26 06:53:47] WARNING[18117][C-0000001d]: res_adsi.c:341 __adsi_transmit_messages: Unexpected response to ack: (retry 3)
[2022-04-26 06:53:47] DEBUG[18117][C-0000001d]: res_adsi.c:294 __adsi_transmit_messages: ADSI Compatible CPE Detected
[2022-04-26 06:53:47] DEBUG[18117][C-0000001d]: res_adsi.c:309 __adsi_transmit_messages: Message 1, of 4 input bytes, 1734 output bytes
[2022-04-26 06:53:47] DEBUG[18117][C-0000001d]: res_adsi.c:324 __adsi_transmit_messages: Sent total spill of 1734 bytes
[2022-04-26 06:53:48] WARNING[18117][C-0000001d]: res_adsi.c:341 __adsi_transmit_messages: Unexpected response to ack: (retry 4)
[2022-04-26 06:53:48] DEBUG[18117][C-0000001d]: res_adsi.c:294 __adsi_transmit_messages: ADSI Compatible CPE Detected
[2022-04-26 06:53:48] DEBUG[18117][C-0000001d]: res_adsi.c:309 __adsi_transmit_messages: Message 1, of 4 input bytes, 1734 output bytes
[2022-04-26 06:53:49] DEBUG[18117][C-0000001d]: res_adsi.c:324 __adsi_transmit_messages: Sent total spill of 1734 bytes
[2022-04-26 06:53:50] WARNING[18117][C-0000001d]: res_adsi.c:341 __adsi_transmit_messages: Unexpected response to ack: (retry 5)
[2022-04-26 06:53:50] WARNING[18117][C-0000001d]: res_adsi.c:345 __adsi_transmit_messages: Maximum ADSI Retries (5) exceeded
– Executing [2580@from-internal:3] NoOp(“DAHDI/4-1”, “FAILED”) in new stack
– Executing [2580@from-internal:4] Hangup(“DAHDI/4-1”, “”) in new stack
== Spawn extension (from-internal, 2580, 4) exited non-zero on ‘DAHDI/4-1’
– Executing [h@from-internal:1] Macro(“DAHDI/4-1”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“DAHDI/4-1”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“DAHDI/4-1”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] Hangup(“DAHDI/4-1”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘DAHDI/4-1’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘DAHDI/4-1’
– Hanging up on ‘DAHDI/4-1’
– Hungup ‘DAHDI/4-1’

*97 (Voicemail)

  • Starting simple switch on ‘DAHDI/4-1’
    – Executing [*97@from-internal:1] Macro(“DAHDI/4-1”, “user-callerid,”) in new stack
    – Executing [s@macro-user-callerid:1] Set(“DAHDI/4-1”, “TOUCH_MONITOR=1650971431.48”) in new stack
    – Executing [s@macro-user-callerid:2] Set(“DAHDI/4-1”, “CHANCONTEXT=”) in new stack
    – Executing [s@macro-user-callerid:3] Set(“DAHDI/4-1”, “CHANCONTEXT=”) in new stack
    – Executing [s@macro-user-callerid:4] Set(“DAHDI/4-1”, “CHANEXTENCONTEXT=4-1”) in new stack
    – Executing [s@macro-user-callerid:5] Set(“DAHDI/4-1”, “CHANEXTEN=4-1”) in new stack
    – Executing [s@macro-user-callerid:6] Set(“DAHDI/4-1”, “CALLERID(number)=885”) in new stack
    – Executing [s@macro-user-callerid:7] Set(“DAHDI/4-1”, “AMPUSER=885”) in new stack
    – Executing [s@macro-user-callerid:8] Set(“DAHDI/4-1”, “HOTDESCKCHAN=4-1”) in new stack
    – Executing [s@macro-user-callerid:9] Set(“DAHDI/4-1”, “HOTDESKEXTEN=4”) in new stack
    – Executing [s@macro-user-callerid:10] Set(“DAHDI/4-1”, “HOTDESKCALL=0”) in new stack
    – Executing [s@macro-user-callerid:11] ExecIf(“DAHDI/4-1”, “0?Set(HOTDESKCALL=1)”) in new stack
    – Executing [s@macro-user-callerid:12] ExecIf(“DAHDI/4-1”, “0?Set(CALLERID(name)=)”) in new stack
    – Executing [s@macro-user-callerid:13] GotoIf(“DAHDI/4-1”, “0?report”) in new stack
    – Executing [s@macro-user-callerid:14] ExecIf(“DAHDI/4-1”, “1?Set(REALCALLERIDNUM=885)”) in new stack
    – Executing [s@macro-user-callerid:15] Set(“DAHDI/4-1”, “AMPUSER=885”) in new stack
    – Executing [s@macro-user-callerid:16] GotoIf(“DAHDI/4-1”, “0?limit”) in new stack
    – Executing [s@macro-user-callerid:17] Set(“DAHDI/4-1”, “AMPUSERCIDNAME=Vista_390”) in new stack
    – Executing [s@macro-user-callerid:18] ExecIf(“DAHDI/4-1”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
    – Executing [s@macro-user-callerid:19] GotoIf(“DAHDI/4-1”, “0?report”) in new stack
    – Executing [s@macro-user-callerid:20] Set(“DAHDI/4-1”, “AMPUSERCID=885”) in new stack
    – Executing [s@macro-user-callerid:21] Set(“DAHDI/4-1”, “__DIAL_OPTIONS=HhTtr”) in new stack
    – Executing [s@macro-user-callerid:22] Set(“DAHDI/4-1”, “CALLERID(all)=“Vista_390” <885>”) in new stack
    – Executing [s@macro-user-callerid:23] ExecIf(“DAHDI/4-1”, “0?Set(CUSDIAL=)”) in new stack
    – Executing [s@macro-user-callerid:24] ExecIf(“DAHDI/4-1”, “0?Set(CALLERID(all)=“Vista_390” <885>)”) in new stack
    – Executing [s@macro-user-callerid:25] GotoIf(“DAHDI/4-1”, “0?limit”) in new stack
    – Executing [s@macro-user-callerid:26] ExecIf(“DAHDI/4-1”, “0?Set(GROUP(concurrency_limit)=885)”) in new stack
    – Executing [s@macro-user-callerid:27] ExecIf(“DAHDI/4-1”, “0?Set(CHANNEL(language)=)”) in new stack
    – Executing [s@macro-user-callerid:28] NoOp(“DAHDI/4-1”, “Macro Depth is 1”) in new stack
    – Executing [s@macro-user-callerid:29] GotoIf(“DAHDI/4-1”, “1?report2:macroerror”) in new stack
    – Goto (macro-user-callerid,s,30)
    – Executing [s@macro-user-callerid:30] GotoIf(“DAHDI/4-1”, “0?continue”) in new stack
    – Executing [s@macro-user-callerid:31] ExecIf(“DAHDI/4-1”, “1?Set(__CALLEE_ACCOUNCODE=)”) in new stack
    – Executing [s@macro-user-callerid:32] Set(“DAHDI/4-1”, “__TTL=64”) in new stack
    – Executing [s@macro-user-callerid:33] GotoIf(“DAHDI/4-1”, “1?continue”) in new stack
    – Goto (macro-user-callerid,s,49)
    – Executing [s@macro-user-callerid:49] Set(“DAHDI/4-1”, “CALLERID(number)=885”) in new stack
    – Executing [s@macro-user-callerid:50] Set(“DAHDI/4-1”, “CALLERID(name)=Vista_390”) in new stack
    – Executing [s@macro-user-callerid:51] GotoIf(“DAHDI/4-1”, “0?cnum”) in new stack
    – Executing [s@macro-user-callerid:52] Set(“DAHDI/4-1”, “CDR(cnam)=Vista_390”) in new stack
    – Executing [s@macro-user-callerid:53] Set(“DAHDI/4-1”, “CDR(cnum)=885”) in new stack
    – Executing [s@macro-user-callerid:54] Set(“DAHDI/4-1”, “CHANNEL(language)=en”) in new stack
    – Executing [*97@from-internal:2] Set(“DAHDI/4-1”, “CONNECTEDLINE(name-charset,i)=utf8”) in new stack
    – Executing [*97@from-internal:3] Set(“DAHDI/4-1”, “CONNECTEDLINE(name,i)=My Voicemail”) in new stack
    – Executing [*97@from-internal:4] Set(“DAHDI/4-1”, “CONNECTEDLINE(num,i)=885”) in new stack
    – Executing [*97@from-internal:5] Answer(“DAHDI/4-1”, “”) in new stack
    – Executing [*97@from-internal:6] Wait(“DAHDI/4-1”, “1”) in new stack
    – Executing [*97@from-internal:7] Macro(“DAHDI/4-1”, “get-vmcontext,885”) in new stack
    – Executing [s@macro-get-vmcontext:1] Set(“DAHDI/4-1”, “VMCONTEXT=default”) in new stack
    – Executing [s@macro-get-vmcontext:2] GotoIf(“DAHDI/4-1”, “0?200:300”) in new stack
    – Goto (macro-get-vmcontext,s,300)
    – Executing [s@macro-get-vmcontext:300] NoOp(“DAHDI/4-1”, “”) in new stack
    – Executing [*97@from-internal:8] Set(“DAHDI/4-1”, “VMBOXEXISTSSTATUS=SUCCESS”) in new stack
    – Executing [*97@from-internal:9] GotoIf(“DAHDI/4-1”, “1?mbexist”) in new stack
    – Goto (from-internal,*97,109)
    – Executing [*97@from-internal:109] GotoIf(“DAHDI/4-1”, “0?novmpw:vmpw”) in new stack
    – Goto (from-internal,*97,118)
    – Executing [*97@from-internal:118] VoiceMailMain(“DAHDI/4-1”, “885@default”) in new stack
    [2022-04-26 07:10:33] DEBUG[28765][C-00000031]: res_adsi.c:397 adsi_transmit_message_full: Switch to data is sent!
    [2022-04-26 07:10:34] DEBUG[28765][C-00000031]: res_adsi.c:294 __adsi_transmit_messages: ADSI Compatible CPE Detected
    [2022-04-26 07:10:34] DEBUG[28765][C-00000031]: res_adsi.c:309 __adsi_transmit_messages: Message 1, of 9 input bytes, 2067 output bytes
    [2022-04-26 07:10:34] DEBUG[28765][C-00000031]: res_adsi.c:324 __adsi_transmit_messages: Sent total spill of 2067 bytes
    [2022-04-26 07:10:35] WARNING[28765][C-00000031]: res_adsi.c:341 __adsi_transmit_messages: Unexpected response to ack: (retry 1)
    [2022-04-26 07:10:35] DEBUG[28765][C-00000031]: res_adsi.c:294 __adsi_transmit_messages: ADSI Compatible CPE Detected
    [2022-04-26 07:10:35] DEBUG[28765][C-00000031]: res_adsi.c:309 __adsi_transmit_messages: Message 1, of 9 input bytes, 2067 output bytes
    [2022-04-26 07:10:36] DEBUG[28765][C-00000031]: res_adsi.c:324 __adsi_transmit_messages: Sent total spill of 2067 bytes
    [2022-04-26 07:10:37] WARNING[28765][C-00000031]: res_adsi.c:341 __adsi_transmit_messages: Unexpected response to ack: (retry 2)
    [2022-04-26 07:10:37] DEBUG[28765][C-00000031]: res_adsi.c:294 __adsi_transmit_messages: ADSI Compatible CPE Detected
    [2022-04-26 07:10:37] DEBUG[28765][C-00000031]: res_adsi.c:309 __adsi_transmit_messages: Message 1, of 9 input bytes, 2067 output bytes
    [2022-04-26 07:10:37] DEBUG[28765][C-00000031]: res_adsi.c:324 __adsi_transmit_messages: Sent total spill of 2067 bytes
    [2022-04-26 07:10:38] WARNING[28765][C-00000031]: res_adsi.c:341 __adsi_transmit_messages: Unexpected response to ack: (retry 3)
    [2022-04-26 07:10:38] DEBUG[28765][C-00000031]: res_adsi.c:294 __adsi_transmit_messages: ADSI Compatible CPE Detected
    [2022-04-26 07:10:38] DEBUG[28765][C-00000031]: res_adsi.c:309 __adsi_transmit_messages: Message 1, of 9 input bytes, 2067 output bytes
    [2022-04-26 07:10:39] DEBUG[28765][C-00000031]: res_adsi.c:324 __adsi_transmit_messages: Sent total spill of 2067 bytes
    [2022-04-26 07:10:40] WARNING[28765][C-00000031]: res_adsi.c:341 __adsi_transmit_messages: Unexpected response to ack: (retry 4)
    [2022-04-26 07:10:40] DEBUG[28765][C-00000031]: res_adsi.c:294 __adsi_transmit_messages: ADSI Compatible CPE Detected
    [2022-04-26 07:10:40] DEBUG[28765][C-00000031]: res_adsi.c:309 __adsi_transmit_messages: Message 1, of 9 input bytes, 2067 output bytes
    [2022-04-26 07:10:40] DEBUG[28765][C-00000031]: res_adsi.c:324 __adsi_transmit_messages: Sent total spill of 2067 bytes
    [2022-04-26 07:10:41] WARNING[28765][C-00000031]: res_adsi.c:341 __adsi_transmit_messages: Unexpected response to ack: (retry 5)
    [2022-04-26 07:10:41] WARNING[28765][C-00000031]: res_adsi.c:345 __adsi_transmit_messages: Maximum ADSI Retries (5) exceeded
    – <DAHDI/4-1> Playing ‘vm-password.ulaw’ (language ‘en’)
    [2022-04-26 07:10:47] WARNING[28765][C-00000031]: app_voicemail.c:11280 vm_authenticate: Unable to read password
    [2022-04-26 07:10:47] DEBUG[28765][C-00000031]: res_adsi.c:397 adsi_transmit_message_full: Switch to data is sent!
    [2022-04-26 07:10:47] WARNING[28765][C-00000031]: res_adsi.c:250 __adsi_transmit_messages: Unable to send CAS
    [2022-04-26 07:10:47] DEBUG[28765][C-00000031]: res_adsi.c:267 __adsi_transmit_messages: Hangup in ADSI
    [2022-04-26 07:10:47] DEBUG[28765][C-00000031]: res_adsi.c:403 adsi_transmit_message_full: Switch to voice is sent!
    [2022-04-26 07:10:47] WARNING[28765][C-00000031]: res_adsi.c:250 __adsi_transmit_messages: Unable to send CAS
    [2022-04-26 07:10:47] DEBUG[28765][C-00000031]: res_adsi.c:267 __adsi_transmit_messages: Hangup in ADSI
    [2022-04-26 07:10:47] DEBUG[28765][C-00000031]: res_adsi.c:440 adsi_transmit_message_full: Wait for switch is ‘1’
    – Executing [h@from-internal:1] Macro(“DAHDI/4-1”, “hangupcall”) in new stack
    – Executing [s@macro-hangupcall:1] GotoIf(“DAHDI/4-1”, “1?theend”) in new stack
    – Goto (macro-hangupcall,s,3)
    – Executing [s@macro-hangupcall:3] ExecIf(“DAHDI/4-1”, “0?Set(CDR(recordingfile)=)”) in new stack
    – Executing [s@macro-hangupcall:4] Hangup(“DAHDI/4-1”, “”) in new stack
    == Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘DAHDI/4-1’ in macro ‘hangupcall’
    == Spawn extension (from-internal, h, 1) exited non-zero on ‘DAHDI/4-1’
    – Hanging up on ‘DAHDI/4-1’
    – Hungup ‘DAHDI/4-1’

There is very little information about ADSI. It’s very frustrating. Telephony in general, particularly post Bell System Divestiture, has become a very “closed” industry in many respects and ADSI is no exception to that.

I have much of the relevant documentation so as to specific details about the protocol, I can refer to those if I am not able to answer. Your general understanding is correct. The CAS is sent to the phone and then the phone should respond with a DTMF “A” acknowledgment. This indicates that the phone is ADSI capable. Most CPE will respond with a “D” because they do not support ADSI. You can verify this if you have a simple analog phone or Caller ID unit that supports Call Waiting. If you do a DTMF debug in Asterisk, you’ll see that a “D” is most likely what gets sent.

This is how Asterisk determines if your “CPE is ADSI compatible” or not. If it gets an “A”, it’s compatible. If anything else, then it’s not.

I believe the security code is for, well, security, but it seems like kind of a joke to me. I think the idea is that the phone stores the security code and then it will only respond to certain types of future programming where that security code is provided, so random people on numbers you call don’t reprogram certain parts of your phone. I’d have to double check that.

I haven’t even really gotten to doing much with adsi.conf or asterisk.adsi. The ADSI scripts are how you would send it an ADSI program, similar to what you saw on the IBM site. However, certain basic things, like GetCPEID() should theoretically work without any of that.

Your description of the phone call sounds about similar to what I’m experiencing. I can get my 350 to ACK the CAS with an “A”, but that’s as far as it was getting. (The click into data mode is the same thing as with Call Waiting Caller ID where the voice path is temporarily disconnected - so that you don’t hear the FSK.) In some cases, the acknowledgment was not getting detected by Asterisk. I believe I had to modify res_adsi to use playtones as opposed to adsi_careful_send to get the 350 to recognize the CAS for some reason (which should NOT be needed). Then if I forced the code to continue if I didn’t get an ACK, it didn’t really work anyways.

I do have a couple questions for you:

  • Does Call Waiting Caller ID properly work with your CPE? For some reason, it doesn’t seem to for me. I’m wondering if I have a bit modem unit in mine. I ordered another one, but it’s at another location so I’m trying to narrow things down. Knowing how my phone differs from yours would be helpful. The phone I have here is also a Nortel 350.

When I monitor the line with a butt set and do a test, the FSK spill is screwed up. I hear the “A” ack and then Asterisk sends a spill of a pure CAS to the phone for some reason. I’ve seen this behavior in other areas too, depending on what’s being done. It’s like whatever the first frame is or something is getting repeated. The timing seems about right but the data is not there.

If you can record off a test set to see if this is also what’s happening to you, that would be insightful. You’re not going to be able to record this off the phone earpiece with a pickup coil, nor can you record it in Asterisk. You may be able to use dahdi_monitor to record it though. So either that or using a butt set in monitor mode.

As far as “timed out” the protocol specifies that the CPE will ACK each data segment so that the server knows how many chunks were successfully received. So it not only has to ACK once, but every subsequent time in the proper way in order for a successful transmission. If you look at your first debug, you can see that that is what’s happening here. Your phone is ACKing itself each time whenever Asterisk sends a CAS, and then Asterisk sends the first “chunk” of the message (1 of 4), but then when it’s time for the phone to ACK that it got everything, you can see that the “unexpected response” was an empty string, i.e. there was no ACK from the phone.
If you can verify what is actually happening at the hardware level (maybe there is an ACK, but Asterisk isn’t picking it up? Or maybe the FSK spill is invalid, and the phone is ignoring it?) that would give us a better idea of what’s going on here.

And finally, completed unrelated, macros are deprecated and, unlike ADSI, are being removed soon, so you should stop using macros and move to Gosub :wink:

Quick update: i reinstalled an ancient version of asterisk…went back to 11 and the ADSI worked perfectly, was able to GetCPEID, ADSIProg’d a few scripts and screwed around with FDNs and SECURITY settings on the 390s and 350s in the plant.

Call Waiting Caller ID did NOT work at all.

Right now, i am going back to the 64-bit version, and see if there is some hardware issue (4-cores vs 1 core, etc…)

Interesting… that would explain a lot. I’d only been trying on recent versions so that explains that. I guess some kind of huge regression was introduced at some point, if it’s completely broken now.

If you don’t mind, do you mind installing a few other versions to see when it broke exactly? I think 13 and 16 would narrow it down to a major version, and then we can narrow it down to a minor version within. Once we get an idea of that, I can dig into it and see what would have changed around then to break things. From my testing, this has also broken other (non-ADSI related) things in the core and it could have larger implications even. Would be great to get this fixed for everyone.

Interesting about CWCID - could be that the 350 doesn’t support that after all - perhaps they were always intended to be used with Call Waiting Deluxe and ADSI.

I am interested to see if its a difference between 32-bit and 64-bit OS or not…like i said, it sounds like the CAS & Ack responses are twice as fast. I have tried all the PCI settings in my BIOS, but not able to slow it down at all.

Right now, I am stripping the lastest version down of unnecessary modules to see if I can downgrade the core to previous versions until it works… after that I will start downloading previous releases to see where it stops working…

Right now I have the one 390 loaded with the default asterisk.adsi script, a 350 and 390 that still have their Bell programming and one 390 that has been completely erased (OPTIONS+MUTE+ZERO) and none of them will display any Call Waiting information - just receive the CW tone every 10 seconds.

Do you have a coding for the Call Waiting Deluxe script kicking around?

Without any documentation, I’m just hacking at it…

and just a sidenote that you may find interesting, the Call Waiting CLID actually works on my UNISTIM extensions as well as the PJSIP extensions…

I don’t have ADSI Call Waiting Deluxe (or anything ADSI) really working yet.

The Call Waiting Deluxe that I have is just the basic DTMF capability. I have a BellSouth Visual Director that can be used with Call Waiting Deluxe. I also have Advanced Call Waiting Deluxe.

Heck, you can use any TouchTone phone for Call Waiting Deluxe if you remember the DTMF codes… ADSI is not necessary for CW Deluxe at all.

Well, works on FreePBX 12.0.45 with Asterisk 11.16.0 … NEXT~!

What does? Call Waiting Deluxe? (At the least the ADSI component of it?)

The advertising for CWD is really misleading, since ADSI isn’t necessary to fully use the feature. It’s certainly a nice enhancement to it, though. I find other aspects of ADSI more helpful though, given that I have the codes for CWD memorized as it is.

So we know 11.16 is working. That puts us at February 2015. res_adsi.c has seen only 4 revisions since then and I can’t see how any of those would be the culprit. Similar story with app_adsiprog. adsi.c hasn’t even been touched since 2014.

I think this might be some other core change that had ripple over effects. So we really need to determine exactly what minor version broke things. I think we’re getting close though! Really useful to know all this.

`So, here we go: the results of a few days of installing and reinstalling…Freepbx Version 6.12.65 installed using Asterisk 11 has working ADSI. Installing with Asterisk 13, the ADSI does NOT, however it does work in FreePBX 10.13.66.21 with Asterisk 11 installed but again does not with Asterisk 13…note that I have also been tracking paging: my Avaya sets will not page after Asterisk version 13.2.0…related? Not sure. Also, my apologies for the formatting…the two lists at the bottom show the module version numbers between two 6.12.54 Asterisk 11 and 13 installations…

Equipment- 
Server:    AMD Phenom II  X4 965 on ASUS M4A87TD with 16G DDR3
PSTN Card: TDM400P
Endpoints: 2x Avaya 9611G (SIP-UDP)
           2x Nortel 1140e (UNISTIM) 
           3x Nortel Vista 390 (2 erased, 1 locked)
           1x Nortel Vista 350 (erased)
           1x Avaya J179 (SIP-UDP)
Trunks:    1x TO Nortel BCM400, 2x TO PSTN, 1 TO RasPBX
Versions Tested:
Install/Boot Splash	 FreePBX	Asterisk		ADSI	Paging
1.817.210.58					                Yes		Yes
2.210.62-6-i386						            Yes		Yes
4.211.64-9-i386				    11		        Yes		Yes
4.211.64-9-i386				    1.8		        Yes		Yes	
5.211.65-21-i386					            Yes		Yes
6.12.65-30-x86_64	12.0.45		11.19.0	     	Yes		Yes
6.12.65-30-x86_64	12.0.45		13.2.0	    	No		Yes
10.13.66.21 Ast 11	13.0.197.31	11.25.1	    	Yes		No
10.13.66.21 Ast 13	13.0.197.31	13.29.2	    	No		No

6.12.65 12.0.45 11.19.0 ADSI=works PAGING=works
[root@localhost ~]# amportal a ma list
Fetching FreePBX settings with gen_amp_conf.php…
no repos specified, using: [commercial,standard,extended,unsupported] from last GUI settings

Module Version Status


accountcodepreserve 2.11.0.0 Enabled
announcement 2.11.0.4 Enabled
arimanager 12.0.3 Enabled
asterisk-cli 2.11.0.3 Enabled
asteriskinfo 12.0.1 Enabled
backup 12.0.14 Enabled
blacklist 12.0.1 Enabled
builtin Enabled
bulkdids 2.11.1.4 Enabled
bulkextensions 2.11.0.7 Enabled
callback 2.11.0.4 Enabled
callforward 12.0.7 Enabled
callrecording 12.0.2.5 Enabled
callwaiting 12.0.3 Enabled
campon 2.11.0.2 Enabled
cdr 12.0.17 Enabled
certman 12.0.4 Enabled
conferences 12.0.15 Enabled
contactmanager 12.0.2 Enabled
core 12.0.25 Enabled
customappsreg 2.11.0.2 Enabled
cxpanel 4.1.2 Enabled
dahdiconfig 2.11.51 Enabled
dashboard 12.0.24 Enabled
daynight 2.11.0.5 Enabled
dictate 2.11.0.3 Enabled
digium_phones 2.11.2.2 Enabled
digiumaddoninstaller 2.11.0.6 Enabled
directory 12.0.2 Enabled
disa 12.0.2 Enabled
donotdisturb 12.0.3 Enabled
fax 12.0.7 Enabled
featurecodeadmin 12.0.1 Enabled
findmefollow 12.0.11 Enabled
framework 12.0.45 Enabled
fw_ari 12.0.7 Disabled
fw_langpacks 2.11.2 Enabled
hotelwakeup 2.11.3 Enabled
iaxsettings 2.11.0.3 Enabled
infoservices 12.0.1 Enabled
irc 2.11.0.4 Enabled
ivr 2.11.0.11 Enabled
javassh 2.11.2 Enabled
languages 2.11.0.2 Enabled
logfiles 12.0.6 Enabled
manager 12.0.2 Enabled
miscapps 2.11.0.2 Enabled
miscdests 2.11.0.4 Enabled
music 12.0.1 Enabled
outroutemsg 2.11.0.2 Enabled
paging 12.0.13 Enabled
parking 12.0.9 Enabled
pbdirectory 2.11.0.2 Enabled
phonebook 2.11.0.2 Enabled
phpinfo 2.11.0.1 Enabled
pinsets 2.11.0.9 Enabled
presencestate 12.0.16 Enabled
printextensions 2.11.0.1 Enabled
queueprio 2.11.0.2 Enabled
queues 12.0.17 Enabled
recordings 12.0.5 Enabled
restart 12.0.1 Enabled
ringgroups 12.0.3.2 Enabled
setcid 2.11.0.4 Enabled
sipsettings 12.0.10 Enabled
sipstation 12.0.4 Enabled
sms 12.0.19 Enabled
speeddial 2.11.0.2 Enabled
timeconditions 12.0.7.1 Enabled
tts 2.11.0.10 Enabled
ucp 12.0.11 Enabled
ucpnode 12.0.1alpha8 Enabled
userman 12.0.26 Enabled
vmblast 12.0.1 Enabled
voicemail 12.0.32 Enabled
weakpasswords 12.0.2 Enabled
webrtc 12.0.1 Enabled

6.12.65-30-x86_64 12.0.45 13.2.0 ADSI=NOT working PAGING: works
[root@localhost ~]# amportal a ma list

Fetching FreePBX settings with gen_amp_conf.php…

no repos specified, using: [commercial,standard] from last GUI settings

Module Version Status


accountcodepreserve 2.11.0.0 Enabled
announcement 2.11.0.4 Enabled
arimanager 12.0.3 Enabled
asterisk-cli 2.11.0.3 Enabled
asteriskinfo 12.0.1 Enabled
backup 12.0.14 Enabled
blacklist 12.0.1 Enabled
builtin Enabled
bulkdids 2.11.1.4 Enabled
bulkextensions 2.11.0.7 Enabled
callback 2.11.0.4 Enabled
callforward 12.0.7 Enabled
callrecording 12.0.2.5 Enabled
callwaiting 12.0.3 Enabled
campon 2.11.0.2 Enabled
cdr 12.0.17 Enabled
certman 12.0.4 Enabled
conferences 12.0.15 Enabled
contactmanager 12.0.2 Enabled
core 12.0.25 Enabled
customappsreg 2.11.0.2 Enabled
cxpanel 4.1.2 Enabled
dahdiconfig 2.11.51 Enabled
dashboard 12.0.24 Enabled
daynight 2.11.0.5 Enabled
dictate 2.11.0.3 Enabled
digium_phones 2.11.2.2 Enabled
digiumaddoninstaller 2.11.0.6 Enabled
directory 12.0.2 Enabled
disa 12.0.2 Enabled
donotdisturb 12.0.3 Enabled
fax 12.0.7 Enabled
featurecodeadmin 12.0.1 Enabled
findmefollow 12.0.11 Enabled
framework 12.0.45 Enabled
fw_ari 12.0.7 Disabled
fw_langpacks 2.11.2 Enabled
hotelwakeup 2.11.3 Enabled
iaxsettings 2.11.0.3 Enabled
infoservices 12.0.1 Enabled
irc 2.11.0.4 Enabled
ivr 2.11.0.11 Enabled
javassh 2.11.2 Enabled
languages 2.11.0.2 Enabled
logfiles 12.0.6 Enabled
manager 12.0.2 Enabled
miscapps 2.11.0.2 Enabled
miscdests 2.11.0.4 Enabled
music 12.0.1 Enabled
outroutemsg 2.11.0.2 Enabled
paging 12.0.13 Enabled
parking 12.0.9 Enabled
pbdirectory 2.11.0.2 Enabled
phonebook 2.11.0.2 Enabled
phpinfo 2.11.0.1 Enabled
pinsets 2.11.0.9 Enabled
presencestate 12.0.16 Enabled
printextensions 2.11.0.1 Enabled
queueprio 2.11.0.2 Enabled
queues 12.0.17 Enabled
recordings 12.0.5 Enabled
restart 12.0.1 Enabled
ringgroups 12.0.3.2 Enabled
setcid 2.11.0.4 Enabled
sipsettings 12.0.10 Enabled
sipstation 12.0.4 Enabled
sms 12.0.19 Enabled
speeddial 2.11.0.2 Enabled
timeconditions 12.0.7.1 Enabled
tts 2.11.0.10 Enabled
ucp 12.0.11 Enabled
ucpnode 12.0.1alpha8 Enabled
userman 12.0.26 Enabled
vmblast 12.0.1 Enabled
voicemail 12.0.32 Enabled
weakpasswords 12.0.2 Enabled
webrtc 12.0.1 Enabled

I believe those module version numbers are a FreePBX thing, not an Asterisk thing, so those aren’t really relevant to me. I think the important thing here is:

  • Does work with Asterisk 11 (what minor version)?
  • Doesn’t work with Asterisk 13 (what minor version?)
  • Paging doesn’t work after Asterisk 13.2.0

Have you tried Asterisk 12? It was a standard release with a LOT of changes IIRC, so if Asterisk 12.0.0 doesn’t work, well, that tells us a lot.

If you do “asterisk -r” it should show up the major/minor version upon connection. asterisk -v or asterisk -V will also just print out the version info.

So to be clear, we’ve found that ADSI works up to 11.25.3…but does not work* in 13.2.0.

Definition of Not Working: ADSI is enabled and sends CAS, but is not recognized by CPE.

Paging doesn’t work after 13.2.0 at all??? Hmm that seems like an important feature…

I’ve been installing using the FreePBX distros…and have not seen one including Asterisk 12.

Found a copy of 12.0.0-alpha1, going to try to compile that and see what happens!

You said “my Avaya sets will not page after Asterisk version 13.2.0” so I was just paraphrasing your earlier post.

Since you mentioned 13.2.0, I’m curious if that also applies to 13.1.0. I’m inclined to think so at this point.

I don’t concern myself with FreePBX, so I don’t know if they have versions corresponding to all the Asterisk releases - possibly not. Probably worth just getting the actual release and trying that for testing.

Definitely narrowing it down, though. Pretty sure we can rule out 13 as broken, so that means it’s looking like it probably got broken in 12 somewhere - maybe even right at the beginning…

Oh yeah, spent the entire day screwing around with untarring various Asterisk 12.0.0-Alpha1 through 12.6.idunno and some of others, only to fail to correctly install, configure, track down missing dependencies, make again, etc, go off on a wild tangent with Alembic and python and a whole bunch of other stuff that I don’t normally step in… and sorry going to have to give up and move on to something more productive.

Somewhere 11.25.3 and 13.2.0 is the best I could manage…

Could not get ANY version of 12 to even install on my machine correctly or run. Perhaps I am doing it wrong…so unless you know of a BOOTABLE install version of Asterisk 12, am going to have to admit defeat.

Can’t ADSIProg my phones or page my Avayas in Asterisk 19. Sigh

Try installing using the steps here: Docs - PhreakNet

Those commands should successfully install any version of Asterisk (just replace the tarball link).

Alternately, you can try the automated installer: GitHub - InterLinked1/phreakscript: A utility to automate the installation, maintenance, and debugging of Asterisk/DAHDI, while integrating additional patches to provide the richest telephony experience

phreaknet install --version=12.0.0 should do the trick once installed.

Oh wow…just took a quick scan of your link: wish i had STARTED here LOL.

Thanks…let you know once i get some more free time in the Lab…!

David

Sounds good, let me know how it turns out.

Incidentally, I tried compiling Asterisk 12.0.0 in a VM today, and it definitely did not go so well. I run into exactly these issues:

If file doesn’t know what the solution is, then I suspect probably nobody does, and without finding it might need to use an older kernel. What Linux distro are you using for this currently?

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.