[OpenSIPS-Users] Bare Bones

Rodrigo Pimenta Carvalho pimenta at inatel.br
Fri Oct 30 11:56:36 CET 2015


Hi Alexander.

I'm back to the office.

In case you still want to see some of the SIP messages  in a kind of OpenSIPS log, run:

sudo /etc/init.d/opensips start

And I have used the following lines in my config file:

-----------------------------------------------------------------------
####### Global Parameters #########

debug=4
log_stderror=yes
log_facility=LOG_LOCAL1

fork=yes
children=4

/* uncomment the following lines to enable debugging */
#debug=6
#fork=no
#log_stderror=yes


listen=udp:eth0:5060   # CUSTOMIZE ME

listen=tcp:eth0:5060   # CUSTOMIZE ME 
listen=tls:eth0:5061   # CUSTOMIZE ME 
---------------------------------------------------------------------------

And in the file opensipsctlrc I have:

-----------------
STARTOPTIONS=" -E -f /usr/local/opensips_proxy/etc/opensips/my_opensips_configFile.cfg"
----------------


Maybe you also should consider (for debugging purpose) (I'm using Ubuntu 14.04 LTI):


1 - cd /usr/local/src/1.8/packaging/debian/
2 - cp -Rf opensips.init /etc/init.d/opensips
3 - chmod +x /etc/init.d/opensips
4 - vi /etc/init.d/opensips
5 - Edit the line of DAEMON:
     DAEMON = /usr/local/opensips_proxy/sbin/opensips


6 - Find the string OPTIONS
7 - In such line with OPTIONS, add: "-f " in the end of the line.
     EX: ... $GROUP -f /usr/local/opensips_proxy/etc/opensips/my_opensips_configFile..."
8 - Save the file and close it.


9 - cd /usr/local/src/1.8/packaging/debian/
10 - cp opensips.default /etc/default/opensips
11 - vi /etc/default/opensips
12 - RUN_OPENSIPS=yes
     #User to run as
     USER=root

     GROUP=root

     S_MEMORY=128  

13 - vi /etc/rsyslog.conf
14 - add: local1.*			-/var/log/opensips.log  



     
Hopefully something here should be useful for you.

P.S.:  I got all instructions from : https://www.youtube.com/watch?v=YNHc8TQq85A
          I 'm also a beginner with these things.

About wireshark, try to see some short tutorial from Youtube too. What about?

RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979

________________________________________
De: users-bounces at lists.opensips.org <users-bounces at lists.opensips.org> em nome de Alexander Shukaev <opensips at Alexander.Shukaev.name>
Enviado: quinta-feira, 29 de outubro de 2015 22:22
Para: OpenSIPS users mailling list
Assunto: Re: [OpenSIPS-Users] Bare Bones

So far I've made some good progress and I would like to share it.  Big
thanks to Travis for pointing me into the right direction.

It turns out that I had

STORE_PLAINTEXT_PW=0

which is a natural setting for production I guess.  Hence,

modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")

is no longer valid.  It should rather be

modparam("auth_db", "calculate_ha1", no)
modparam("auth_db", "password_column", "ha1")

Don't forget to stop 'opensips', then

sudo opensipsdbctl drop
sudo opensipsdbctl create

and again

sudo opensipsctl add 1234 1234
sudo opensipsctl add 5678 5678

and start 'opensips' again.  Then it really starts to work with the
registration in Ekiga.  Finally!

Next, I moved to testing the communication between those accounts.  To
do this, in addition to Ekiga I installed Linphone.  So, through Ekiga,
I register 1234 and add 5678 to contacts, while through Linphone, I
register 5678 and add 1234 to contacts.  It turns out that there is
another strange problem now.  Within Linphone I can both IM and call
from 5678 to 1234 (Ekiga) and in Ekiga I can read those IMs and accept
calls accordingly, while within Ekiga I can neither IM nor call from
1234 to 5678 (Linphone) as for IMs, for example, I get sometimes either
"NOTICE: Could not send message: Unauthorised" or  "NOTICE: Could not
send message: Forbidden".  I attach the Wireshark log for the
"Forbidden" case.

Regards,
Alexander

On 30.10.2015 00:18, Alexander Shukaev wrote:
>> It doesn't look like there's a password specified for the user in your
>> DB
>>
>> Did you configure you UAC to use one?
>
> Could it be because it's hashed?  I'm under impression that it's
> stored in 'ha1' and 'ha1b' fields in the encoded form due to
>
> modparam("auth_db", "calculate_ha1", yes)
> modparam("auth_db", "password_column", "password")
> modparam("auth_db|uri", "db_url",
> "postgres://opensips:$@localhost/opensips") # CUSTOMIZE ME
> modparam("auth_db", "load_credentials", "")
>
>> Also, did you use the opensipsdbctl create to build your user?
>
> Of course, I'm pretty sure it was:
>
> sudo opensipsdbctl create
> sudo opensipsctl add 1234 1234
> sudo opensipsctl add 5678 5678
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



More information about the Users mailing list