So, let’s check a few things.
First, make sure that the module isn’t loaded. On the CLI, run the following:
*CLI> module show like chan_sip
If you see the following:
Module Description Use Count Status Support Level
0 modules loaded
Then it isn’t loaded, and we can fix that. If it is loaded, then you’ve got something super weird occurring, that can’t actually occur, so I don’t want to go there
If it isn’t loaded, you should check your
modules.conf, typically in
/etc/asterisk. If you don’t have the configuration file, then that would explain a lot. If you do, then see if you are autoloading modules, or explicitly loading them. If you’re autoloading, you’ll have the following line:
If not, you’ll need to tell Asterisk to load the module. Look for the explicit load statement, or else add it:
load => chan_sip
If you change
modules.conf, it’s a good idea to just restart and let Asterisk pull the modules in.
If you are autoloading already, or if you are explicitly loading chan_sip, then something is still preventing the module from loading. Your first clue would be to look at the
WARNING messages that are emited at startup; there will be something emitted that tells you what is wrong. If you don’t want to read your log file, you can also force a module load using the following:
*CLI> module load chan_sip
At which point I get:
SIP channel loading...
== Parsing '/etc/asterisk/sip.conf': Found
== Parsing '/etc/asterisk/users.conf': Found
[Feb 17 16:50:35] WARNING: chan_sip.c:32209 reload_config: Failed to bind to 0.0.0.0:5060: Address already in use
== Parsing '/etc/asterisk/sip_notify.conf': Found
-- Message technology 'sip' registered.
== Registered channel type 'SIP' (Session Initiation Protocol (SIP))
== Registered RTP glue 'SIP'
== Registered application 'SIPDtmfMode'
== Registered application 'SIPAddHeader'
== Registered application 'SIPRemoveHeader'
== Registered custom function 'SIP_HEADER'
== Registered custom function 'SIPPEER'
== Registered custom function 'CHECKSIPDOMAIN'
== Manager registered action SIPpeers
== Manager registered action SIPshowpeer
== Manager registered action SIPqualifypeer
== Manager registered action SIPshowregistry
== Manager registered action SIPnotify
== Manager registered action SIPpeerstatus
Loaded chan_sip.so => (Session Initiation Protocol (SIP))
Note that I’ve got some
WARNING messages as I’m running the awesome
chan_pjsip, so I’ve already bound something to port 5060. If you aren’t using PJSIP, you shouldn’t see that.
Most likely, however, you’ll get some
WARNING message telling you why the module couldn’t be loaded - that should point you in the right direction on what you need to fix.