Making analog channel off-hook using Asterisk Manager

Hi Everyone,

is it possible to make an analog channel off-hook/on-hook using Asterisk Manager? The goal is to make the telephone line busy until made on-hook again using Asterisk Manager.

Can you give us the application? From my days in Inside Plant, I’m pretty sure it’s not good to just leave the line off-hook like that.

If you wanted to explore alternatives, you could do something like setting up a time condition that answers the call, then plays back a busy signal, or terminates the call is some other way.

@cynjut,

I won’t be leavin git off-hook for life time then. We’ll make it on-hook again using the Asterisk manager as I mentioned in my post. The story behind requirement is:

We have four analog channels which are mapped to our agent applications on one-to-one basis. Once our agent receives a call from a channel, he then takes some time to enter the data of caller in our CRM application and puts the phone cradle off-hook. During this time, if another call comes in on the same channel, it will flush the data entry and initiate new record in crm application. That is why we want to keep that specific channel off-hook until user puts back the phone cradle back.

why would you not use queues with skip busy agents enabled?

2 Likes

He wants to build in a “cool off” time at the end of each call for documentation. The time seems to be triggered (right now) by the phone being off-hook so that he can’t get another call. Since the phone number is a one-for-one with the agents, each number has one answerer, and he wants to be able to finish documenting the last call before the next one starts.

Note that this is NOT the way I’d do this (four lines, four agents, four destinations off one queue), but his process seems to work for him, so …

What are ways to implement a “cool down” that can be triggered by something on the phone?

The first one that comes to mind is to add something that sets the phone up in DND - maybe an ARI script in the CRM interface? As soon as the agent picks up a call, the phone is marked DND until he clears the DND (*79?). Once he’s ready for another caller, he can “press the DND button” (or dial *79) and turn DND off, making him available for another call. That way, your idea of using a queue would make the rest of the system simple, and give the customer a better user experience (something about the average wait time, etc. They would always be “first in line” since the call is coming on one-for-one on DAHDI (the number will be busy if they agent is on a call) and the customer would be dropped into the queue if the extensions is still DND, but otherwise available.

1 Like

there is a “wrap up time” in the queue. this is the amount of time given to an agent after a call has completed before giving them another call. you don’t need scripts to do this, it is part of the standard implementation

2 Likes

Is it a bad idea to create a single queue for all the four incoming lines?

The problem is that if my agent keeps the phone off-hook, he still gets new call alert on his phone due to the call-waiting feature of Asterisk? I disabled it from Freepbx, from each Extension, from physical IP Phone setup, but nothing seems to help here. After 60 seconds, the phone/extension automatically gets on-hook. Is there a way to avoid this? If so, I won’t be in need of making analog channel off-hook anymore.

No - that’s actually the way I would do it. Having each line go to one, and only one, agent is the opposite of how I would set the system up.

Call Waiting is set on the extension. You should be disabled this on your queue-enabled extensions. Also, make sure that the phones only have one line on the phone. Once you disable Call Waiting on the extension definition on the server (under the “Advanced” tab, IIRC). If the phone is off-hook and Call Waiting is not enabled, the call will not be routed to that extension if it is off-hook.

If Call Waiting is enabled, there is no way to not get a new call. That would seem to me to be the #1 thing you need to fix.

@cynjut,

First of all, many thanks for keeping in continuous touch with me on this for a resolution. I have already disabled the call waiting option in Extention Definition -> Advanced Tab -> Extension Options section. In my IP Phone (GrandStream 1610), I have also made this option disabled. But still of no use.

Do you have an IP Phone? If you call on it from outside, finish the call from the caller end, keep the IP Phone off-hook, and wait for some 60 seconds, you may note that the tone on the IP Phone changes to normal and then it will get a new call. I am not sure where else should I disable this Call Waiting option.

This is a “safety” feature of most IP phones. This is used to identify when a phone has not been correctly hung up. Basically, the phone overrides the hook switch and hangs the phone up.

In my original response, I told you that you will need to set the phone’s Do Not Disturb feature. This is the only way I can think of to do what you are trying to do without using the “Cool Down” settings in your queue.

I think I’ve already covered at least one way to solve this problem.

So, instead of just leaving the phone off the hook (which you have found does not work) use the DND (Do Not Disturb) button to make the phone unavailable. You may even be able to use the DND button while in the call to hang it up and make the phone unavailable.

Just so we understand one another:

There is no way to just leave an IP phone off hook. If the handset is not in the receiver, the SIP phone will eventually say “screw it” and pretend the phone is hung up. Do Not Disturb is your only option for an agent managed solution.

1 Like

@cynjut,

Yes, you are right There is no way to just leave an IP phone off hook. It seems Do Not Disturb is our only option for an agent managed solution. By the way, do you have any idea if there is some C# API similar to AsterNET that works with PJSIP?

Nope. Sorry. Is the AsterNET API specific to Chan-SIP? If so, just use Chan-SIP. The channel drivers are (in many respects) interchangeable. If you don’t have support for PJ-SIP, then don’t do that.

@cynjut,

Well, the AsterNET API is sending events late for AgentConnect and AgentCalled via Asterisk Manager. May be its specific to AsterNET, but we need the events on time in our .NET application. When I create an extension of Chan-SIP type in Freepbx, my IP Phones/Soft phones are not able to connect to the Exchange server. Does anyone have any idea how to fix this or guide in the right direction?

Your Exchange server is using TCP (rather than UDP) for the SIP port, right?

There is a way to turn on TCP for Chan-SIP. It’s an Advanced Setting, but it is possible.