Using freepbx 16 chan_sip driver not working

Hi. I am having problems using freepbx 16 and asterisk 18.3. I am trying to use the old sip_driver chan_sip. I have set the driver in advanced settings to just chan_sip, but if I look in my logs all I see is a lot of errors about pjsip (why is it listening?), so how do I get the chan_sip to work? Its compiled into asterisk, the .so file is there and it seems to be loading, but pjsip still seems to be the only thing working.

Thanks in advance for any suggestions.

Did you restart asterisk after changing in Advanced Settings?

Yes, I did not know, but I thought it might be necessary.

I tried to call an extension and it just times out, according to the client. I rebooted the box as well, no joy.

A bit more info, pjsip seems to be no longer listening, but chan_sip is not listening either.

sip show peers just shows my trunks and the one extension I have configured.

More progress – I found out that asterisk is listening on 5160 – how to fix?

Because Chan_PJSIP is configured to listen on 5050 and Chan_SIP to listen on 5160. You need to update the binding port to be what you want.

Also, you shouldnt be using Chan_SIP, it is being removed from Asterisk in Oct 2023. You need to migrate to Chan_PJSIP.

Thanks for the reply. Eventually I suppose I will have to migrate to pjsip, but I don’t want to do this right now. I have gotten it to listen on 5060 finally, but now, I am trying to set the host name on the extension to a specific ip address and I have it set in there, but its still asking for a user/password from my end, why is it doing this?

hmmm, I actually do have the correct user name and password on my end, but its still not working, but I would prefer to use ip auth instead. But its not working either way.

You can use the deny and permit parameters to restrict registration to a specific IP address, though I suggest leaving that until you get the extension working.

What is your endpoint (IP phone make/model or softphone app/version)? Does it register ok? What happens on an attempted outgoing call? On an incoming call?

I don’t have an endpoint, I want to remotely connect to the pbx using that extension and have it dial other extensions, or call numbers, etc. Its sort of a gateway into the pbx. The point I want to not use registration, but ip authentication, am I doing it wrong by setting the host name to the ip address I want to authenticate with?

This should be set up as a trunk. It’s easiest with pjsip. Set Registration None, Authentication None and set SIP Server to the authorized remote address. To allow the remote device to make outgoing calls, access feature codes, etc., set Context to from-internal . Using the Match (Permit) parameter, you can authorize multiple IP addresses.

How would I do this in chan_sip? In the past I have always done this as an extension, I don’t know why this does not work, but I am willing to try? Where do I put sip server, in peer details or something and I don’t see a permit or deny, maybe do I put this in peer details? In my trunks I set the host name to my provider’s ip address.

bump? Anyone with any instructions? I did get connected to my extension, but it won’t do much except say

[2022-01-10 18:12:28] ERROR[325263] netsock2.c: getaddrinfo(“”, “(null)”, …): Name or service not known
[2022-01-10 18:12:28] WARNING[325263] acl.c: Unable to lookup ‘’

The library call requires an IP address not a network prefix. It doesn’t treat /32 as a special case.

Convert to Chan_PJSIP.

Have you tried looking at your router’s firewall port forwarding settings? The ports open in the router must be matching in the Trunk’s listen port.
I assuming that you want your IP phone is outside of your cloud hosted PBX.
I might be assuming wrongly but better to eliminate possible chokepoints.

The error is pretty clear from the message. is not a validly formed IP address.

What I was originally trying to do was to set hostname to just an ip address and in my client set it so it does not reggister. What I have now which does work, is host=dynamic and use a password. Does hostid= not work anymore?’

There is no hostid parameter, in chan_sip. host takes an IP address or a domain name, but is neither.

I tried host= and it complained about trying to look up, so will host= still work anymore?