Author Topic: Call Forward - proposed feature discussion  (Read 15455 times)

Facundo Ameal

  • Full Member
  • ***
  • Posts: 83
  • Karma: 5
  • VoIPing
    • View Profile
    • Railtion
Call Forward - proposed feature discussion
« on: August 11, 2010, 08:14:21 AM »
I've posted a topic in Dialplan -> Applications (http://forums.askozia.com/index.php/topic,1332.0.html). Didn't know if I had to post it here or there. But, certainly, if we want this application to be more easily used, the extensions.conf modifications have to be automatically done by the webGUI.

I would like someone to review this application, then I make the necessary patches for the webGUI to make the new dialplan possible. Is that OK?

Cheers!
« Last Edit: August 13, 2010, 01:00:01 PM by Facundo Ameal »

giovanni.v

  • Hero Member
  • *****
  • Posts: 694
  • Karma: 53
    • View Profile
    • BoneOS SDK &  TeeBX VoIP communication platform
Re: Call Forward Application - dialplan hacking
« Reply #1 on: August 11, 2010, 09:08:44 AM »
I'm working on the same improvement to get a complete user configurable call forward feature.

This is to accomplish a call forward feature. Some additional options available to choose from:
a) About the way the feature will start, controlled by the first digit of the feature activation option...
  1) Immediate. Just in time the caller start calling, the dialled extension will never ring.
     The forward destination will be called instead.
  2) No answer. The dialled extension will ring until his answer timeot expires,
     then the forward destination will be called.
  3) Like option 1 but will be forwarded only if the called extension is busy.
b) Each of the above option has a condition to fire the forward which depends on "who is calling", controlled by the second digit of the feature activation option...
  1) Only if the call came from a pbx extension, internal.
  2) Only if the call came from any provider.
  3) Forwad anyway.

A number will be provided as a "call forward feature code" to enable/disable it and control the options.

- Update 2 - A printout of the experimental db family:
askoziapbx*CLI> database show callforward
/callforward/602-status                           : 33
/callforward/602-target                           : 0655554444
/callforward/605-status                           : 13
/callforward/605-target                           : 05439991
/callforward/606-status                           : 22
/callforward/606-target                           : 601


Because many times users abuse of such kind of features (like accidental activation by misdialling or chaining forwards) some feedback about its status must also be provided via the gui to let some control to the admin.
Also good the idea from Facundo to control the number of chained forwards and avoid loops.

I will look at yours and attached also the draft I'm working on for anyone to review and cooperate.
« Last Edit: August 12, 2010, 02:01:08 PM by giovanni.v »

Michael

  • Askozia Staff
  • Hero Member
  • *
  • Posts: 1020
  • Karma: 49
    • View Profile
Re: Call Forward Application - dialplan hacking
« Reply #2 on: August 11, 2010, 11:37:30 AM »
Is this to accomplish a follow-me type functionality, or more generally, a sequential call group? Could you describe the functionality in a few use-cases?

Facundo Ameal

  • Full Member
  • ***
  • Posts: 83
  • Karma: 5
  • VoIPing
    • View Profile
    • Railtion
Re: Call Forward Application - dialplan hacking
« Reply #3 on: August 11, 2010, 06:12:05 PM »
I'm working on the same improvement to get a complete user configurable call forward feature.

I will look at yours and attached also the draft I'm working on for anyone to review and cooperate.
Great! I'll take a close  look to the diagram. It seems a remake of the dialing sequence and seems great. I'll get back to you with comments.

Cheers!

Facundo Ameal

  • Full Member
  • ***
  • Posts: 83
  • Karma: 5
  • VoIPing
    • View Profile
    • Railtion
Re: Call Forward Application - dialplan hacking
« Reply #4 on: August 11, 2010, 06:17:34 PM »
Is this to accomplish a follow-me type functionality, or more generally, a sequential call group? Could you describe the functionality in a few use-cases?
This is to accomplish Call Forward only. Not only to internal extensions but to external or call groups too. Bellow I put some examples:

Code: [Select]
101 CF his extension to 102
102 CF his extension to 1000
In the example above extensions 101and 102 has their extensions forwarded. So when yo call 101, it will, first, check CF status of this extension, then 102 and finally 1000 (which is a call group). The extension that will be calling, in the end, is 1000 (so all the extensions in the call group).

