Hello,
i test on refer packet on Kamailio 5.3-dev . it gives route_uri (@route_uri) instead of
request-uri ($ru).
Could you give me help about it please.
Thanks.
Packet
2018/11/15 10:51:20.522512 192.168.1.109:5080 -> 192.168.1.120:5060
REFER sip:100@192.168.1.120 SIP/2.0
CSeq: 1 REFER
From: <sip:105@192.168.1.120;transport=UDP>;tag=10215SIPpTag001
To: <sip:100@192.168.1.120;transport=UDP>;tag=7e3fb504
Call-ID: 1-10215(a)192.168.1.109
Max-Forwards: 70
Route: <sip:192.168.1.120;lr>
Via: SIP/2.0/UDP 192.168.1.136:5080;branch=z9hG4bK-10215-1-7
Contact: <sip:105@192.168.1.136:5080>
Refer-To: <sip:103@192.168.1.120>
Referred-By: <sip:105@192.168.1.120;transport=UDP>
Content-Length: 0
1(48532) WARNING: {1 1 REFER 1-10215(a)192.168.1.109} <script>: REFER in WITHINDLG
[$ru sip:192.168.1.120;lr ]
1(48532) WARNING: {1 1 REFER 1-10215(a)192.168.1.109} <script>: REFER MYROUTE [ru
sip:192.168.1.120;lr ] [route_uri sip:192.168.1.120;lr ] [ rU <null> ]
Scenairo
SIPP UAC -> Kamailio - > UAC 2
After call answered , SIPP send REFER request as above.
Show replies by date
in addition more log
5(48568) DEBUG: <core> [core/udp_server.c:492]: udp_rcv_loop(): received on udp
socket: (112/100/463) [[REFER sip:100@192.168.1.120 SIP/2.0 0D 0A CSeq: 1 REFER 0D 0A
From: <sip:105@192.168.1.120;transport=UDP>;tag=]]
5(48568) DEBUG: <core> [core/parser/msg_parser.c:610]: parse_msg(): SIP Request:
5(48568) DEBUG: <core> [core/parser/msg_parser.c:612]: parse_msg(): method:
<REFER>
5(48568) DEBUG: <core> [core/parser/msg_parser.c:614]: parse_msg(): uri:
<sip:100@192.168.1.120>
5(48568) DEBUG: <core> [core/parser/msg_parser.c:616]: parse_msg(): version:
<SIP/2.0>
5(48568) DEBUG: <core> [core/parser/msg_parser.c:152]: get_hdr_field(): cseq
<CSeq>: <1> <REFER>
5(48568) DEBUG: <core> [core/parser/parse_addr_spec.c:185]: parse_to_param(): add
param: tag=f725186e
5(48568) DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end
of header reached, state=29
5(48568) DEBUG: <core> [core/parser/msg_parser.c:171]: get_hdr_field(): <To>
[52]; uri=[sip:100@192.168.1.120;transport=UDP]
5(48568) DEBUG: <core> [core/parser/msg_parser.c:174]: get_hdr_field(): to body
[<sip:100@192.168.1.120;transport=UDP>], to tag [f725186e]
5(48568) DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found
param type 232, <branch> = <z9hG4bK-10217-1-7>; state=16
5(48568) DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header
reached, state=5
5(48568) DEBUG: <core> [core/parser/msg_parser.c:498]: parse_headers(): Via found,
flags=2
5(48568) DEBUG: <core> [core/parser/msg_parser.c:500]: parse_headers(): this is the
first via
5(48568) DEBUG: <core> [core/receive.c:245]: receive_msg(): --- received sip
message - request - call-id: [1-10217(a)192.168.1.109] - cseq: [1 REFER]
5(48568) DEBUG: <core> [core/parser/msg_parser.c:185]: get_hdr_field():
content_length=0
5(48568) DEBUG: <core> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of
header
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} <core> [core/receive.c:295]:
receive_msg(): preparing to run routing scripts...
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} pv [pv_core.c:1031]:
pv_get_useragent(): no User-Agent header
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} maxfwd [mf_funcs.c:74]:
is_maxfwd_present(): value = 70
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:247]:
check_ruri_sip_version(): check_ruri_sip_version entered
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:270]:
check_ruri_sip_version(): check_ruri_sip_version passed
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:277]:
check_ruri_scheme(): check_ruri_scheme entered
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:297]:
check_ruri_scheme(): check_ruri_scheme passed
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:305]:
check_required_headers(): check_required_headers entered
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:313]:
check_required_headers(): check_required_headers passed
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:321]:
check_via1_header(): check via1 header
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:479]:
check_cseq_method(): check_cseq_method entered
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:512]:
check_cseq_method(): check_cseq_method passed
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:521]:
check_cseq_value(): check_cseq_value entered
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:549]:
check_cseq_value(): check_cseq_value passed
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:558]: check_cl():
check_cl entered
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:583]: check_cl():
check_cl passed
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:595]:
check_expires_value(): check_expires_value entered
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:632]:
check_expires_value(): no expires header found
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:728]:
check_parse_uris(): check_parse_uris entered
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:732]:
check_parse_uris(): parsing ruri
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:746]:
check_parse_uris(): looking up From header
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:760]:
check_parse_uris(): parsing From header
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} <core>
[core/parser/parse_addr_spec.c:185]: parse_to_param(): add param: tag=10217SIPpTag001
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} <core>
[core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=29
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:786]:
check_parse_uris(): parsing From URI
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:804]:
check_parse_uris(): looking up To header
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:826]:
check_parse_uris(): check_parse_uris(): parsing To URI
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity.c:871]:
check_parse_uris(): check_parse_uris passed
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} sanity [sanity_mod.c:254]:
w_sanity_check(): sanity checks result: 1
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} tm [t_lookup.c:1019]: t_check_msg():
msg (0x7f3541774a30) id=2 global id=1 T start=0xffffffffffffffff
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} tm [t_lookup.c:477]:
t_lookup_request(): start searching: hash=20779, isACK=0
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} tm [t_lookup.c:435]: matching_3261():
RFC3261 transaction matching failed
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} tm [t_lookup.c:659]:
t_lookup_request(): no transaction found
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} tm [t_lookup.c:1088]: t_check_msg():
msg (0x7f3541774a30) id=2 global id=2 T end=(nil)
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} siputils [checks.c:123]: has_totag():
totag found
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} rr [loose.c:90]: is_preloaded():
is_preloaded: No
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} <core> [core/socket_info.c:564]:
grep_sock_info(): checking if host==us: 13==13 && [192.168.1.120] ==
[192.168.1.120]
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} <core> [core/socket_info.c:567]:
grep_sock_info(): checking if port 5060 (advertise 0) matches port 5060
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} rr [loose.c:676]: after_strict(): Next
hop: 'sip:192.168.1.120;lr' is loose router
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} rr [loose.c:726]: after_strict(): The
last route URI: 'sip:192.168.1.120;lr'
5(48568) WARNING: {1 1 REFER 1-10217(a)192.168.1.109} <script>: REFER in WITHINDLG
[$ru sip:192.168.1.120;lr ]
5(48568) WARNING: {1 1 REFER 1-10217(a)192.168.1.109} <script>: REFER MYROUTE [ ru
sip:192.168.1.120;lr ] [route_uri sip:192.168.1.120;lr ] [ ru <null> ]
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} registrar [regpv.c:480]:
pv_fetch_contacts_helper(): '' Not found in usrloc
5(48568) DEBUG: {1 1 REFER 1-10217(a)192.168.1.109} registrar [lookup.c:233]:
lookup_helper(): '' Not found in usrloc
5(48568) WARNING: {1 1 REFER 1-10217(a)192.168.1.109} <script>: RC den donen -1
Hello, i found problem.
loose_route setting last route so it gives wrong uri.
Thanks.
[Solved]