Need help setting up voip

I am trying to replace ISP all in one router such that I have access to both internet and voip...

I wasnt able to use VoIP for over a year now - even tho I'm paying for it :sleeping:

Only recently was I given my username/pass credentials:

AuthUserName "+58749656578@ims.telenor.rs"
AuthPassword "xxxxxxxxxxx"
DigestUserName "58749656578"

voippass

The way network is structured is like this:

  1. ISP installed ONT device at my home , which receives and then converts fiber signal such that I can plug LAN cable one end into ONT and other into my router

  2. ISP router - Gets internet via PPPoE VlanID 710 , and does VoIP via vlanID 711 ( it has rj11 ports for old phones )

voip711

I've replaced the ISP router with OpenWRT one and figured out how to get Interent going - To get vlanID 710 on WAN interface I clicked on device dropdown menu and added .710

The question is how do I use VoiP now...

  • I was hoping on being able to use SIP app on my android device ? But do I need asterix server for that to work?

    The app I tried is this one: https://f-droid.org/en/packages/com.tutpro.baresip/

    But I am having trouble using it - I am not able to register via SIP user/pass as it spits this error :
    destination address required

    ( My guess is that I need to figure out VlanID 711 situation first? Maybe even asterix server is needed? )

  • *There's also the route of forwarding VlanID 711 trafic directly from ONT to the ISP router (Using ISP router as a dummy VoIP adapter so that I can plug my rj11 landline into it... )

    I don't like this method both because I don't want to use ISP device at all and because it would be much more convinient being able to make/receive calls directly on my android device...

But either way would satisfy me for now... beggars can't be choosers :cowboy_hat_face:

I've already stumbled across a simillar thread , only difference being vlanID 621 for internet and 822 for VoIP:

You'd need to hardware switch VLAN 822 from the ONT to the phone device.

If in OpenWrt, you used wan.621 to get Internet tagged to the ONT, now you need a bridge instead.

Make a new bridge (named br-wan) of wan and one of the lan ports (which you will be connecting to the phone device). Remove this lan port from the existing lan bridge. Enable VLAN tagging on the br-wan bridge. Configure the wan port as tagged 621 and 822. Configure the phone port as tagged 822. Change the wan network device from wan.621 to br-wan.621. You should have Internet through OpenWrt again. The phone traffic will go directly between the two ports by hardware, it is not necessary to make a network for it in the OpenWrt kernel.

This sound good but idk how to create such bridge ... Some steps as to how to do it via luci would be much appreciated !
:heart:
Thanks !

I don't know what an asterix server is - that's a cartoon character. I do know what an asterisk is, however. Those help you route calls.

Configuring the VLAN gives you access to the carrier's voip infra.

You could configure static routes to ensure all RTP and SIP go to VLAN 711. ( another alternative is PBR, but that seems overkill for this ) This way, any device on the LAN can SIP REGISTER to the server via its FQDN.

Your primary concern is handling calls (if there is no device at home), registered via SIP.

SIP stacks consume battery. But Android is fairly efficient. It has its own built in client. Once you leave home, you'd need to run your SIP 'trunk' through a wireguard VPN to your home router, which by default would forward voip to VLAN 711.

I think this would be less work than attempting to maintain an Asterisk in the home subnet, or on the router. But it's not certain that the ITSP uses decent NAT mitigation - so you may get no- or one-way media calls. Testing required...

I run a wg VPN to my mobile (iPhone), and run all traffic through it. Battery consumption is unnoticeable. So all traffic traverses my router at home, and in your case, VoIP would get routed correctly.

I don't know any devices ported to openwrt which have also ported the modules which support the RJ11 ports. Which 'was' your device?

Edit:

For shit like this, sometimes you just need to put ims.telenor.rs also in the SIP proxy field. But try Androids built in client first. Much more energy efficient.

1 Like

SIP app will make a direct connection to the provider's SIP server without using an intermediate server. This generally only requires a routable IP path. The question then, is whether the ISP's SIP server is reachable as general Internet on the 710 VLAN or if you will need to bring the phone VLAN specifically into your router.

First thing to try (after you have Internet working) would be just to ping ims.telenor.rs from a computer on your LAN.

1 Like

To be honest all this sounds like mumbo jumbo xd

I think I somewhat get the concept behind what you described... but how to implement beats me :sweat_smile:

Device ISP gave me is a ZTE router - no openwrt for it yet...

What I am using is a different device for openwrt - no rj11 ports on this one

It's not reachable

This is ping from PC

ping ims.telenor.rs
ping: ims.telenor.rs: Name or service not known

ping from router:

Make static routes for those IP destinations (ims.telenor.rs) or subnets, with the interface that has VLAN 711.

Try dig or nslookup from openwrt diagnostic tools.

1 Like

No, you just use a SIP app and enter your credentials.

Use this.

Oh...you can only get SIP over a special VLAN, you may need Policy-Based Routing to set this up.

1 Like

Could you possibly provide some steps that I could follow...

Sorry it's just that idk how to bridge in the first place... ( I can probably learn by searching for yt videos but I am afraid of messing up and openning network to all kinds of attacks :sweat: )

This is all of the info that I have:
sip
voippass
voip711

I don't think it's reachable via internet - I think it's only possible to login via ISP infrastructure ( vlandID 711 traffic directed at the ONT )

At least pining ims.telenor.rs doesn't seem to work

Correct. Try using credentials on correct VLAN to test.

1 Like

Like ?

  1. Create new interface
    Name VOIP
    Protocol DHCP
    VlanID 711
    Click save
    ( Do I need to change anything else ? )

  2. How do I add this interface to LAN ? And how would I setup firewall rules for it?

  3. Or is it better that I link this to new wifi network , which I would connect to for testing ? ( What firewall rules would be necessary ? )


Mess up. That's how you learn. Take a config backup (system -> backup) before you start :slight_smile:

Network -> Switch -> add VLAN 711 to CPU and LAN interface.

Network -> devices -> add -> type: 802.1q / base device: wan interface

Something like that. Not sure about your platform.....

Edit: your steps look good. Avoid firewall for now - make sure voip works first. You may need a SIP helper in firewall rules later on.

Check to ensure your voip interface gets an IP (you have set it as DHCP).

3 Likes



I followed the steps - only thing I didn't setup is dhcp server on VoIP interface as I didn't know if I need it... ( Which I guess I do xd As device can't connect to wifi - stuck at obtaining IP address )

Anyways for some reason internet stopped working once I clicked save and apply and VoIP interface was created hmmm

I wish I could play with this more but I'll have to wait untill others go to bed if Internet will be cutting out like this :upside_down_face:

I wonder why internet is going down... maybe I need to "route" this via already existing wan interface ? ( Wan and Wan6 interfaces show as connected but none of the devices in the house have internet access - even after removing newly created VoIP interface , I had to click reset on both WAN and WAN6 )

When I click on Networks I don't see any Switch btw , searching online I found that:

DSA enabled routers do not have the "Switch" tab

I am from india using bsnl fiber broadband service, I have an ONT from syrotech , i have created a bridged connection for both internet and voip , and then configured openwrt accordingly,
both work fine if voip is assigned an static IP, using dhcp for voip causes pppoe connection to break.
Dont know why it happens, may be a bug in openwrt , not sure.

1 Like

How did you figure out what ip to assign to voip?

To check the IP , you have to login to your ONT, go to wan connection info, it differs by brands , you will find the IP , your default gateway and dns server details.
You have to disable bridging for voip and activate voip connection on the ONT itself.
After figuring out the details , enable the bridging and configure openwrt accordingly.


1 Like

Thanks , I'll try as soon as possible!

The Internet breaks because there is a conflict of two default routes. At the end of this process you want the default route for everything except phone service to be the regular wan (710) and the SIP server to be by the voip wan (711).

Place the VOIP wan in the wan firewall zone for this to work.

First try to discover the numeric IP of ims.telenor.rs. Temporarily make the regular wan inactive by going to advanced settings and uncheck Use Default Gateway and Use DNS Services Advertised by Peer.

At this point all your connections try to go by the voip wan, which will not work for the Internet, except that you should be able to lookup and ping ims.telenor.rs inside the ISP's voip network. Make note of its numeric IP. Go to the main status page and make note of the Gateway under IPv4 Upstream. You will need these two addresses to make the phone route.

Then set up the regular wan to again be the default connection by checking Use Default Gateway and Use DNS Services in the regular wan, and uncheck them in the voip wan. Internet should again work as normal. The voip wan is also still connected, but nothing is being routed to it yet.

Since you're not using the phone vlan DNS server, you'll have to fake that locally. Go to Network DNS and DHCP and click the Hostname tab and add an entry linking ims.telnor.rs with its IP that you discovered earlier.

Finally go to Network - Routes and add a route to the SIP server's IP via the voip wan.

At this point, from your LAN you should be able to ping ims.telnor.rs, and if you configure a SIP client to access it with your credentials, make phone calls.

1 Like

Thank you! Still waiting for everyone to go to bed before I give this a shot, will post how it goes

:heart:

For some reason I still can't ping ims.telenor.rs ?

I did what you said


Disabled Use Default Gateway and Use DNS Services Advertised by Peer on WAN

And enabled those on VoIP, then added VoIP to wan firewall like this

I wasn't able to figure out DHCP server tho? It only shows me this checkbox( It's selected by default )
Screenshot from 2023-02-14 23-37-47

Internet goes out like you said but I still can't ping ims.telenor.rs

ping ims.telenor.rs
ping: ims.telenor.rs: Name or service not known

( I pinged both via PC and Router... )

Next I am thinking of logging into ONT and see what I can do from there....

I did manage to find gateway address - just missing the ip of ims.telenor.rs ... hmm

I feel like I might be missing something... do I need to assign VoIP interface to LAN somehow ?