Peering two Elastix together

Discussion in 'General' started by roost, Feb 25, 2008.

  1. roost

    Joined:
    Feb 25, 2008
    Messages:
    7
    Likes Received:
    0
    Hi Elastix

    Great work on this project. I really beginning to like this distro.

    However I have a problem and need help to link two Elastix machines together via SIP trunk? I can get both to register via SIP extension to SIP trunk from each end but the calls don't seem to go through.

    System A...........................System B
    SIP Ext. 100 <-------------------> SIP Trunk
    SIP Trunk <----------------------> SIP Extension

    I get this error message every few seconds....

    -- Got SIP response 489 "Bad event" back from 192.168.1.70

    and same from the other end..

    -- Got SIP response 489 "Bad event" back from 192.168.1.100

    If I were to do the same via IAX2 trunk and extensions, it works ok. Am I missing something?

    Thanks
     
  2. rejil.rajan

    Joined:
    Apr 8, 2007
    Messages:
    154
    Likes Received:
    0
    Hi

    If you could show your sip_additional.conf file. It would be easier for understanding the issue your facing and the reason for not using the SIP trunk

    Regards
     
  3. roost

    Joined:
    Feb 25, 2008
    Messages:
    7
    Likes Received:
    0
    Hi Rajan

    Here it is..

    sip_additional.conf of System A

    [100]
    type=friend
    secret=xxxxx
    record_out=Adhoc
    record_in=Adhoc
    qualify=yes
    port=5060
    pickupgroup=
    nat=yes
    mailbox=100@device
    host=dynamic
    dtmfmode=rfc2833
    disallow=
    dial=SIP/100
    context=from-internal
    canreinvite=no
    callgroup=
    callerid=device <100>
    call-limit=4
    allow=
    accountcode=
    call-limit=50

    [HK]
    username=200
    type=peer
    secret=xxxxxx
    host=192.168.1.100
    call-limit=50

    sip_registrations.conf
    register=200:xxxx@192.168.1.100

    System B sip_additional.conf

    [200]
    type=friend
    secret=xxxx
    record_out=Adhoc
    record_in=Adhoc
    qualify=yes
    port=5060
    pickupgroup=
    nat=yes
    mailbox=200@device
    host=dynamic
    dtmfmode=rfc2833
    disallow=
    dial=SIP/200
    context=from-internal
    canreinvite=no
    callgroup=
    callerid=device <200>
    call-limit=4
    allow=
    accountcode=
    call-limit=50


    [Sz-Voice]
    username=100
    type=peer
    secret=xxxx
    host=192.168.1.70
    call-limit=50

    sip_registrations.conf
    register=100:xxxx@192.168.1.70
     
  4. Bob

    Bob

    Joined:
    Nov 4, 2007
    Messages:
    2,400
    Likes Received:
    1
    Roost,

    Rajil has covered the question properly. It would be best to let us know what you are trying to achieve as a whole.

    Secondly, in terms of connectivity, e.g. through routers, you are better off with IAX, instead of SIP.

    In a nutshell, you would normally setup an IAX trunk on either side, ticking the box for Internal/Intra PBX Router. This provides the connection. This is the first stage.

    Next you add in the outbound routes for particular extension numbers, or other numbers that you want to route via the other PBX, and this route points to your IAX trunk that you have setup.

    Two examples are

    1) You have 200+ range of extensions on one PBX, and you have 500+ range of extensions on the remote PBX. You would add a an outbound route, so that if any dials 500 or 501 or 502, the outbound route would have a dialplan to match of 5XX, and this would point to IAX trunk connecting the remote PBX. Once the remote PBX sees the call coming through for 5xx it will handle it normally as though it was dialled from one of the local extensions.

    2) You may find that dialling a particular area code is cheaper from the remote PBX, so again, you may have a dialplan that matches 02XXXXXXXX, and routes all calls for those numbers to the remote PBX. Again the remote PBX will handle this as a call, and dial out.

    Just remember, you need to set dial-plans on both PBX's e.g. you need to tell the remote PBX that 200+ range is available on the other PBX, and like wise point it to the IAX trunk.


    I apologise if you have something totally different in mind, then ignore the above, but based on the info that you have provided, it is hard to fathom exactly where you are heading with it.

    Regards

    Bob
     
  5. roost

    Joined:
    Feb 25, 2008
    Messages:
    7
    Likes Received:
    0
    Hi Bob

    The ultimate goal is to connect two Elastix over VPN and get the FAX to pass through as well. Voice is working well so setting up the routing etc.. I am way past it.

    FAX Machine <---> AG188 (ATA) SIP T.38 enabled<----> Elastix A <--------via IAX2 Trunk--------->Elastix B <-----AG188(ATA) SIP T.38 ------> FAX Machine

    For now I have setup a test environment within the same network (so don't have to worry about NAT here).
    Question: Will the fax T.38 pass through the IAX2 trunk? So far no success so that's why I am determined to get a SIP trunk instead.

    So far with the IAX2 trunk, the SIP debug clip...

    SENDING END
    <------------->
    --- (14 headers 15 lines) ---
    Sending to 192.168.1.65 : 5060 (NAT)
    Got T.38 offer in SDP in dialog 1999929779-5201128811@192.168.1.65
    Got T.38 Re-invite without audio. Keeping RTP active during T.38 session. Callid 1999929779-5201128811@192.168.1.65
    Capabilities: us - 0xc (ulaw|alaw), peer - audio=0x0 (nothing)/video=0x0 (nothing), combined - 0x0 (nothing)
    Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x0 (nothing), combined - 0x0 (nothing)

    RECEIVING END
    <------------->
    --- (13 headers 10 lines) ---
    Sending to 192.168.1.92 : 5060 (NAT)
    Got T.38 offer in SDP in dialog 6e3367207e3f0f1408a492fd2ef9759f@192.168.1.15
    Got T.38 Re-invite without audio. Keeping RTP active during T.38 session. Callid 6e3367207e3f0f1408a492fd2ef9759f@192.168.1.15
    Capabilities: us - 0xc (ulaw|alaw), peer - audio=0x0 (nothing)/video=0x0 (nothing), combined - 0x0 (nothing)
    Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x0 (nothing), combined - 0x0 (nothing)

    Details:-
    Elastix version 0.9.2
    Did a yum update asterisk to version 1.4.17.1

    Let me know what else is needed and I can supply.

    Post edited by: roost, at: 2008/02/28 03:49<br><br>Post edited by: roost, at: 2008/02/28 03:54
     
  6. roost

    Joined:
    Feb 25, 2008
    Messages:
    7
    Likes Received:
    0
    Hi Guys,

    I discovered that when I just add the SIP trunk to only one side (System A)... then it works ok and I can call System B and Fax over T.38 works really well too.

    When I add or enable the System B SIP trunk.. I get this message immediately and it stops working again...

    -- Got SIP response 489 "Bad event" back from 192.168.1.15 (on both systems)

    Hope someone can try this out to see where the problem lies.<br><br>Post edited by: roost, at: 2008/02/28 15:23
     

Share This Page