All pastes #285817 Raw Edit

Anonymous

public text v1 · immutable
#285817 ·published 2006-12-20 02:02 UTC
rendered paste body
<freepbx> Revision 1549 at http://freepbx.org/trac/changeset/1549: Ticket #611 (Bugs) -- Invalid Outbound Dial prefix in Trunks...
<X-Rob> #1549 ?
<groogs> i was actually working on changing drawselects() so it wouldn't use js and the hidden 'goto' variable
<freepbx> Ticket 1549 at http://freepbx.org/trac/ticket/1549: Mistake in /admin/functions.inc.php drawselects() (closed Bugs: fixed)
<groogs> yes
<groogs> sorry ;)
<groogs> i forgot about it though, until it just showed me conflicts when i went to update..
<X-Rob> Mmmm.. Stick it in trunk, I guess?
<naftali5> no problem, 1549 is a simple fix, that was mine
<groogs> ok nm
<groogs> i see the real fix
<groogs> strpos($goto,'custom') === false
<groogs> uh..
<naftali5> not really.
* groogs needs to ponder...
<naftali5> the tip says that a custom destination MUST contain the word custom.
<naftali5> problem was that the $goto variable was being reset to module name if we found a match beforehand
<groogs> isn't that good?
<naftali5> so we changed that to $gotomod so the $goto variable does not get killed
<naftali5> no
<groogs> eg, if you create a custom context that goes to  ivr1,s,1  then when you reload the page, it should automatically select IVR 1 properly..
<naftali5> not sur how you have it without js
<naftali5> yes that is right
<naftali5> but the $goto variable is ivr,s,1
<groogs> <inut type="radio" name="goto$I"
* groogs fails to see issue
<naftali5> then gets reset on match the module name
<naftali5> do you have the change from 1549 on your box??
<naftali5> if not lets run a simple test.
<groogs> no mine is in conflict right now with the other changes i did..
<naftali5> good.
<naftali5> well maybe with your changes it won't happen, but let's see
<groogs> oh i see
<groogs> gotomod is only used by the hidden field anyways
<groogs> yeah, i think it's a non-issue with my code
<naftali5> yes and no
<groogs> i assume something happened that made you find this bug?
<naftali5> create a time condition or anything with a destination, and choose custom and type custom-myapp,s,1 submit
<naftali5> submit again and it is gone!
<groogs> ok, let me try
<naftali5> i don't know if you use the module name later, but $goto starts as being ivr1,s,1 and when it matches it becomes just ivr. that is not good!
<naftali5> if you _do_ need the matche module name later store it in $gotomod not $goto
* naftali5 wonders of the method of extracting the dest out of the POST will still be the same with groog's mod
* naftali5 amuses himself by couting sheep while groogs is testing
<pnlarsson> X-Rob: ping
<pnlarsson> exten => s,n,GotoIf($["x${CALLERID(name)}"!="xhidden"]?report:hidecid)
<pnlarsson> its xhidden
<pnlarsson> not hidden
<X-Rob> Bah
<pnlarsson> well here it's 22:37 i can only imaging what your time is...
<wvroger> x-rob do you use phpedit or freehand your coding?
<X-Rob> just freehand
<freepbx> Changeset http://freepbx.org/trac/changeset/3370: Wups, xhidden not hidden.. (Tue, 19 Dec 2006 21:54:48 GMT)
<freepbx> Changeset http://freepbx.org/trac/changeset/3371: Merged revisions 3370 via svnmerge from  ... (Tue, 19 Dec 2006 21:56:31 GMT)
<X-Rob> So
<X-Rob> What's stopping 2.2rc2 from going out, anyone?
<Djeli> "The lack of ability to create SIP/IAX2 devices with hexadecimal device IDs", he suggests hopefully.
<X-Rob> heh
<wvroger> roll it out rob...
<groogs> ok got distracted...
<vgster> back
<groogs> X-Rob: do you know why the hidden goto was used in drawselects(), and why some modules use  ${$goto0.'0'} and why some use ${$goto_indicate0.'0'} ?
<groogs> my change was basically to JUST use goto instead of goto indicate..
<X-Rob> This wa ssomething that Ryan wrote, and I had to reverse engineer it for the IVR stuff
<groogs> imho it's a very weird way to do it.. ;)
<X-Rob> Yes
<groogs> i would have used arrays so at least theres not weird variablevariable logic going on
<X-Rob> My simple answer is 'no, I don't know why'
<groogs> ok so, can i change the stuff that uses goto indicate and fix this?
<X-Rob> Certainly
<groogs> my main fix was to allow destinations to use the same dropdown box
<groogs> eg, i added one called 'applications' and put directory, and phonebook directory in there
<groogs> instead of having a bunch of modules that just had one destination having their own radio box and selectbox
<X-Rob> Yep
<groogs> ok and there, fixed the other problem with goto/gotomod ..
<freepbx> Ticket http://freepbx.org/trac/ticket/772 (feature requests closed): Bypass pinset check for some extensions: duplicate:   #1029 (Tue, 19 Dec 2006 22:04:30 GMT)
<groogs> custom is now just a fallback..  if nothing else matches, it populates goto
<groogs> i think that makes a lot more sense.
<groogs> er, populates custom
<wvroger> when submitting a ticket, do I submit a ticket for each particular thing that is wrong..example on the add route the hover help doesnt work on trunk sequence & on dial patters...so do I create 2 tickets or just one indicating both issues?
<X-Rob> two tickets
<X-Rob> one for each issue
<freepbx> Ticket http://freepbx.org/trac/ticket/1561 (bugs created): Hover help in Outbound Routes - Dial Patterns: Hover help in Outbound Routes - Dial Patterns (Tue, 19 Dec 2006 22:19:02 GMT)
<freepbx> Ticket http://freepbx.org/trac/ticket/1562 (bugs created): Hover help in Outbound Routes - Trunk Sequence: Hover help in Outbound Routes - Trunk Sequence (Tue, 19 Dec 2006 22:20:00 GMT)
* vgster has quit ("Quit")
* pnlarsson has quit (Read error: 113 (No route to host))
<groogs> wvroger: that probably COULD be one, but its fine like that too.. it's easier for us to fix if it's one per unit of work, as in one ticket of stuff that someone will fix all at one time
<groogs> actually never mind, just two is fine :p
<groogs> i dont really know how to explain it otherwise
<naftali5> groogs, will my existing code get the dest out of the POST with your new way?
<naftali5> $dest= isset($_REQUEST["goto0"])?$_REQUEST[$_REQUEST['goto0'].'0']:null;
<groogs> yes
<naftali5> good
* wvroger1 (n=wvroger@216.115.192.22) has joined #freepbx-dev
<naftali5> what makes it decide to choose custom as opposed to one of the other radios (on edit)
<Kerry_G> X-Rob - awake yet?
<groogs> if none of the other radios match
<groogs> which has the benefit that if you have it going to say, conferences,801,1 (via the conferences radio box), then if you remove the conferences module, it will check custom, and just say "conferences,801,1" in the textbox
<naftali5> it used to need the wrod "custom" in it,  strpos($goto,'custom') === false , is this still required?
<groogs> no
<naftali5> better change the tooltip then :) good work!
<groogs> i guess i can check that in..
<groogs> still need to change queues and ivr, they use goto_indicate
<naftali5> the tooltip says The context name <b>MUST</b> contain the word 'custom'
<groogs> yeah and whoops, i probably should have fixed that
<freepbx> Ticket http://freepbx.org/trac/ticket/1563 (bugs created): Error when trying to Check for Update Online: Error when trying to Check for Update Online (Tue, 19 Dec 2006 22:59:34 GMT)
<groogs> ok, your hook is in r3374 ..
<groogs> i'm just going to grab a bite to eat, be back in 20 mins or so
<naftali5> groogs, so when you put it in it freepbx_get_contexts()  will return an associative array(context=>outrt-1 description=>'Local calls' module=>core section=>routing priority=>1)
* Djeli is now known as Djeli-afk
<freepbx> Changeset http://freepbx.org/trac/changeset/3372: drawselects() updated: - removed usage of goto_indicate and 'goto' hidden  ... (Tue, 19 Dec 2006 23:12:57 GMT)
<freepbx> Changeset http://freepbx.org/trac/changeset/3373: Updated tooltip for custom destination (Tue, 19 Dec 2006 23:14:17 GMT)
<freepbx> Changeset http://freepbx.org/trac/changeset/3374: Added freepbx_get_contexts() function to invoke module _contexts() hook  ... (Tue, 19 Dec 2006 23:16:16 GMT)
* wvroger has quit (Read error: 110 (Connection timed out))
* wvroger1 is now known as wvroger
* wiseoldowl has quit (Read error: 60 (Operation timed out))
* Defend is now known as defend
<Kerry_G> X-Rob - ping
<X-Rob> pong
<X-Rob> Kerry_G, 
<Kerry_G> we are going to push our release of tb 2.0 to Jan 3rd
<X-Rob> k
<X-Rob> I've just got to pick groogs's brains re rc2, but AFAIK it's ready to go.
<Kerry_G> yeah, we don't want to rush anything and then force an update on users a week or so later
<X-Rob> excellent
<groogs> X-Rob: back