direct dial through IAX peer

Discussion in 'General' started by arfio, Sep 9, 2010.

  1. arfio

    Joined:
    May 5, 2009
    Messages:
    40
    Likes Received:
    0
    This is my situation: I have two Elestix boxes connected one each other through IAX.
    I have a dialplan that ruot the calls in the right way.

    from BOX1 outbound route to BOX2:
    24X
    25X

    from BOX2 outbound route to BOX1:
    22X
    23X



    all works fine !

    The problem is that when I call BOX1 from external (through ISDN interface) I can only direct dial to the extension configured directly in BOX1, but I can not direct dial an extension on BOX2.

    How ca I do this ?

    One solution, but it is totally inefficent, is to configure virtual extension in each box that point to the other box. I do not like this solution because every time I add or delete an extension I have to reconfigure the secon BOX too !!

    Is there a way to tell to the direct dial application something like:

    22X,23X ----> go to box2

    Thak you !!
    ... (expecially to all developer !!! Great work !!)
     
  2. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    You should check that the PBX-PBX trunks are in the from-internal context.
     
  3. arfio

    Joined:
    May 5, 2009
    Messages:
    40
    Likes Received:
    0
    you mean tha in tthe peer and in the user deatils I have to put "context=from-internal"

    BOX1

    trunk "BOX2"

    Peer details:
    host=xx.yy.zz
    Qualify=yes
    type=friend
    insecure=port,invite
    context=from-internal

    User details:
    host=xx.yy.zz
    Qualify=yes
    type=friend
    insecure=port,invite
    context=from-internal


    BOX2

    trunk "BOX1"
    Peer details:
    host=kk.yy.zz
    Qualify=yes
    type=friend
    insecure=port,invite
    context=from-internal

    User details:
    host=kk.yy.zz
    Qualify=yes
    type=friend
    insecure=port,invite
    context=from-internal


    is it correct ?
    ...... doesen't work ! :(
     
  4. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    If there is not a one for one mapping on the DID's and you are routing them on DID numbers

    try making "custom" extensions that look something like

    ext 222 IAX2/BOX2/222
    ext 223 IAX2/BOX2/223

    etc.
     
  5. arfio

    Joined:
    May 5, 2009
    Messages:
    40
    Likes Received:
    0
    i'd like just to enable direct dial from box1 to box 2:
    on box 1 i have an isdn. if I call theidsn publi number an IVR answer with varius options. In the IVR I enable the direct dial feature.
    If i call the public number and i want to speak with a person i just dial the extension of the person i want to speak to. I'd like to do the same if the person I wany to speak is on the box2
     
  6. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    then try what I suggested.

    you dial 222 and it will send 222 out on the IAX2/BOX2 trunk.
     
  7. arfio

    Joined:
    May 5, 2009
    Messages:
    40
    Likes Received:
    0
    yes, in this way it works, like i wrote in the first message, but this in yust a workaround: every time I add an extension on Box2 i have to create a fake extension on the box1 to ruote the call that dial IAX2/BOX2/222.

    I'd like to find a better solution. !?!?!?!?
     
  8. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    My apologies for not reading your first post more fully.

    I can only thing of using a custom-context to do that for you.



    dicko
     
  9. arfio

    Joined:
    May 5, 2009
    Messages:
    40
    Likes Received:
    0
    I thank you for you help, you do not have to apologies !!!
    If I try a solution i will write here for you and all comunity !

    Thank you again
     
  10. arfio

    Joined:
    May 5, 2009
    Messages:
    40
    Likes Received:
    0
    Re:direct dial through IAX peer - the solution

    BOX A:

    peer details

    host=xx.yy.zz.www
    Qualify=yes
    type=friend
    insecure=port,invite
    context=from-internal <----- This is important !!

    user context

    host=xx.yy.zz.www
    Qualify=yes
    type=friend
    insecure=port,invite
    context=from-internal <----- This is important !!


    BOX B:

    peer details

    host=kxx.yy.zz.pp
    Qualify=yes
    type=friend
    insecure=port,invite
    context=from-internal <----- This is important !!

    user context

    host=xx.yy.zz.pp
    Qualify=yes
    type=friend
    insecure=port,invite
    context=from-internal <----- This is important !!


    NO IAX REGISTRATION REQUIRED

    Is important that in iax_general_custom tou insert this parameter

    calltokenoptional = 0.0.0.0/0.0.0.0
    maxcallnumbers = 16382

    by this config (and a correct dialplan) you can dial every extension form box A to box B and viceversa including queues. for isntance you can dial a geographic numver on box A and direct dial an extension on box B (very usefull for my installation)

    thank to dicko for the suggest you give me !!!
     
  11. jgutierrez

    Joined:
    Feb 28, 2008
    Messages:
    5,737
    Likes Received:
    0
    You will need to do the following:

    1. Call from your cellphone to ElastixA
    2. Watch through the CLI the context name of your ivr, for example ivr-5
    3. Check on extensions_addtional.conf the name of the route thta send your calls into ElastixB, for example: outrt-004-ElastixB
    4. Edit extensions_custom.conf and add the following context at the end of the file;
    Code:
    [ivr-5-custom]
    include => outrt-004-ElastixB
    
    5. Execute from the shell:
    asterisk -rx "module reload"


    * You must add -custom to the ivr's name, because if you take a look on the extension_additional file, it is included that context, but it doesnt exists, so basically, what you are doing, it telling your IVR to also checkup the extension dialed on the outbound route for your other Elastix
     

Share This Page