Sip show peers not working- Ubuntu

Im a noob to asterisk so I would really appropriate some help.

I’ve installed asterisk on to my server using the asterisk quick start guide here. http://www.asterisk.org/sites/asterisk/files/mce_files/documents/asterisk_quick_start_guide.pdf

I’ve got to the stage of trying to set up a test call but i can’t get the soft phone to register.

I tried going to the asterisk console and running sip show peers but i get the following return " No such command 'No such command ‘sip show peers’". When I try and run module load chan_sip.so I get:

[Feb 15 20:43:25] WARNING[9590]: loader.c:434 load_dynamic_module: Error loading module ‘chan_sip.so’: /usr/lib/asterisk/modules/chan_sip.so: cannot open shared object file: No such file or directory
[Feb 15 20:43:25] WARNING[9590]: loader.c:910 load_resource: Module ‘chan_sip.so’ could not be loaded.
Can someone help me out?

Thanks

Sometimes is needed run the ldconfig command to refresh the library path. Check the shared libraries required by chan_sip.so, run this command

ldd /usr/lib/asterisk/modules/chan_sip.so

1 Like

When you built Asterisk, it most likely did not build chan_sip. The most likely explanation is that you are missing system dependencies that the module needs. If you run the menuselect tool, it will tell you if it is building chan_sip, and if not, why. In the root directory of the Asterisk source code, run:

asterisk $ make menuselect

In the menuselect tool, browse to Channel Drivers, and select chan_sip. if it can’t build it, it will be XXX’d out. If it can’t, it should tell you as well what libraries it needs in order to build chan_sip.

1 Like

Ok so I ran make menu select and installed the dependencies for chan_sip and now rather than ‘xxx’ I have an ‘*’ next to chan_sip.

I then ran ./configure
make
make install
make samples

and I’m still getting the message
No such command 'sip show peers' (type 'core show help sip show' for other possible commands)

Any Ideas?

This didn’t seem to work :frowning:

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 :smile:

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:

[modules]
autoload=yes

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 ERROR or 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[8043]: 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))
Loaded chan_sip
*CLI> 

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 ERROR or 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.

3 Likes

Thanks, mjordan, your answer helps a lot !

Tu m’as sauvé la vie Mr Jordanie
Merciiiiiii beaucoup

also if you are setting up a new system you should switch to use chan_pjsip as chan_sip is deprecated