Hello,

apparently the register was replied, then it is another request (could be another register though).

Can you load debugger module and set tis parameter cfgtrace to 1, redo the test and send the output?

Also, it would be good to get the sip message for that case -- inside the request_route, add:

xlog("received message: [[$rb]]\n");

Cheers,
Daniel

On 12/11/14 21:56, Vik Killa wrote:
Hello,
I'm wondering why kamailio will try doing a DNS lookup of the from host with a REGISTER packet when using TCP?
It doesn't do this with UDP.
I always get this error since the host is not a valid domain:

<core> [resolve.c:1726]: sip_hostport2su(): could not resolve hostname: "3.local"


Here is the full log with debug (error is last line)

Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3026]: DEBUG: <core> [mem/shm_mem.c:111]: _shm_resize(): WARNING:vqm_resize: resize(0) called
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3026]: DEBUG: <core> [tcp_main.c:2294]: tcpconn_send_put(): tcp_send: found fd in cache ( 10, 0x7f860bd18938, 1)
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3026]: DEBUG: <core> [tcp_main.c:2516]: tcpconn_do_send(): tcp_send: sending...
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3026]: DEBUG: <core> [tcp_main.c:2550]: tcpconn_do_send(): tcp_send: after real write: c= 0x7f860bd18938 n=639 fd=10
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3026]: DEBUG: <core> [tcp_main.c:2551]: tcpconn_do_send(): tcp_send: buf=#012SIP/2.0 401 Unauthorized#015#012Via: SIP/2.0/TCP 192.168.16.120:53972;received=192.168.213.162;rport=53972;branch=z9hG4bKPjac894585917043d28da015d397178725;alias#015#012From: "1003" <sip:1003@3.local>;tag=dbc7a9087cb84006b65d891e5ad1f5ea#015#012To: "1003" <sip:1003@3.local>;tag=ey7D0K9DX49DF#015#012Call-ID: ee72194a1b8e4effa2948e237d804b90#015#012CSeq: 1 REGISTER#015#012User-Agent: AMPSwitch#015#012Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE#015#012Supported: timer, path, replaces#015#012WWW-Authenticate: Digest realm="3.local", nonce="cdf32dde-ab14-4265-b491-bee703e83255", algorithm=MD5, qop="auth"#015#012Content-Length: 0#015#012#015#012
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3026]: DEBUG: tm [t_reply.c:1663]: cleanup_uac_timers(): DEBUG: cleanup_uac_timers: RETR/FR timers reset
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3026]: DEBUG: <core> [usr_avp.c:643]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil)
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3026]: DEBUG: <core> [usr_avp.c:643]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil)
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3026]: DEBUG: <core> [usr_avp.c:643]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil)
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3026]: DEBUG: <core> [usr_avp.c:643]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil)
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3026]: DEBUG: <core> [usr_avp.c:643]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil)
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3026]: DEBUG: <core> [usr_avp.c:643]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil)
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3026]: DEBUG: <core> [xavp.c:448]: xavp_destroy_list(): destroying xavp list (nil)
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3026]: DEBUG: <core> [receive.c:298]: receive_msg(): receive_msg: cleaning up
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3026]: DEBUG: <core> [io_wait.h:388]: io_watch_add(): DBG: io_watch_add(0xa2c420, 6, 2, 0x7f860bd2dbe0), fd_no=1
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [parser/msg_parser.c:629]: parse_msg():  version: <SIP/2.0>
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [parser/parse_via.c:1284]: parse_via_param(): Found param type 235, <rport> = <n/a>; state=6
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [parser/parse_via.c:1284]: parse_via_param(): Found param type 232, <branch> = <z9hG4bKPj19019d19feaa4a06ac1d6cdc31a2e05d>; state=6
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [parser/parse_via.c:1284]: parse_via_param(): Found param type 237, <alias> = <n/a>; state=16
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [parser/parse_via.c:2672]: parse_via(): end of header reached, state=5
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [parser/msg_parser.c:513]: parse_headers(): parse_headers: Via found, flags=2
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [parser/msg_parser.c:515]: parse_headers(): parse_headers: this is the first via
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [receive.c:154]: receive_msg(): After parse_msg...
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [receive.c:197]: receive_msg(): preparing to run routing scripts...
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: maxfwd [mf_funcs.c:85]: is_maxfwd_present(): value = 70 
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [parser/parse_addr_spec.c:898]: parse_addr_spec(): end of header reached, state=10
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [parser/msg_parser.c:190]: get_hdr_field(): DEBUG: get_hdr_field: <To> [27]; uri=[sip:1003@3.local
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [parser/msg_parser.c:192]: get_hdr_field(): DEBUG: to body ["1003" <sip:1003@3.local>#015#012]
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field: cseq <CSeq>: <1> <PUBLISH>
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [parser/msg_parser.c:204]: get_hdr_field(): DEBUG: get_hdr_body : content_length=757
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [parser/msg_parser.c:106]: get_hdr_field(): found end of header
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: sanity [mod_sanity.c:255]: w_sanity_check(): sanity checks result: 1
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: textops [textops.c:2478]: has_body_f(): content type is 196613
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: siputils [checks.c:103]: has_totag(): no totag
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: tm [t_lookup.c:1072]: t_check_msg(): DEBUG: t_check_msg: msg id=10 global id=9 T start=0xffffffffffffffff
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: tm [t_lookup.c:527]: t_lookup_request(): t_lookup_request: start searching: hash=12001, isACK=0
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: tm [t_lookup.c:485]: matching_3261(): DEBUG: RFC3261 transaction matching failed
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: tm [t_lookup.c:709]: t_lookup_request(): DEBUG: t_lookup_request: no transaction found
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: tm [t_lookup.c:1141]: t_check_msg(): DEBUG: t_check_msg: msg id=10 global id=10 T end=(nil)
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: tm [t_lookup.c:1373]: t_newtran(): DEBUG: t_newtran: msg id=10 , global msg id=10 , T on entrance=(nil)
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: tm [t_lookup.c:527]: t_lookup_request(): t_lookup_request: start searching: hash=12001, isACK=0
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: tm [t_lookup.c:485]: matching_3261(): DEBUG: RFC3261 transaction matching failed
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: tm [t_lookup.c:709]: t_lookup_request(): DEBUG: t_lookup_request: no transaction found
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [md5utils.c:67]: MD5StringArray(): DEBUG: MD5 calculated: d71ddc300035dfaa15e181fe4d6a9aa7
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [dns_cache.c:566]: _dns_hash_find(): dns_hash_find(_sip._tcp.3.local(17), 33), h=867
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [resolve.c:770]: get_record(): get_record: lookup(_sip._tcp.3.local, 33) failed
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [dns_cache.c:894]: dns_cache_mk_bad_entry(): dns_cache_mk_bad_entry(_sip._tcp.3.local, 33, 60, 1)
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [dns_cache.c:827]: dns_cache_add(): dns_cache_add: adding _sip._tcp.3.local(17) 33 (flags=1) at 867
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [dns_cache.c:566]: _dns_hash_find(): dns_hash_find(3.local(7), 1), h=184
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [resolve.c:770]: get_record(): get_record: lookup(3.local, 1) failed
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [dns_cache.c:894]: dns_cache_mk_bad_entry(): dns_cache_mk_bad_entry(3.local, 1, 60, 1)
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: DEBUG: <core> [dns_cache.c:827]: dns_cache_add(): dns_cache_add: adding 3.local(7) 1 (flags=1) at 184
Nov 12 15:45:19 ua01-proxy01 /usr/sbin/kamailio[3025]: ERROR: <core> [resolve.c:1726]: sip_hostport2su(): could not resolve hostname: "3.local"




_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Nov 24-27, Berlin - http://www.asipto.com