Code: [Select]
101 CF his extension to 102
102 CF his extension to 101

In the case above, a loop is done. So it will only let loop 3 times. Then it will call the extension. In my experience, this happens a lot and the call keeps getting loop into the PBX and nothing good results from that.

Hope I could explain it well. Tell me if you have any doubts.

Cheers.

giovanni.v

  • Hero Member
  • *****
  • Posts: 694
  • Karma: 53
    • View Profile
    • BoneOS SDK &  TeeBX VoIP communication platform
Re: Call Forward Application - dialplan hacking
« Reply #5 on: August 11, 2010, 08:01:46 PM »
Is this to accomplish a follow-me type functionality

Call forward only, just edited the original post to dig a bit more into.

Not want to sound annoying but i think "follow-me" is a different feature... its a call forward controlled/activated from the destination extension (a pin code is usually required).

Facundo Ameal

  • Full Member
  • ***
  • Posts: 83
  • Karma: 5
  • VoIPing
    • View Profile
    • Railtion
Re: Call Forward Application - dialplan hacking
« Reply #6 on: August 12, 2010, 02:46:39 AM »
Call forward only, just edited the original post to dig a bit more into.
It seems to be pretty much complete. Mine was much simpler, I think yours is the right way to go. I'm just wondering how would you save all that data into Asterisk DB. Can't figure out how, mi mind is not full speed today :S

Do you have the diagram in SVG or any editable format? So I can try to implement the loop control there and don't have to draw it again.

Not want to sound annoying but i think "follow-me" is a different feature... its a call forward controlled/activated from the destination extension (a pin code is usually required).

I have the FreePBX idea of Follow-Me. Can you explain more about it? I haven't seen that feature anywhere else, so I don't fully understand what do you mean. I thought that CF was a feature activated by the extension user and Follow-Me was configured by admin.

giovanni.v

  • Hero Member
  • *****
  • Posts: 694
  • Karma: 53
    • View Profile
    • BoneOS SDK &  TeeBX VoIP communication platform
Re: Call Forward Application - dialplan hacking
« Reply #7 on: August 12, 2010, 02:12:31 PM »
I'm just wondering how would you save all that data into Asterisk DB

Updated the original post again to show the db family used.
However i'm changing (again...) my mind abuot the way to store the feature status in the asterisk db to use one key only so reducing the file i/o requested by the dialplan.

askoziapbx*CLI> database show callforward
/callforward/602                                  : 330655554444
/callforward/605                                  : 1305439991
/callforward/606                                  : 22601
3 results found.


One key for each extension which olds the feature status using the first two digits and the target on the remaining chars; the result need to be parsed... need to script something to test which option is faster to reduce the dialplan latency.

Quote
Do you have the diagram in SVG or any editable format?

Sorry, no. The flowchart was produced using a proprietary software unable to export to SVG, raster images only.

However the flowchart shows the logic at "dial time" not the logic requested at "control time" (the feature activation/deactivation by the user).
The requested check to avoid loops can be safely done at control time, this also lower requested resources at dial time which is more important because certainly happen more frequently.

The evaluation about chained forwards can be done on both level and each solution will fail on some condition.
- At dial time, assuming extension 1, 2, 3, 4 forwarded each to the next one if we set max forward to 3 nodes the the call will stop at calling extension 3. Is not what the user 3 expected when activated the feature.
- At control time, assuming the same scenario above, we can check how long is the existing chain in the top of the activating extension and refuse to set the feature. Is somehow a failure too, but the user is aware of the situation immediately... it is also a deadlock because ext. 3 will be unable to forward until the chain count lowers.

Again the dial time solution require more resurces.

Quote
I have the FreePBX idea of Follow-Me. Can you explain more about it? I haven't seen that feature anywhere else, so I don't fully understand what do you mean. I thought that CF was a feature activated by the extension user and Follow-Me was configured by admin.

My idea for those feature says nothing new because came from the consolidated legacy pbx world; 25 years working in this field gave me gray hair... to be honest may have been the recent fiftieth birthday  ;)

The name i know for an "hard coded", system admin configured, call forward is "preset forward", preset forward is configured by the pbx admin and also has a timeout to start it and the extension user can't do nothing to manage that feature.

