Trunk Setup Problems

Discussion in 'General' started by gmiller001, Jan 14, 2009.

  1. gmiller001

    Joined:
    Jan 13, 2009
    Messages:
    6
    Likes Received:
    0
    Elastix 1.3-2
    I am trying to setup a trunk to a SIP trunking provider. My provider requires that the SIP traffic to them originate from one of my public IP addresses. I have my Elastix box behind my firewall on my internal LAN. When I attempt to place an outbound call, I get the "All circuits are busy" message. Wireshark shows the following INVITE:
    INVITE sip:9xxxxxxxxxx@192.168.x.x;user=phone, with session description

    My sip_nat.conf looks like this:
    nat=yes
    externip=63.x.x.x
    localnet=192.168.0.0/255.255.0.0

    Is there something else I am missing? How can I get the INVITE message to use my external IP instead of the internal one?

    Thanks!
     
  2. Mirko87

    Joined:
    Oct 20, 2008
    Messages:
    128
    Likes Received:
    0
    Hi...

    In the CLI, write "sip show registry" and write here the response...

    By the way... Have you make the port forwarding from your Fire-Wall to your PBX?

    Mirko
     
  3. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    and have you arranged to remove the 9 from the dialled number before sending it to the provider?
     
  4. Mirko87

    Joined:
    Oct 20, 2008
    Messages:
    128
    Likes Received:
    0
    Oh... It's true...

    In the Dial Patterns write: "9|[0-9]." to call all the numbers and remove the 9 before it try to exit...

    Mirko
     
  5. gmiller001

    Joined:
    Jan 13, 2009
    Messages:
    6
    Likes Received:
    0
    No, I haven't done anything about removing the 9 from the dialed number yet - however, I guess that would've been the next problem for me to solve! ;)

    "sip show registry" returns nothing.

    The SIP trunk provider I am using authenticates via IP address (no register string, username, password, etc.). Since they are not seeing my public IP in the SIP header, they are refusing connection. Somehow, I have to get my public IP into the SIP header before I can go any further. According to all of the docs I can find, it would seem that the entries in sip_nat.conf would do the trick. However, those entries seem to have no affect on my system.

    Thanks!
     
  6. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Can you share the "peer details" of your outbound trunk? especially the host setting, and is this trunk first in line in the outbound route.
     
  7. gmiller001

    Joined:
    Jan 13, 2009
    Messages:
    6
    Likes Received:
    0
    My Peer Details are only one line:
    host=64.211.41.115

    This trunk is the only trunk in my only outbound route.

    Traffic is definitely going out over the correct route and the correct trunk (according to Wireshark). The problem is, I can't seem to get Elastix to use the external IP that my trunk provider expects instead of the internal IP that elastix is placing in the SIP header...

    Thanks again!!!
     
  8. gmiller001

    Joined:
    Jan 13, 2009
    Messages:
    6
    Likes Received:
    0
    Does anyone have any more ideas of places I could look or items I could test?

    Is anyone else using Elastix behind a firewall and with a SIP trunk? If so, could you share your config?

    Thanks!
     
  9. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
  10. gmiller001

    Joined:
    Jan 13, 2009
    Messages:
    6
    Likes Received:
    0
    dicko-
    I looked through the docs you provided, but I still don't see anything obvious that could be causing my issue. According to the docs, placing the commands:

    nat=yes
    externip=<your external ip>
    localnet=<your local network>/<your local subnet mask>

    under the [general] section of sip.conf (or in sip_nat.conf, which is included in the general section of sip.conf) should produce the behavior I require. However, I am still failing to see the external IP in the SIP header. I run the command asterisk -rx "reload" after each settings change to apply the configuration.

    I have also tried placing spaces around the equal sign in the externip command because that is how most of the docs show it - still nothing.

    Any ideas? Is NAT broken in Elastix?

    Thanks again for all of the help!!!
     
  11. Mirko87

    Joined:
    Oct 20, 2008
    Messages:
    128
    Likes Received:
    0
    In my opinion is not a NAT Problem... I think that your trunk configuration is wrong...

    Why in peer details you have only one line? This is an error... You have to set all the parameters that you find on documentation...
    Try.. And If you have a problem tomorrow at this time I'm online...

    Mirko
     
  12. gmiller001

    Joined:
    Jan 13, 2009
    Messages:
    6
    Likes Received:
    0
    Mirko87-
    You really need to change that avatar - I keep losing my focus on my PBX problem!!!

    I just finally found where my problem was. Turns out, I already had the NAT problem fixed with the entries in the sip_nat.conf file. Wireshark was giving me a false positive by continuing to show my internal IP, when in reality, my provider was now getting my external IP correctly. Now that things work, I do see that Wireshark is showing the correct IP buried in the SIP headers - it's just not in the summary area where I was looking.

    Turns out, my calls were still not going through (and I was still getting the same "All circuits are busy" message) because I was still passing the 9 on the front of the number (as dicko pointed out before!).

    Note to self: look a little deeper in Wireshark next time!

    Thanks to Mirko87 and dicko for all of the help on this one!!!
     

Share This Page