Anonymous SIP calls

Hi, I am a newbie here so if I posted this in the wrong forum my apologies.

My question relates to the following issue…

I have defined a SIP trunk to my VSP who has 5 servers within a class-C subnetwork. No problems with setting up the trunk but when I call one of my in dial numbers, I noted that that SIP call is sent from a different server in the same subnetwork as the one which is used to set up the trunk. That is, if the registration is with x.x.x.1 the actual SIP call comes from x.x.x.5, for example.

In this case, once the call hits my Asterisk server, it logs it as “Received incoming SIP connection from unknown peer to XXXXXXX” and since I have gone with the default Reject Anonymous SIP calls in the Asterisk setting the call gets rejected. The only way I can get this call through, of course, is by changing the Asterisk SIP settings to accept anonymous SIP calls.

In the incoming SIP on the trunk, I have specified to accept calls from the VSP sub-network - ie. permit=x.x.x.0/255.255.255.0 which I thought would tell Asterisk that the call is coming from a known SIP peer.

I am sure there must be a way to fix this problem without opening up Asterisk to anonymous calls and would appreciate any suggestions. (running FreePBX 14.0.1.20 RasPBX)

Thanks again.

Two idea that come to mind are:

  1. A trunk for each IP

  2. Can you use a domain name for the host rather than specific IPs?

This is the recommended course.

You can, but because of the way DNS works, this is not likely to work the way you want it to.

If using pjsip, just list the 5 addresses in PJSIP Settings -> Advanced -> Match. With chan_sip, I agree with cynjut that setting up five trunks is best.

1 Like

@cynjut, @comtech, Thanks so much for the responses. As already pointed out using the dns name points to 5 addresses and hence the issue. Setting up peer connections to each does fix my issue.

Many thanks.

@Stewart1 - thanks for the suggestion - will change the sip driver and give it a go.

It appears the better option is to use pjsip which automatically picks up all the hosts from dns lookup and adds them as permitted hosts - a more elegant solution.

Thanks all.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.