While the "preset forward" feature focus on centralized management both the "Follow Me" and "Call Forward" moves call control to the user.
"Call Forward" will be activated by a user from its personal extension/terminal/phone... the "Follow Me" can be activated from any pbx user using an extension/terminal/phone owned by other users to get its call from that terminal; sorry, sure my poor english don't help  >:(
Let's try a practical example.
I leave my desk to meet a customer in the meeting room, while talking with him I remember that I am awaiting an important call... I need a call forward on my phone but not wanting to leave my guest, I'm also very lazy and I'd go up two floors.
Thanks to our modern phone system  ;D this is easy to accomplish, I pick up the phone in the meeting room dial the feature code to "Follow me" then my extension number and optionally a pin code... voilĂ  my call ring here in the meeting room phone!

Facundo Ameal

  • Full Member
  • ***
  • Posts: 83
  • Karma: 5
  • VoIPing
    • View Profile
    • Railtion
Re: Call Forward Application - dialplan hacking
« Reply #8 on: August 12, 2010, 07:59:58 PM »
Updated the original post again to show the db family used.
However i'm changing (again...) my mind abuot the way to store the feature status in the asterisk db to use one key only so reducing the file i/o requested by the dialplan.

askoziapbx*CLI> database show callforward
/callforward/602                                  : 330655554444
/callforward/605                                  : 1305439991
/callforward/606                                  : 22601
3 results found.


One key for each extension which olds the feature status using the first two digits and the target on the remaining chars; the result need to be parsed... need to script something to test which option is faster to reduce the dialplan latency.
I agree with the change :)

Sorry, no. The flowchart was produced using a proprietary software unable to export to SVG, raster images only.
No problem.
However the flowchart shows the logic at "dial time" not the logic requested at "control time" (the feature activation/deactivation by the user).
The requested check to avoid loops can be safely done at control time, this also lower requested resources at dial time which is more important because certainly happen more frequently.

The evaluation about chained forwards can be done on both level and each solution will fail on some condition.
- At dial time, assuming extension 1, 2, 3, 4 forwarded each to the next one if we set max forward to 3 nodes the the call will stop at calling extension 3. Is not what the user 3 expected when activated the feature.
- At control time, assuming the same scenario above, we can check how long is the existing chain in the top of the activating extension and refuse to set the feature. Is somehow a failure too, but the user is aware of the situation immediately... it is also a deadlock because ext. 3 will be unable to forward until the chain count lowers.

Again the dial time solution require more resurces.
Again, you are right. Never thought about the expected user behaviour. It definitely should be done at control time.

My idea for those feature says nothing new because came from the consolidated legacy pbx world; 25 years working in this field gave me gray hair... to be honest may have been the recent fiftieth birthday  ;)
That's why I asked you. I have only lived 25 summers ;)

The name i know for an "hard coded", system admin configured, call forward is "preset forward", preset forward is configured by the pbx admin and also has a timeout to start it and the extension user can't do nothing to manage that feature.

While the "preset forward" feature focus on centralized management both the "Follow Me" and "Call Forward" moves call control to the user.
"Call Forward" will be activated by a user from its personal extension/terminal/phone... the "Follow Me" can be activated from any pbx user using an extension/terminal/phone owned by other users to get its call from that terminal; sorry, sure my poor english don't help  >:(
Let's try a practical example.
I leave my desk to meet a customer in the meeting room, while talking with him I remember that I am awaiting an important call... I need a call forward on my phone but not wanting to leave my guest, I'm also very lazy and I'd go up two floors.
Thanks to our modern phone system  ;D this is easy to accomplish, I pick up the phone in the meeting room dial the feature code to "Follow me" then my extension number and optionally a pin code... voilĂ  my call ring here in the meeting room phone!
That would be from internal extensions. But Follow-Me should else be available to make it work with cell phones and fixed lines - or that was what I thought. For me, it was a kind of "calling group", all Follow-Me extensions ring at the same time/each at a time until one of them is answered. But if in conventional PBX is implemented the other way, is also very nice and we could find a way to enable that function from outside.

It would nice to make some steps to follow and get our hands dirty for this. During weekend, I can try to make the feature code to work as expected or close to it. Anyway, does anyone else agree with us about the dial time logic?

