Change Source port for each sip device in a network

Status
Not open for further replies.

Andrew Byrd

Member
Feb 16, 2018
309
10
18
54
Is there a way to remotely change the source port for each sip device? I have 9 phones on a network 50 miles from my office. I want to change the source port for phone 1 to 5061, phone 2 to 5062, phone 3 to 5063 and so on.

Can you tell me where to do this?

THe reasonin behind this is because I just deployed 9 Yealink T29 in an environment that has a Cisco VPN router. If I deploy the phones in any other environment they work fine. But in the VPN router environment, the registrations drop every so often. I had a cisco guy look at the vpn and he said that there is no reason my voip should not be working.

I took out 9 cisco spa 508G phones that were working fine when I got there. So I am wondering if assigning a different source port to each ip phone is the answer and how to do it remotely
 
Last edited:

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
The configuration setting you are interested in is the sip.listen_port. Many Yealink phones have this under Settings->SIP rather than on a per account basis but I do believe that setting it at the account level works. The line(s) in the provision template looks like this:
Code:
{if isset($yealink_sip_listen_port)}account.1.sip_listen_port = {$yealink_sip_listen_port}{else}account.1.sip_listen_port = 5060{/if}

So you can set yealink_sip_listen_port in each device record if there are not too many of them to do and manage.

You can also modify the provision template if you wish depending on your precise requirements. There are potentially lots of different ways. One example would be, if your extension number range was 201 -299 you could do something like this:

Code:
account.1.sip_listen_port = 8{$account.1.auth_id}

This would configure the listen ports (source ports) 8201, 8202, 8203... etc. for each device.

If you do modify templates in the default location, remember they will be overwritten by updates. There is a special location for custom templates where they do not get overwritten, but I just can't remember where it is off the top of my head.

Hope that helps.
 

Andrew Byrd

Member
Feb 16, 2018
309
10
18
54
Adrian - You have been a great help ! Thank you for taking the time to explain this. I just implemented your suggestion on a device level and it worked like a charm. The natting issue went away as soon as I assigned listen ports. I used 5801, 5802, 5803 etc....

Thanks again!
 

Andrew Byrd

Member
Feb 16, 2018
309
10
18
54
One more thing. Is there any advantage or disadvantage to using 5801 . . . . .vs 8001 . . . . . I didn't know if the range mattered
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
One more thing. Is there any advantage or disadvantage to using 5801 . . . . .vs 8001 . . . . . I didn't know if the range mattered
No, it doesn't matter at all. I have used 15201, 15202... etc in the past, but you do need to make sure it doesn't conflict with the phones RTP port range.

I meant to say that I have also come across odd NAT implementations before where two local IPs using the same port connecting to the same destination (WAN) IP don't work properly. The provision trick with the extension number is a useful work around trick.

Hope you have a great Christmas.

Adrian.
 
Status
Not open for further replies.