Author Topic: [SOLVED] Using AVAILSTATUS after the Read module  (Read 1901 times)

DFLiddle

  • Newbie
  • *
  • Posts: 21
  • Karma: 1
    • View Profile
[SOLVED] Using AVAILSTATUS after the Read module
« on: July 18, 2016, 04:20:35 PM »
I am using the Read module to allow callers to enter an extension. I'm already using the simple form included as a template, but I wish to take it further. If possible, I would like to use the AVAILSTATUS variable after that to respond to the caller's entry. My guess is that I need to make use of the Command and SwitchManually modules, but I don't know to phrase the command properly—if it can indeed be done this way.

This part of my intended call flow, including my module guesswork, is included in the attached screen shot
« Last Edit: August 02, 2016, 03:53:36 PM by DFLiddle »

goseph

  • Hero Member
  • *****
  • Posts: 841
  • Karma: 35
    • View Profile
Re: Using AVAILSTATUS after the Read module
« Reply #1 on: July 18, 2016, 04:32:50 PM »
What exactly is inside the Command-Module?

DFLiddle

  • Newbie
  • *
  • Posts: 21
  • Karma: 1
    • View Profile
Re: Using AVAILSTATUS after the Read module
« Reply #2 on: July 18, 2016, 04:36:25 PM »
Only my first uninformed guess: ChanIsAvailable()

goseph

  • Hero Member
  • *****
  • Posts: 841
  • Karma: 35
    • View Profile
Re: Using AVAILSTATUS after the Read module
« Reply #3 on: July 18, 2016, 04:43:56 PM »
Only my first uninformed guess: ChanIsAvailable()
How about:
Code: [Select]
ChanIsAvail(${INTEXTEN})
or
Code: [Select]
ChanIsAvail(${INTEXTEN},as)

Please split up the callflow and use the Dial-Module. It is easier to debug this way.

DFLiddle

  • Newbie
  • *
  • Posts: 21
  • Karma: 1
    • View Profile
Re: Using AVAILSTATUS after the Read module
« Reply #4 on: July 18, 2016, 04:55:28 PM »
The suggested commands result in no change to the system's behavior—the call is disconnected after an extension is dialed.

How about:
Code: [Select]
ChanIsAvail(${INTEXTEN})
or
Code: [Select]
ChanIsAvail(${INTEXTEN},as)

I'm afraid I don't understand this request:
Quote
Please split up the callflow and use the Dial-Module. It is easier to debug this way.

goseph

  • Hero Member
  • *****
  • Posts: 841
  • Karma: 35
    • View Profile
Re: Using AVAILSTATUS after the Read module
« Reply #5 on: July 18, 2016, 04:58:50 PM »
Use a Dial-Module do dial another CallFlow after using the Press-Module.
Put everything after 1 and 2...in a new CallFlow.

Export your CallFlow and upload it, please. Maybe i'll be able to debug later.
« Last Edit: July 18, 2016, 05:02:27 PM by goseph »

DFLiddle

  • Newbie
  • *
  • Posts: 21
  • Karma: 1
    • View Profile
Re: Using AVAILSTATUS after the Read module
« Reply #6 on: July 18, 2016, 05:26:42 PM »
Ah, OK ... is the attached screen shot reflective of a better test call flow?

goseph

  • Hero Member
  • *****
  • Posts: 841
  • Karma: 35
    • View Profile
Re: Using AVAILSTATUS after the Read module
« Reply #7 on: July 19, 2016, 01:51:33 AM »
Solution:
I got it, see export of Call-Flow attached!

You can import that Call-Flow.

IMPORTANT: You must use the regular CFE-Module ChanIsAvailable anywhere in the Callflow (for excample right after answer) or in a new "fake" CallFlow.
Otherwise the Module needed is not loaded.

This solution here (attached) combined with this could be interesting as well.
« Last Edit: July 19, 2016, 05:47:33 PM by goseph »

DFLiddle

  • Newbie
  • *
  • Posts: 21
  • Karma: 1
    • View Profile
Re: Using AVAILSTATUS after the Read module
« Reply #8 on: July 19, 2016, 12:05:21 PM »
Thank you very much, @goseph, for the effort you have put into my conundrum. I have imported and tested the call flow you constructed. However, I get disconnected each time. The following appears in the log:

Code: [Select]
2016-07-19 10:52:29 asterisk[2360]: WARNING[9818]: pbx.c:4376 in pbx_extension_helper: No application 'ChanIsAvail' for extension (CALLFLOW-629146604578ddc091fcdb, CALLFLOW-START, 4)
Now, please keep in mind that I'm no telephony professional. Perhaps I should add this to my skill list, but for the time being I have to look for information and help as intelligently as I can. After searching for the way to list Asterisk applications, I used the following commands after logging in to my AskoziaPBX through SSH:

Code: [Select]
asterisk -r
core show applications

Nowhere in the ensuing list did I see anything resembling ChanIsAvail. Maybe I shouldn't expect it to appear in this list, but I see others that are listed here:

Asterisk 10 Dialplan Applications
https://wiki.asterisk.org/wiki/display/AST/Asterisk+10+Dialplan+Applications

Despite the absence of ChanIsAvail, there is a module in the Call Flow Editor named ChanIsAvailable, but one must specify a particular extension to use it. It's a frustrating experience for my ignorance and lack of skill, but fascinating as a logical problem to solve. Insight from others is greatly appreciated.


NOTE: My appliance is running AskoziaPBX 4.0, and presently cannot be upgraded due to memory limitations—it only has 256 MB. Here's the information about Asterisk:
Code: [Select]
Asterisk 10.9.0 built by root @  on a i486 running Linux on 2015-02-19 01:03:08 UTC

DFLiddle

  • Newbie
  • *
  • Posts: 21
  • Karma: 1
    • View Profile
[SOLVED] Using AVAILSTATUS after the Read module
« Reply #9 on: August 02, 2016, 03:52:32 PM »
Many thanks to @goseph for the time that he spent examining my configuration and explaining what was going on. He did far more than might be expected from the typical request for help on the forums.

It seems that AskoziaPBX does not load the Asterisk application ChanIsAvail() when it starts. If one wishes to use this application in a call flow, then the solution is to use the Call Flow Editor's own module, ChanIsAvailable, in any call flow. It can even be one that's not actively used. So long as it exists in any call flow, the application will be loaded and made available to other call flows.

The enabling call flow that we created is attached to this entry.