PS: nevermind about your english, mine is pretty rought too :S

Cheers!

Facundo Ameal

  • Full Member
  • ***
  • Posts: 83
  • Karma: 5
  • VoIPing
    • View Profile
    • Railtion
Re: Call Forward Application - dialplan hacking
« Reply #9 on: August 13, 2010, 05:43:15 AM »
Please, take a look at the flow. It does check if is a loop. I've put a limit of 10, just in case. We can remove it if you want. Perhaps, it has not much sense.

The flow is made of 2 subs: cfExten and checkLoop. First one is the main function and takes care of getting data from extension. checkLoop, as its name, checks if there is a loop in the call forward chain. It a recursive sub.

Comments are appreciated :)

PS: I'm not the best flow designer, not even near that.

« Last Edit: August 13, 2010, 01:02:57 PM by Facundo Ameal »

giovanni.v

  • Hero Member
  • *****
  • Posts: 694
  • Karma: 53
    • View Profile
    • BoneOS SDK &  TeeBX VoIP communication platform
Re: Call Forward Application - dialplan hacking
« Reply #10 on: August 13, 2010, 09:26:36 AM »
It does check if is a loop. I've put a limit of 10, just in case. We can remove it if you want. Perhaps, it has not much sense.

I think a so long chain will be difficult to track by an admin when issues will happen, may become a configurable parameter.
Peraphs forgot the chart about loop check or one discarded because too big? Downsample the png to 256 colors if you had such issue.

I wonder about prompts... invalid exists but the others not, to avoid this dependency i prefer to start using a primitive language... beeps  ;)

I'd like to see this topic subject changed to "Call Forward - proposed feature discussion", do you agree?



Facundo Ameal

  • Full Member
  • ***
  • Posts: 83
  • Karma: 5
  • VoIPing
    • View Profile
    • Railtion
Re: Call Forward Application - dialplan hacking
« Reply #11 on: August 13, 2010, 12:56:02 PM »
I think a so long chain will be difficult to track by an admin when issues will happen, may become a configurable parameter.
Peraphs forgot the chart about loop check or one discarded because too big? Downsample the png to 256 colors if you had such issue.
After posting, I realized that the limit of 10 is not neccesary. It should never happen, so it is possible to remove that. The image is too big but in size not in weight. If you download the file, yo will be able to see. Anyway, I'll try to make it smaller a replace it.

I wonder about prompts... invalid exists but the others not, to avoid this dependency i prefer to start using a primitive language... beeps  ;)
Yes, you are right. I thought about audios, but beeps didn't came to my mind. I love you have a "conventional pbx" background ;)

I'd like to see this topic subject changed to "Call Forward - proposed feature discussion", do you agree?

Absolutely :) It fits better.

Facundo Ameal

  • Full Member
  • ***
  • Posts: 83
  • Karma: 5
  • VoIPing
    • View Profile
    • Railtion
Re: Call Forward - proposed feature discussion
« Reply #12 on: August 13, 2010, 01:03:49 PM »
I've updated the image so it fits the forum :) Sorry for that. Yesterday was a bit late.

Cheers!

Facundo Ameal

  • Full Member
  • ***
  • Posts: 83
  • Karma: 5
  • VoIPing
    • View Profile
    • Railtion
Re: Call Forward - proposed feature discussion
« Reply #13 on: August 19, 2010, 04:26:36 PM »
Guys, anyone has comments? Do you agree? Not?

Cheers,

giovanni.v

  • Hero Member
  • *****
  • Posts: 694
  • Karma: 53
    • View Profile
    • BoneOS SDK &  TeeBX VoIP communication platform
Re: Call Forward - proposed feature discussion
« Reply #14 on: August 19, 2010, 05:37:11 PM »
Guys, anyone has comments? Do you agree? Not?

I am very busy in releasing a couple of applications for customers, so I have little free time. But there's more ...

Facundo, this evolved to a  one-to-one discussion... there are many users who are constantly demanding new features but when you try to open a discussion about something specific usually no chirps. It is not a problem specific to this board but a principle applicable to many open source community projects that lives around user oriented applications.

Usually I'm very proactive but when I see that my work is not useful to the community I'm going to spend my short time in a different way. Sorry.