[SR-Users] Newbie setup

Daniel Gonzalez gonvaled at gonvaled.com
Tue Jul 2 17:52:14 CEST 2013


It seems this problem is related to the client that I am using: Zoiper has
problems,  Sipdroid/3.1 beta/Nexus 7. has no problems, when connecting
locally to a kamailio server. So first issue solved.

Now I am sticking to Sipdroid for the rest of the setup. I am trying to
connect now to a remote kamailio, with exactly the same config. I get the
following reply from the server (SIP/2.0 403 Not relaying). What I am
trying to do is just a very simple setup with client2 -> router(nat) ->
internet -> kamailio server -> internet -> router(nat) -> client2

How can I configure kamailio to allow for remote clients to connect to it?
Do I need to define "domains"? Any documentation pointers?

Thanks!


U 2013/07/02 17:39:52.468165 my.client.ip.159:36892 ->
my.server.ip.188:44444
REGISTER sip:tethys.my-domain.net SIP/2.0.
Via: SIP/2.0/UDP 192.168.0.101:36892;rport;branch=z9hG4bK81121.
Max-Forwards: 70.
To: <sip:test at tethys.my-domain.net>.
From: <sip:test at tethys.my-domain.net>;tag=z9hG4bK40649044.
Call-ID: 390203117492 at 192.168.0.101.
CSeq: 2 REGISTER.
Contact: <sip:test at 192.168.0.101:36892;transport=udp>.
Expires: 3600.
User-Agent: Sipdroid/3.1 beta/Nexus 7.
Authorization: Digest username="test", realm="tethys.my-domain.net",
nonce="UdL1dFHS9Eh3HYQiafUvPOJg2UBCe+Xt", uri="sip:tethys.my-domain.net",
response="eb956f2b03333aadc24929ecea2eac4a".
Content-Length: 0.
.


U 2013/07/02 17:39:52.468930 my.server.ip.188:44444 ->
my.client.ip.159:36892
SIP/2.0 403 Not relaying.
Via: SIP/2.0/UDP 192.168.0.101:36892
;rport=36892;branch=z9hG4bK81121;received=my.client.ip.159.
To: <sip:test at tethys.my-domain.net
>;tag=759a1ae88f11754261e7a1046469695e.98cf.
From: <sip:test at tethys.my-domain.net>;tag=z9hG4bK40649044.
Call-ID: 390203117492 at 192.168.0.101.
CSeq: 2 REGISTER.
Server: kamailio (4.0.2 (x86_64/linux)).
Content-Length: 0.


On Tue, Jul 2, 2013 at 2:39 PM, Daniel Gonzalez <gonvaled at gonvaled.com>wrote:

> Thanks, that brings me a bit further. The server is replying with 401, but
> my client decides it's a 408.
> Anyway, I do not know why the server would reply with "SIP/2.0 401
> Unauthorized.". The credentials are properly configured in both ends ...
> Any idea what could I do to debug the authentication process in kamailio?
>
> U 2013/07/02 14:33:47.784178 my.client.ip.159:2048 ->
> my.server.ip.188:44444
> REGISTER sip:tethys.my-domain.net;transport=UDP SIP/2.0.
> Via: SIP/2.0/UDP 192.168.0.101:5060
> ;branch=z9hG4bK-d8754z-bdff5558e08beea4-1---d8754z-.
> Max-Forwards: 70.
> Contact: <sip:test at 192.168.0.101:5060
> ;rinstance=9e9412062d4d8402;transport=UDP>.
> To: <sip:test at tethys.my-domain.net;transport=UDP>.
> From: <sip:test at tethys.my-domain.net;transport=UDP>;tag=8d2abf0c.
> Call-ID: OTIxMjFmNGU2MzM1ZjU5NmZjN2FlZTBmZjg0ZThkZDA..
> CSeq: 6 REGISTER.
> Expires: 60.
> Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO,
> SUBSCRIBE.
> Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri.
> User-Agent: Zoiper r18729.
> Allow-Events: presence, kpml.
> Content-Length: 0.
> .
>
>
> U 2013/07/02 14:33:47.784497 my.server.ip.188:44444 ->
> my.client.ip.159:5060
> SIP/2.0 401 Unauthorized.
> Via: SIP/2.0/UDP 192.168.0.101:5060
> ;branch=z9hG4bK-d8754z-bdff5558e08beea4-1---d8754z-;received=my.client.ip.159.
> To: <sip:test at tethys.my-domain.net
> ;transport=UDP>;tag=759a1ae88f11754261e7a1046469695e.58c7.
> From: <sip:test at tethys.my-domain.net;transport=UDP>;tag=8d2abf0c.
> Call-ID: OTIxMjFmNGU2MzM1ZjU5NmZjN2FlZTBmZjg0ZThkZDA..
> CSeq: 6 REGISTER.
> WWW-Authenticate: Digest realm="tethys.my-domain.net",
> nonce="UdLJ11HSyKs65LVgxXdXpE8HRYVp5V7l".
> Server: kamailio (4.0.2 (x86_64/linux)).
> Content-Length: 0.
>
>
>
> On Tue, Jul 2, 2013 at 9:47 AM, Daniel-Constantin Mierla <
> miconda at gmail.com> wrote:
>
>>  Hello,
>>
>>
>> On 7/1/13 8:48 PM, Daniel Gonzalez wrote:
>>
>> Hi,
>>
>>  I am trying to setup a test user. I have installed from repo. This is
>> my monitor output:
>>
>>  [cycle #: 2; if constant make sure server lives]
>> Server:: kamailio (4.0.2 (x86_64/linux))
>> Build:: mi_core.c compiled on 15:41:19 Jul  1 2013 with gcc 4.6.3
>> Flags:: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS,
>> DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
>> USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER,
>> USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
>> GIT:: fc967b
>> Now:: Mon Jul  1 20:43:35 2013
>> Up since:: Mon Jul  1 20:43:04 2013
>> Up time:: 31 [sec]
>>
>>  Transaction Statistics:
>> tmx:UAS_transactions = 0
>> tmx:UAC_transactions = 0
>> tmx:inuse_transactions = 0
>>
>>  Stateless Server Statistics:
>> sl:sent_replies = 1
>> sl:sent_err_replies = 0
>> sl:received_ACKs = 0
>>
>>  UsrLoc Stats:
>> usrloc:location-contacts = 0
>> usrloc:location-expires = 0
>> usrloc:location-users = 0
>> usrloc:registered_users = 0
>>
>>  I am running kamailio as:
>>
>>  sudo /usr/local/kamailio-devel/sbin/kamailio -l <my-public-ip-addr> -E
>> -ddd -D 1
>>
>>  And this is my subscriber:
>>
>>  » kamctl db show subscriber
>>
>> +----+----------+--------------------+------------+---------------+----------------------------------+----------------------------------+------+
>> | id | username | domain             | password   | email_address | ha1
>>                            | ha1b                             | rpid |
>>
>> +----+----------+--------------------+------------+---------------+----------------------------------+----------------------------------+------+
>> |  6 | test     | tethys.xxxxxxx.net | testpasswd |               |
>> 5cf40781f33c6f43a26244046564b67e | eb898de815bc16092e4c2e8c04bfe188 | NULL |
>>
>> +----+----------+--------------------+------------+---------------+----------------------------------+----------------------------------+------+
>>
>>  My sip client is replying all the time with "Request Timeout (408)",
>> and my server is saying:
>>
>>  0(15818) DEBUG: auth [api.c:86]: pre_auth(): auth:pre_auth: Credentials
>> with realm '<my-ip>' not found
>>
>>  What could be going on?
>>
>> the log message is for debug, could be no issue related to it.
>>
>> You should watch the sip traffic on the server and see what happens, you
>> can use:
>>
>> ngrep -d any -qt -W byline port 5060
>>
>> Cheers,
>> Daniel
>>
>> --
>> Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130702/c80087c0/attachment-0001.html>


More information about the sr-users mailing list