Hello,
to send out by R-URI, it has to include a host part (ip or domain) where
to deliver the message. TIf you want to keep tel uri in R-URI, then you
have to set destination uri. Or translate the tel uri to sip uri --
there is a function for it in the siputils module, iirc.
Cheers,
Daniel
On 23.02.21 11:57, lgl_hust(a)sina.com wrote:
In sip register: Request-URI:
sip:ims.mnc001.mcc310.3gppnetwork.org ,
sip register is ok.
In sip invite: Request-URI:
tel:310010120073501;phone-context=ims.mnc001.mcc310.3gppnetwork.org,
return 478 Unresolvable destination .
I saw issue #2287
<https://github.com/kamailio/kamailio/pull/2287> and #1173
<https://github.com/kamailio/kamailio/issues/1173> . #2287
<https://github.com/kamailio/kamailio/pull/2287> deals with register,
and #1173 <https://github.com/kamailio/kamailio/issues/1173> has no
result.
I want to know how to support such RURI in sip invite, does it need a
patch in code ? If so , where and how to modified it .
Should i modified kamailio.cfg such as bellows ??? I don't know how
modified the kamailio.cfg .
if (is_method("INVITE")) {
$ru = "sip:ims.mnc008.mcc460.3gppnetwork.org"; # rewrite the
"Request-URI"
$du= "sip:ims.mnc008.mcc310.3gppnetwork.org";
}
Thanks a lot.
The following is the log:
2021-02-23T03:12:08.391838+08:00 10-164 kamailio[238089]: DEBUG:
[core/parser/msg_parser.c:610]: parse_msg(): SIP Request:
2021-02-23T03:12:08.391838+08:00 10-164 kamailio[238089]: DEBUG:
[core/parser/msg_parser.c:612]: parse_msg(): method:
2021-02-23T03:12:08.392017+08:00 10-164 kamailio[238089]: DEBUG:
[core/parser/msg_parser.c:614]: parse_msg(): uri:
tel:888555;phone-context=ims.mnc008.mcc310.3gppnetwork.org
2021-02-23T03:12:08.392190+08:00 10-164 kamailio[238089]: DEBUG:
[core/parser/msg_parser.c:616]: parse_msg(): version: <SIP/2.0>
2021-02-23T03:12:08.392358+08:00 10-164 kamailio[238089]: DEBUG:
[core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header
reached, state=10
2021-02-23T03:12:08.392556+08:00 10-164 kamailio[238089]: DEBUG:
[core/parser/msg_parser.c:171]: get_hdr_field(): [70];
uri=[tel:888555;phone-context=ims.mnc008.mcc310.3gppnetwork.org]
2021-02-23T03:12:08.392732+08:00 10-164 kamailio[238089]: DEBUG:
[core/parser/msg_parser.c:174]: get_hdr_field(): to body
(70)["888555"tel:888555;phone-context=ims.mnc008.mcc310.3gppnetwork.org#15
<https://github.com/kamailio/kamailio/issues/15>#012], to tag (0)[]
2021-02-23T03:12:08.392904+08:00 10-164 kamailio[238089]: DEBUG:
[core/parser/msg_parser.c:152]: get_hdr_field(): cseq : <1>
2021-02-23T03:12:08.393072+08:00 10-164 kamailio[238089]: DEBUG:
[core/parser/parse_via.c:1303]: parse_via_param(): Found param type
232, = ; state=6
2021-02-23T03:12:08.393243+08:00 10-164 kamailio[238089]: DEBUG:
[core/parser/parse_via.c:1303]: parse_via_param(): Found param type
235, = <n/a>; state=17
2021-02-23T03:12:08.393419+08:00 10-164 kamailio[238089]: DEBUG:
[core/parser/parse_via.c:2639]: parse_via(): end of header reached,
state=5
2021-02-23T03:12:08.393615+08:00 10-164 kamailio[238089]: DEBUG:
[core/parser/msg_parser.c:498]: parse_headers(): Via found, flags=2
2021-02-23T03:12:08.393814+08:00 10-164 kamailio[238089]: DEBUG:
[core/parser/msg_parser.c:500]: parse_headers(): this is the first via
2021-02-23T03:12:08.393975+08:00 10-164 kamailio[238089]: DEBUG:
[core/receive.c:319]: receive_msg(): --- received sip message -
request - call-id: [tBfcbAf2y(a)10.45.0.101] - cseq: [1 INVITE]
2021-02-23T03:12:08.394132+08:00 10-164 kamailio[238089]: DEBUG:
[core/parser/msg_parser.c:185]: get_hdr_field(): content_length=770
2021-02-23T03:12:08.394289+08:00 10-164 kamailio[238089]: DEBUG:
[core/parser/msg_parser.c:89]: get_hdr_field(): found end of header
2021-02-23T03:12:08.394455+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} [core/receive.c:379]: receive_msg():
preparing to run routing scripts...
2021-02-23T03:12:08.394623+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} maxfwd [mf_funcs.c:74]:
is_maxfwd_present(): value = 70
2021-02-23T03:12:08.394782+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:247]:
check_ruri_sip_version(): check_ruri_sip_version entered
2021-02-23T03:12:08.394942+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:270]:
check_ruri_sip_version(): check_ruri_sip_version passed
2021-02-23T03:12:08.395104+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:277]:
check_ruri_scheme(): check_ruri_scheme entered
2021-02-23T03:12:08.395274+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:297]:
check_ruri_scheme(): check_ruri_scheme passed
2021-02-23T03:12:08.395439+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:318]:
check_required_headers(): check_required_headers entered
2021-02-23T03:12:08.395594+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:340]:
check_required_headers(): check_required_headers passed
2021-02-23T03:12:08.395748+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:348]:
check_via1_header(): check via1 header
2021-02-23T03:12:08.395905+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:506]:
check_cseq_method(): check_cseq_method entered
2021-02-23T03:12:08.396100+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:539]:
check_cseq_method(): check_cseq_method passed
2021-02-23T03:12:08.396261+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:548]:
check_cseq_value(): check_cseq_value entered
2021-02-23T03:12:08.396416+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:576]:
check_cseq_value(): check_cseq_value passed
2021-02-23T03:12:08.396570+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:585]: check_cl():
check_cl entered
2021-02-23T03:12:08.396725+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:610]: check_cl():
check_cl passed
2021-02-23T03:12:08.396882+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:622]:
check_expires_value(): check_expires_value entered
2021-02-23T03:12:08.397037+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:659]:
check_expires_value(): no expires header found
2021-02-23T03:12:08.397198+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:759]:
check_parse_uris(): check_parse_uris entered
2021-02-23T03:12:08.397352+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:763]:
check_parse_uris(): parsing ruri
2021-02-23T03:12:08.397521+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:777]:
check_parse_uris(): looking up From header
2021-02-23T03:12:08.397683+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:791]:
check_parse_uris(): parsing From header
2021-02-23T03:12:08.397846+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} [core/parser/parse_addr_spec.c:185]:
parse_to_param(): add param: tag=qCfcbAf
2021-02-23T03:12:08.398012+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} [core/parser/parse_addr_spec.c:864]:
parse_addr_spec(): end of header reached, state=29
2021-02-23T03:12:08.398192+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:817]:
check_parse_uris(): parsing From URI
2021-02-23T03:12:08.398356+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:835]:
check_parse_uris(): looking up To header
2021-02-23T03:12:08.398510+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:857]:
check_parse_uris(): check_parse_uris(): parsing To URI
2021-02-23T03:12:08.398668+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity.c:902]:
check_parse_uris(): check_parse_uris passed
2021-02-23T03:12:08.398829+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} sanity [sanity_mod.c:254]:
w_sanity_check(): sanity checks result: 1
2021-02-23T03:12:08.398997+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} tm [t_lookup.c:1034]: t_check_msg(): msg
(0x7f648b13dd60) id=3/238089 global id=0/0 T start=0xffffffffffffffff
2021-02-23T03:12:08.399156+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} tm [t_lookup.c:497]: t_lookup_request():
start searching: hash=36710, isACK=0
2021-02-23T03:12:08.399309+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} tm [t_lookup.c:455]: matching_3261():
RFC3261 transaction matching failed - via branch
[z9hG4bKrDfcbAf2yakh41vbaiuY]
2021-02-23T03:12:08.399481+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} tm [t_lookup.c:675]: t_lookup_request():
no transaction found
2021-02-23T03:12:08.399669+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} tm [t_lookup.c:1104]: t_check_msg(): msg
(0x7f648b13dd60) id=3/238089 global id=3/238089 T end=(nil)
2021-02-23T03:12:08.399832+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} siputils [checks.c:120]: has_totag(): no
totag
2021-02-23T03:12:08.399989+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} [core/socket_info.c:630]:
grep_sock_info(): checking if host==us: 0==13 && [] == [192.168.12.99]
2021-02-23T03:12:08.400145+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} [core/socket_info.c:637]:
grep_sock_info(): checking if port 5060 (advertise 0) matches port 5060
2021-02-23T03:12:08.400303+08:00 10-164 kamailio[238089]: ERROR: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} [core/resolve.c:1808]: str2ip6buf():
invalid name, no conversion to IP address possible
2021-02-23T03:12:08.400465+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} [core/name_alias.h:62]: grep_aliases():
matching (0::5060) vs. (0:ims.mnc008.mcc310.3gppnetwork.org:0)
2021-02-23T03:12:08.400625+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} [core/forward.c:423]: check_self(): host
(0::5060) != me
2021-02-23T03:12:08.400792+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} tm [t_lookup.c:1328]: t_newtran(): msg
(0x7f648b13dd60) id=3/238089 global id=3/238089 T start=(nil)
2021-02-23T03:12:08.400952+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} tm [t_lookup.c:497]: t_lookup_request():
start searching: hash=36710, isACK=0
2021-02-23T03:12:08.401109+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} tm [t_lookup.c:455]: matching_3261():
RFC3261 transaction matching failed - via branch
[z9hG4bKrDfcbAf2yakh41vbaiuY]
2021-02-23T03:12:08.401266+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} tm [t_lookup.c:675]: t_lookup_request():
no transaction found
2021-02-23T03:12:08.401420+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} tm [t_hooks.c:336]:
run_reqin_callbacks_internal(): trans=0x7f648403f798, callback type 1,
id 0 entered
2021-02-23T03:12:08.401590+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} [core/md5utils.c:67]: MD5StringArray():
MD5 calculated: 589961c517bb910457d06701844fbbd4
2021-02-23T03:12:08.401768+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} tm [t_funcs.c:325]: t_relay_to(): new INVITE
2021-02-23T03:12:08.401934+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} tm [t_reply.c:614]: _reply_light():
reply sent out. buf=0x7f648b1439c0: SIP/2.0 100 trying -...,
shmem=0x7f6484043b78: SIP/2.0 100 trying -
2021-02-23T03:12:08.402096+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} tm [t_reply.c:625]: _reply_light(): finished
2021-02-23T03:12:08.402250+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} <script>: new branch [0] to
tel:888555;phone-context=ims.mnc008.mcc310.3gppnetwork.org
2021-02-23T03:12:08.402406+08:00 10-164 kamailio[238089]: ERROR: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} [core/resolve.c:1740]: str2ipbuf():
invalid name, no conversion to IP address possible
2021-02-23T03:12:08.402573+08:00 10-164 kamailio[238089]: ERROR: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} [core/resolve.c:1808]: str2ip6buf():
invalid name, no conversion to IP address possible
2021-02-23T03:12:08.402735+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} [core/dns_cache.c:527]:
_dns_hash_find(): (_sip._udp.(10), 33), h=956
2021-02-23T03:12:08.402891+08:00 10-164 kamailio[238089]: ERROR: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} [core/resolve.c:1808]: str2ip6buf():
invalid name, no conversion to IP address possible
2021-02-23T03:12:08.403081+08:00 10-164 kamailio[238089]: ERROR: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} [core/resolve.c:1740]: str2ipbuf():
invalid name, no conversion to IP address possible
2021-02-23T03:12:08.403245+08:00 10-164 kamailio[238089]: ERROR: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} [core/dns_cache.c:521]:
_dns_hash_find(): invalid name, no cache lookup possible
2021-02-23T03:12:08.403415+08:00 10-164 kamailio[238089]: ERROR: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} [core/resolve.c:1715]:
sip_hostport2su(): could not resolve hostname: ""
2021-02-23T03:12:08.403577+08:00 10-164 kamailio[238089]: ERROR: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} tm [ut.h:309]: uri2dst2(): failed to
resolve ""
2021-02-23T03:12:08.403737+08:00 10-164 kamailio[238089]: ERROR: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} tm [t_fwd.c:1738]: t_forward_nonack():
failure to add branches
2021-02-23T03:12:08.403898+08:00 10-164 kamailio[238089]: DEBUG: {1 1
INVITE tBfcbAf2y(a)10.45.0.101} tm [t_funcs.c:335]: t_relay_to():
t_forward_nonack returned error -478 (-478)
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users