intracom netroute, asterisk and sipdiscount

I own a netroute2 and I have an asterisk at home to serve me as a pbx. I use it primarily for testing, and I only have a working sipdiscount trunk on it so far. What I wanted to do was plug a normal phone on the netroute and set it up so that I can call land lines in Greece for free through asterisk, using a sip trunk with sipdiscount.

  • Asterisk configuration
  • add to your /etc/asterisk/sip.conf

    [sipdiscount]
    type=peer
    host=sip1.sipdiscount.com
    dtmfmode=inband
    ;allow-g726
    canreinvite=no
    fromdomain=stun.sipdiscount.com
    username=USERNAME
    fromuser=USERNAME
    secret=PASSWORD
    ;qualify=yes
    [5000]
    ; netroute
    type=friend
    regexten=5000
    callerid="netroute2" <5000>
    host=dynamic ; This device needs to register
    secret=PASSWORD
    allow=ulaw
    allow=alaw

    add to your /etc/asterisk/extensions.conf

    exten => 5000,1,Dial(SIP/5000,30,rm)
    exten => _7.,1,Dial(SIP/${EXTEN:1}@sipdiscount,30,rm)
    exten => _7.,2,Congestion
    exten => _7.,3,Busy

  • Netroute Configuration
  • Netroute is more complicated than asterisk. Why ? because there is no documentation at all. So it’s a trial and error kind of thing. My current working solution IS very very crude and NOT thoroughly tested.

    Edit your /etc/call_route.conf and comment out the line that says:
    plugin load gr

    Also, make sure your last lines of this file look like these:
    # default routes
    route_pattern add default/@ gr filt_last rl_rg_sip0
    # note: default route is required
    route_pattern add default/! default filt_last rl_rg_sip0

    Now go to the web interface of netroute and in the voip section add asterisk’s sip domain/realm and IP settings and the settings you entered in the section [5000] of asterisk’s sip.conf. You might even want to lower the registration interval, if netroute and asterisk is in the same lan the extra traffic is insignificant. Then go to dialplan configuration and click on “+Add pattern”. In the Pattern field add 7X and don’t tick any of the other boxes. In the Prefix field just add 7.
    When finished, do a
    /etc/init.d/checkpoint
    /etc/init.d/rc-voip restart

    Now pick up a handset plugged into the first netroute’s FXS port and dial a string such as: 700302101234567
    7 in the beggining is used by asterisk to send the call to sipdiscount trunk and 0030 is used by sipdiscount to call Greece. So in order to call 2101234567 we need to dial 700302101234567 from the netroute.
    If you just want to dial Greek land line though sipdiscount change

    exten => _7.,1,Dial(SIP/${EXTEN:1}@sipdiscount,30,rm)

    with

    exten => _7.,1,Dial(SIP/0030${EXTEN:1}@sipdiscount,30,rm)

    Then you would only need to call 72101234567 from netroute.

    Check asterisk’s log file for errors. A successful call should look like this:
    Executing Dial("SIP/5000-49ab", "SIP/00302101234567@sipdiscount|30|rm") in new stack

    🙂

    2 Responses to “intracom netroute, asterisk and sipdiscount”

    1. November 21st, 2006 | 23:11
      Using Internet Explorer Internet Explorer 6.0 on Windows Windows XP

      What hardware have you used for the asterisk@home? Can such hardware be found in Greece?

      What I the FW version of your NetRoute?

      My NetRoute doesnot have a /etc/call_route.conf file. Do you know why? Should I add it?

      Thank you in advance for your postings,

      Panos.

    2. site admin
      November 22nd, 2006 | 19:05
      Using Mozilla Firefox Mozilla Firefox 1.5.0.8 on Linux Linux

      in order to install an asterisk server just for VoIP you need nothing more than a normal PC. Check out trixbox if you want. It’s an easy to setup asterisk distribution…

      my firmware version is 577, as I’ve said on my other post about netroute. Maybe your firmware version doesn’t include the functionalities of mine…

      As said before I will ask for permission from some people from Intracom whether I can or can’t publish the firmware I have on the web….

      stay tuned…

    Leave a reply