1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Check out the 6 new Certified Incredible PBX Builds for Asterisk 11 and 13 featuring CentOS 6, Ubuntu 14, Raspberry Pi 2, and Asterisk-NOW.

Problem with voicenetwork.ca SIP trunk

Discussion in 'Help' started by freaky al, Jan 4, 2012.

  1. freaky al New Member


    I have been trying for a while to get my SIP trunks working without any luck and am hoping that someone can help me out. If there is a solution for this here already, sorry in advance for not finding it.

    I am using the latest PIAF2 image with FreePBX 2.9 and Asterisk 10 on an Asus EEE PC.

    My problem is that inbound and outbound calls on my Voice Network trunk don't connect. I get ringing, but when the call is answered the originating end keeps ringing. On inbound calls the Asterisk console shows the messages and I watch it sent to voicemail when the call is declined, where an empty voicemail is created.

    I have the following ports forwarded in my Dlink DIR-615 router:
    TCP: 5060-5061
    UDP: 4659, 5000-5082, 10000-20000

    I tried using the Dynamic IP/NAT settings in "Asterisk SIP Settings" (using no-ip.com and dlinkddns.com) without any luck, so I used the following in sip_custom.conf as per Ward's post on knol.google.com with his ip.sh script in /var/lib/asterisk/agi-bin:

    Voice Network has a customer portal with recommended incoming and outgoing settings for Asterisk and Trixbox 2.6. I have tried the Trixbox config (since it uses FreePBX) and variations by adding from the Asterisk config without any luck. Currently I am using the following in my trunk config:
    [Outgoing Settings]
    [Incoming Settings]

    I have looked through the various configs and can't find reference to the "from-trunk" context.

    Also, In the recommended Asterisk settings on the Voice Network portal there is this:
    ; To use VoiceNetwork.ca to termination your calls
    ; add the following line to your extensions.conf file
    exten => _X.,1,Dial(SIP/voicenetwork-out/${EXTEN})

    Where "voicenetwork-out" is the header of the outgoing settings in sip.conf:
    host= sip.voicenetwork.ca
    context=voicenetwork-incoming ; incoming DID calls will arrive in the voicenetwork-incoming context

    Thanks for your time,
  2. tbrummell Guru

  3. rossiv Guru

    See above replies in red.
  4. freaky al New Member

    When I disabled it my trunk wouldn't register and the Bria client on my iPhone (via WiFi) kept timing out. So, I re-enabled it. I did notice that the setting for UDP Endpoint Filtering was set to "Address Restricted". The other options are "Endpoint Independent" and "Address and Port Restricted". From what I can gather "Address Restricted" allows remote connections establish locally to respond on different ports, but only if they come from the same address.
  5. freaky al New Member


    You are recommending removing the all the settings for "User Context" and "User Details" in the Trunk configuration within FreePBX?

    EDIT: I modified the Trunk settings and only used values for "Outgoing Settings". Calls still don't connect when answered.

    I thought as much, but just wanted to double check.

    I brought that up because I was trying to be thorough. Thanks for the reminder to always use the *_custom.conf file.
  6. rossiv Guru

    Yes, remove the User Context and User Details just to see. It *shouldn't* do anything, but you never know. Of course, keep it saved somewhere so you can put it back.

    What do you hear on the receiving end of an outbound call?
  7. freaky al New Member

    No luck. I restored the settings easily enough by copying them from this thread. :wink5:

    The originator just gets ringing and the receiving end gets dead air, no sound whatsoever.

    My next thought is to connect the server directly to the internet. I have configured pppoe on it for eth0 (which is currently down/offline) and am using wlan0 for LAN connectivity, for just this reason. I will have to play around with it though because during the pppoe testing I couldn't remote in since it really locked down the firewall. Will have to configure it as a router also since my ISP only gives me one IP. But that can come later. I have a feeling the router is playing nice.
  8. MGD4me Guru

    Sorry, but...

    Re: the receiving end gets dead air, no sound whatsoever.

    Sorry to be so anal, but... the phone at the 'receiving end' must ring first, no?? And then a person answers, and there is 'no sound'. One way, or both? If the far end phone does ring, that would *suggest* that the signaling is working, and there is a problem *only* with the audio ports. Unless you have phones at a remote site acting as extensions to your PBX you don't even need to bother with opening up ports on the router. Once your trunk is registered with 'voicenetwork' that is all you really need.

    Also, as rossiv points out, since you have declared "type=friend" in your Outgoing Settings, then the Incoming Settings aren't really needed, but if used will show up as a separate incoming trunk on the 'FOP panel'.

    It looks like you are trying to hand edit a bunch of files as well as configure your trunk via FreePBX. Just use FreePBX and let it do it's magic.
  9. freaky al New Member


    The phone on the callee side rings first and then when answered it is silent with no audio. Sorry, I wasn't clear enough. My concern that the signalling isn't complete is that the caller side continues to ring after the callee answers. I have done a tshark (wireshark) capture at the cli and it shows the SIP signals back and for, but the RTP packets are outgoing from the PIAF2 server only with nothing returning.

    I do get two trunk show in the FOP panel. I'll remove the settings as rossiv suggested.

    I have lost count of how many times that I have reinstalled PIAF on this box, and am starting to grasp at straws a bit. :banghead: Currently the only conf file modified is sip_custom.conf as mentioned previously. I will delete those settings, remove ip.sh from crontab, and go back to the Dynamic IP/NAT settings in "Asterisk SIP Settings".

    From what I have learned from this thread it makes me think that the router is my problem, and it's SIP ALG funtionality. I find it wierd that I can't register the trunk when it is disabled even though the ports are forwarded.
  10. atsak Guru

    Almost certainly your router, or your ISP is blocking the packets. If tshark isn't showing you the RTP coming back, that's the problem.

    Turn off ALG, and straight forward the ports . . .
  11. freaky al New Member

    When I disable SIP ALG with forwarded ports the trunk won't register. I am going to put the DD-WRT firmware on to my Dlink DIR-615.

    Time to pull out the big stick. :D
  12. freaky al New Member

    It was the SIP ALG thing for sure. :tazb:

    Once I put the DD-WRT firmware on the router and configured the ports, the trunk came up right away and test calls are behaving as expected.

    Huge thanks to all of you for your help!!!!
  13. MGD4me Guru

    Way to go...

    If at first it doesn't work, get a bigger hammer! Glad you finally found the problem.

    Good luck with the rest...

Share This Page