Open Source Training Seminar FreePBX Paid Support

Ticket #1961 (closed Bugs: fixed)

Opened 1 year ago

Last modified 1 year ago

findmefollow problem with extensions 0-leaded

Reported by: lanzaandrea Assigned to: p_lindheimer
Priority: minor Milestone: 2.3
Component: Follow Me Version: 2.3-branch
Keywords: Cc:
Confirmation: SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

I found a problem with the configuration of findmefollow when the extension has a leading zero. This is due to the fact that "grpnum" field il defined as bigint, and also if you act on the database itself a "05811" becames "5811" (obviously) The problem is that I actually have a dial plan with some extensions starting with a zero. We can discuss a long time on the opportunity of doing this, but in my situation this is a requirement. What I don't understand is how the interface could let me see the correct 05811 entry... Anyway what I see in extension_additional.conf is:

[ext-findmefollow] include => ext-findmefollow-custom exten => 5810,1,Macro(user-callerid,) exten => 5810,n,GotoIf?($["foo${BLKVM_OVERRIDE}" = "foo"]?skipdb) exten => 5810,n,GotoIf?($["${DB(${BLKVM_OVERRIDE})}" = "TRUE"]?skipov) exten => 5810,n(skipdb),Set(NODEST=) ........

No prblem in "grplist" field, as this field is defined as varchar 255

What can I do ?

Andrea

Change History

05/29/07 03:00:35 changed by lanzaandrea

I tried to modify grpnum data tipe from bigint to varchar 255 with no difference There must be something also in the php code itself stripping leading zero

05/29/07 03:17:44 changed by lanzaandrea

After modifying vartype for grpnum I inserted a new follow me setting for 05810 and a 5810 was inserted. Then I manually modify the record changing 5810 into 05810. I make a little modify to an extension in order to get the red bar and as I pressed it the extensio_additional.conf was OK, with the entry for 05810. I tried a call and I succesfully have all the extensions ringing. So the solution could be: 1) modify vartype of grpnum 2) modify the php page in order not to remove the leading zero

Can anybody give me an advice on how to perform this second task ?

thanks, Andrea

05/29/07 04:16:37 changed by lanzaandrea

I found this solution: 1) modify vartype to varchar 2) edit ...amp/admin/modules/findmefollow/functions.inc.php modify function findmefollow_add in this way:

$sql = "INSERT INTO findmefollow (grpnum, strategy, grptime, grppre, grplist, annmsg, postdest, dring, needsconf, remotealert, toolate, ringing, pre_ring) VALUES ('".str_replace("'", "", $grpnum)."', '".str_replace("'", "", $strategy)."', ".str_replace("'", "", $grptime).", '".str_replace("'", "", $grppre)."', '".str_replace("'", "", $grplist)."', '".str_replace("'", "", $annmsg)."', '".str_replace("'", "", $postdest)."', '".str_replace("'", "", $dring)."', '$needsconf', '$remotealert', '$toolate', '$ringing', '$pre_ring')";

(simply doing for the first value what is done with the other varchar valus)

It seems to me to perfectly solve my problem, but it's probably one of the first times I look at a php source so.....

I would like to know if this solution is acceptable and if it is it could be inserted into a future release of find me follow module

Andrea

06/09/07 02:42:07 changed by p_lindheimer

  • version changed from 2.2.1 to 2.3-branch.

06/09/07 02:42:24 changed by p_lindheimer

  • priority changed from blocker to minor.

06/18/07 00:56:04 changed by lanzaandrea

I didn't ear anything more about this. What is the situation ? Will be changed in next release of the module ? Or am I the only having extensions with leading zero on follow me ?

thanks, Andrea

06/28/07 15:35:25 changed by WAudette

FYI, I thought I'd let you know that something is happening with this.

This issue is currently being discussed as some design decisions on how to handle leading "0's" is at issue that may affect how a patch/fix/workaround is applied.

Thank you for bringing this to our attention.

WAudette...

08/02/07 07:14:09 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to fixed.

r4640 (findmefollow)
r4638 (ringgroups)

There were many more changes then listed above, if you have implemented this on a release prior to 2.3, you should review the additional changes or upgrade to 2.3 when you are ready to get the changes.

Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads