Need help setting up voip

On the main Network-Interfaces page, click the Edit button for wan and then the Advanced tab at the top of the popup. The Use Default Gateway and Use Peer DNS checkboxes are about 5 things down from the top.

These boxes should be unchecked for the interface that you don't want to be active, and checked (as is the default) on the one that you do. With the voip as the active wan, DNS requests should go to a server on the voip vlan which does know that name.

Also when it shows pending changes that means save and apply hasn't been clicked, and it is still running with the old settings.

1 Like

From: https://www.elitesecurity.org/t481182-Telenor-SIP-trunk

An interesting post (translated):

proxy is 109.245.15.185, codec alaw, server is ims.telenor.rs whose ip is 109.245.15.185, and must be added to /etc/hosts, registration string is PBX011D440XXXX@ims.telenor.rs :CODE: PBX011D440XXXX@ims .telenor.rs /PBX011D440XXXX

Hope this helps.

1 Like

I fired up ISP router trying to use it to get ims.telenor.rs ip but no luck ther either? Isn't that weird?

I then used traceroute to asbcp.ims.telenor.rs and got this :
asbcp.ims.telenor.rs (10.24.28.218), 30 hops max, 38 byte packets[IPV4-UDP]
1 10.55.255.253 (10.55.255.253) 41.780 ms 1.835 ms 1.798 ms
2 10.24.15.126 (10.24.15.126) 2.346 ms 2.068 ms 2.050 ms
3 10.24.15.125 (10.24.15.125) 2.528 ms 2.801 ms 2.382 ms
*
*
*
*
*

lots of stars untill it runs out of hops... I've set it to 100 hops and it still ran out...

asbcp is outbound proxy
sip

What to do now?

I managed to gather - IP address of VoIP interface
Dns servers and gateway
Screenshot from 2023-02-15 00-21-19

Thanks ,I found them mentioning how you can't ping the "machines"?

since machines cannot be pinged, I advise telnet to 5060, to test routes :wink: don't expect everything to respond

... I'll try figuting out what that means

Issue is this a VERY old thread - telenor is no more , company renamed got sold and now goes under different name - yettel

So I highly doubt that the ip address is the same but you never know...

I'd expect that since it's configured so only the internal phone stuff will go on the phone VLAN.

On OpenWrt, if you're fully using the voip wan, it looks like there should be a 10.x IPv4 Upstream and the DNS server should be the one you found for the phone network. Note that all IPs that start with 10 are a private network, which would be expected since this is just the internal link from a SIP router to their SIP server. If you are on the regular Internet you won't be able to reach these 10. IPs, they have to be routed out the phone VLAN.

Telnet to 5060 is simulating the first stage of a SIP connection. You will need to install a telnet client package such as telnet-bsd

2 Likes

Soooo , as far as routing goes - without ip of ims.telenor.rs it's a no go?

I'll try setting up telnet , in hopes that will show me this ip...

Telnet won't help find the IP. Telnet does let you probe an IP (or name) to see if there is a possible SIP server reachable there.

To find the address you need to reach Telnor's internal phone DNS which must be able to resolve the name, as the other devices have it configured by name.

While connected in voip mode (wan 710 disabled) what does the routing table look like? Just type route.

2 Likes

I had WAN interface stopped and WAN6 is always on couldn't be stopped... do you need me to enable WAN and take another screenshot?

lan2 is guest interface - can be ignored I use this for dumb APs...

I didn't remember to take screenshot of interface when I switched to VoIP... here's an old one showing that VoIP is being used so that the picture above doesn't confuse you - it also tells me it's being used on the main status page of OpenWRT

ping 10.55.255.254
ping 10.234.31.49
nslookup asbcp.ims.telnor.rs
nslookup ims.telnor.rs

If the nslookups don't work try adding either DNS server (49 or 50) directly:
nslookup asbcp.ims.telnor.rs 10.234.31.49
etc.

2 Likes

nslookup -debug ims.telenor.rs

Server:		127.0.0.1
Address:	127.0.0.1:53

Query #0 completed in 5ms:
authoritative answer:

Query #1 completed in 8ms:
authoritative answer:

nslookup -debug asbcp.ims.telenor.rs

Server:		127.0.0.1
Address:	127.0.0.1:53

Query #0 completed in 4ms:
authoritative answer:

Query #1 completed in 7ms:
authoritative answer:

nslookup -debug ims.telenor.rs 10.234.31.49

Server:		10.234.31.49
Address:	10.234.31.49:53

Query #0 completed in 3ms:
authoritative answer:

Query #1 completed in 3ms:
authoritative answer:

nslookup -debug ims.telenor.rs 10.234.31.50

Server:		10.234.31.50
Address:	10.234.31.50:53

Query #0 completed in 3ms:
authoritative answer:

Query #1 completed in 3ms:
authoritative answer:

nslookup -debug asbcp.ims.telenor.rs 10.234.31.50

Server:		10.234.31.50
Address:	10.234.31.50:53

Query #0 completed in 3ms:
authoritative answer:
Name:	asbcp.ims.telenor.rs
Address: 10.24.20.218
Name:	asbcp.ims.telenor.rs
Address: 10.24.28.218

Query #1 completed in 3ms:
authoritative answer:

nslookup -debug asbcp.ims.telenor.rs 10.234.31.49

Server:		10.234.31.49
Address:	10.234.31.49:53

Query #0 completed in 2ms:
authoritative answer:
Name:	asbcp.ims.telenor.rs
Address: 10.24.20.218
Name:	asbcp.ims.telenor.rs
Address: 10.24.28.218

Query #1 completed in 3ms:
authoritative answer:

ping 10.55.255.254

PING 10.55.255.254 (10.55.255.254): 56 data bytes
64 bytes from 10.55.255.254: seq=0 ttl=64 time=2.323 ms
64 bytes from 10.55.255.254: seq=1 ttl=64 time=2.304 ms
64 bytes from 10.55.255.254: seq=2 ttl=64 time=2.107 ms
64 bytes from 10.55.255.254: seq=3 ttl=64 time=2.230 ms
^C
--- 10.55.255.254 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 2.107/2.241/2.323 ms

ping 10.234.31.50 and ping 10.234.31.49 don't work

I did this from openwrt shell , also had to tick this box in order to get authorative answers from nslookup, it kept giving me

Non-authoritative answer:

Screenshot from 2023-02-14 23-37-47

............................................................................................................................
Trying to add abscp.ims.telenor.rs to routing doesn't work , not sure what's wrong with the IP I got ?

Screenshot from 2023-02-15 13-28-55

Does routing table from ISP router help at all?

The things that are now known on the voip network are asbcp at 10.24.20.218 and the dns servers at 10.234.31.49 and 50.

I don't know exactly how proxying works but maybe if you point your SIP client to asbcp as the proxy, the proxy server will look up the actual ims.telenor.rs

Add asbcp as a static route (/32 means this route is for a single IP address)
target 10.24.20.218/32
interface VoIP
gateway 10.55.255.254

Then you can uncheck Default Route and DNS on wan711 and return to normal wan default through wan710 so Internet connection works. Also it should now be possible to lookup (from the local DNS host entry) and ping asbcp.ims.telenor.rs while connected to the LAN. From there try configuring a SIP client.

1 Like

Thank you !

I'm able to place calls now , not able to hear anything on either end tho :stuck_out_tongue_closed_eyes:

I'm gonna have to figure out why. SIP client registers alright - I can receive and make calls but that's as far as it goes...

I've heard that ISP uses STUN server so I might need to set that up first in order to have audio?

STUNEnable = true
STUNServerAddress = 85.162.11.196
STUNServerPort = 3478
STUNUsername = Serial number
STUNPassword = should be inside router config file

( But I don't see any of these inside my router *I checked the config file... If my setup doesn't use STUN server , could it be firewall? )

sip

My SIP client doesn't seem to be facing packet loss (0/0 packets :stuck_out_tongue_closed_eyes:) ? Why no sound is going through idk...

Tried all audio protocols that are available and only these two G729/8000/1, PCMA/8000/1 "work"

This is route from ISP router btw, in case that might be helpful... If anyone has any ideas what else I could look for on it let me know...

The audio packets must be going to another server. You'll need to route to that server through the voip wan.

Run a tcpdump on UDP packets coming from the phone. After dialing there will be a stream of UDP carrying the voice.

1 Like

Maybe try another codec?

1 Like

It's not available in this SIP client, there's another one on fdroid but it has even less protocols :smiling_face_with_tear:

Ok :sweat_smile:

How would you do this on PC for example?

Open terminal , type tcpdump eno1 and look at the output on screen?

( I can do the same on phone I think, by giving root access to termux and doing tcpdump on wlan interface? )

Setting up everything to be able to capture packets from phone on router ought to be a pain ( :fearful:)

On router CLI run tcpdump -i br-lan udp and host phone's LAN IP

1 Like

tcpdump is not available on the router...

I already did it on phone tho : https://pastebin.com/GGqB78yj (M2012K11AG.lan is the phone)

I answered the phone at 02:28:46 , that's where audio should start

You can search for "ringing" with find text to see when I dialed the number

I'll try to figure out how to get tcpdump on my router hmm

Edit 1:
Installed tcpdump but this is happening xd

tcpdump -i br-lan udp host 192.168.1.25
tcpdump: 'udp' modifier applied to host

Edit 2:

My bad wrong command...

tcpdump -i br-lan and udp host 192.168.1.25 works