Viewing 2 posts - 1 through 2 (of 2 total)
  • Migrated from old forum
    Participant
    Post count: 327
    #5987 |

    if i accept calls to 4 different numbers as in the image file attached, then it works. but the last 3 boxes are all the same, so i would have thought i could do it like the bottom image. however when i do, the value of EXTEN that is sent to the next context is ALWAYS the TOP number, even when the 2nd or 3rd or 4th number is called.

    works if i duplicate the code. which is fine in this instance, but later there is long and complex logic with mysql that i need to duplicate over all 8 lines?

    bug?

    Migrated from old forum
    Participant
    Post count: 327
    #5988 |

    i think if have it figured out by looking at the dialplan generated… working as designed, but definitely a behavior that VDP users need to be aware of.

    if you create a dialplan like my 2nd diagram with 5 steps, 3 of which are shared… VDP generates all 5 steps hardcoded to the FIRST extension, then for the 2nd, 3rd, 4th paths through, vdp generates a ‘goto(context,FIRSTextension,1) so that the shared steps are executed…

    but this has the unintended/counter-intuitive (imho) effect of CHANGING ${EXTEN} to the first extension from the point that you start using the shared code…

    so my workaround is to save ${EXTEN} to another channel variable and then use my saved variable as required to route the call through contexts instead of relying on ${EXTEN} to stay put.

    perhaps this is obvious to others, but it wasn’t to me, so i post here hoping it will be useful to someone else.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.