And what, unless there is no iax2 support ?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1979
Hello Everybody,
In during developing new module in Kamailio, I encountered with strange
thing. I used htable module instead of linked list for save some temporary
data during call process.dependencies module to save some information. the
skeleton of my code is like thus:
if (SIP_REQUEST &METHOD_INVITE) {
insert_data_htable("some data");
other_process(msg);
}else if(SIP_REPLY){
get_data_htable("some data");
other_process(msg);
}
In other_process function i have some changes in msg's body with message
lump.
But after i make first call in kamailio. The kamailio was crashed.What is
it's problem?
In additional if i comment either insert/get_data_htable function or
othet_process function, i dont have this issue.
With best regards.
--
--Mojtaba Esfandiari.S
[5.2] 200 Ok on Re-invite faces "transaction not found - (branch -1)" when topos module is used
### Description
My setup is UAC --> Kamailio SBC --> External PBX
When external PBX sends 407 Proxy Autehtication required , the kamailio SBC sends another invite with auth header ( uac module ) and updated cseq ( from dialog modules track_cseq_updates ). To this the external PBX replies with 200 OK . However Kamailio SBC drops this 200 ok with "**t_reply_matching(): failure to match a transaction**" and "**reply_received(): transaction not found - (branch -1)"**.
I am using Lua engine but problem is reproducible even with plain config file based routing configuration
### Troubleshooting
#### Reproduction
Reproducible everytime with uac module working with uac and topos module from v5.1 and above.
#### Debugging Data
Sample parameters declaration I am using is like
```
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "track_cseq_updates", 1)
modparam("uac","auth_username_avp","$avp(auser)")
modparam("uac","auth_password_avp","$avp(apass)")
modparam("uac","auth_realm_avp","$avp(arealm)")
modparam("topos", "storage", "redis")
modparam("topos", "sanity_checks", 1)
modparam("topos_redis", "serverid", "sbc")
```
#### Log Messages
Pasting some snippets from Kamailio in deug mode 3 ( mangled the ips and values of some private identities)
```
<To> [31]; uri=[sip:1234567890@<kamailio_pvt_ip_addr>]
to body [<sip:1234567890@<kamailio_pvt_ip_addr>>]
cseq <CSeq>: <1> <INVITE>
content_length=286
found end of header
add param: tag=e0090423
SIP Request:
method: <INVITE>
uri: <sip:1234567890@<kamailio_pvt_ip_addr>>
version: <SIP/2.0>
<branch> = <z9hG4bK-d8754z-e7184457335bac6a-1---d8754z->; state=6
<rport> = <n/a>; state=17
parse_via(): end of header reached, state=5
parse_headers(): Via found, flags=2
parse_headers(): this is the first via
parse_addr_spec(): end of header reached, state=10
get_hdr_field(): <To> [31]; uri=[sip:1234567890@<kamailio_pvt_ip_addr>]
get_hdr_field(): to body [<sip:1234567890@<kamailio_pvt_ip_addr>>]
get_hdr_field(): cseq <CSeq>: <1> <INVITE>
--- received sip message - request - call-id: [OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM] - cseq: [1 INVITE]
Jun 3 07:23:05 inbound1 kamailio[3901]: DEBUG: app_lua [app_lua_api.c:666]: app_lua_run_ex(): executing Lua function: [[ksr_request_route]]
get_hdr_field(): content_length=286
get_hdr_field(): found end of header
add param: tag=e0090423
end of header reached, state=29
internal_get_dlg(): no dialog callid='OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM' found
dlg_search(): dialog with callid='OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM' not found
build_new_dlg(): new dialog on hash 3407
populate_leg_info(): leg(0) route_set [], contact [sip:8887779996@<uac_pvt_ip_addr>:10376], cseq [1] and bind_addr [udp:<kamilio_pvt_ip_addr>:5060]
dialog [dlg_hash.c:894]: link_dlg(): linking dialog [3407:2543]
dialog [dlg_hash.c:903]: link_dlg(): ref dlg 0x7f898dd3f4d8 with 1 -> 1
dialog [dlg_cb.c:228]: run_create_callbacks(): dialog=0x7f898dd3f4d8
rr [record.c:918]: add_rr_param(): rr_param_buf=<;did=f4d.fe9>
dialog [dlg_profile.c:536]: set_current_dialog(): setting current dialog [3407:2543]
dialog [dlg_hash.c:705]: dlg_lookup(): ref dlg 0x7f898dd3f4d8 with 1 -> 2
dialog [dlg_hash.c:707]: dlg_lookup(): dialog id=2543 found on entry 3407
dialog [dlg_handlers.c:1834]: dlg_manage(): dialog created before transaction
has_totag(): no totag
matching_3261(): RFC3261 transaction matching failed - via branch [z9hG4bK-d8754z-e7184457335bac6a-1---d8754z-]
tm [t_lookup.c:682]: t_lookup_request(): no transaction found
SIP Request:
method: <INVITE>
uri: <sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true>
version: <SIP/2.0>
Found param type 232, <branch> = <z9hG4bK68dc.5ad386873790061ba2a8f1d254ec3300.0>; state=16
end of header reached, state=5
Via found, flags=2
this is the first via
Found param type 234, <received> = <<uac_pub_ip_addr>>; state=6
Found param type 232, <branch> = <z9hG4bK-d8754z-e7184457335bac6a-1---d8754z->; state=6
Found param type 235, <rport> = <18214>; state=16
end of header reached, state=5
Via found, flags=4
this is the second via
end of header reached, state=10
<To> [74]; uri=[sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true]
to body [<sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true>]
cseq <CSeq>: <1> <INVITE>
content_length=286
found end of header
add param: tag=e0090423
end of header reached, state=29
handling outgoing request (0, 0)
compacted headers - x_via1: [SIP/2.0/UDP <kamailio_pvt_ip_addr>:5060;branch=z9hG4bK68dc.5ad386873790061ba2a8f1d254ec3300.0](82) - x_via2: [SIP/2.0/UDP <uac_pvt_ip_addr>:10376;received=<uac_pub_ip_addr>;branch=z9hG4bK-d8754z-e7184457335bac6a-1---d8754z-;rport=18214](118) - x_vbranch1: [z9hG4bK68dc.5ad386873790061ba2a8f1d254ec3300.0](46)
received on udp socket: (106/100/741) [[SIP/2.0 407 Proxy Authentication Required 0D 0A Via: SIP/2.0/UDP <kamailio_pvt_ip_addr>:5060;branch=z9hG4bK68dc.5ad3]]
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: dialog [dlg_cseq.c:116]: dlg_cseq_prepare_new_msg(): prepare new msg for cseq update operations
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:614]: parse_msg(): SIP Reply (status):
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:616]: parse_msg(): version: <SIP/2.0>
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:618]: parse_msg(): status: <407>
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:620]: parse_msg(): reason: <Proxy Authentication Required>
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 232, <branch> = <z9hG4bK68dc.5ad386873790061ba2a8f1d254ec3300.0>; state=16
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=5
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:492]: parse_headers(): Via found, flags=2
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:494]: parse_headers(): this is the first via
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: dialog [dlg_cseq.c:59]: dlg_cseq_prepare_msg(): prepare msg for cseq update operations
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/parse_addr_spec.c:185]: parse_to_param(): add param: tag=ZZ2ry8U898rSH
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=29
<To> [92]; uri=[sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true]
to body [<sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true>]
cseq <CSeq>: <1> <INVITE>
content_length=0
found end of header
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: dialog [dlg_cseq.c:87]: dlg_cseq_prepare_msg(): no second via in this message
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:614]: parse_msg(): SIP Reply (status):
version: <SIP/2.0>
status: <407>
reason: <Proxy Authentication Required>
Found param type 232, <branch> = <z9hG4bK68dc.5ad386873790061ba2a8f1d254ec3300.0>; state=16
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=5
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:492]: parse_headers(): Via found, flags=2
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:494]: parse_headers(): this is the first via
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/parse_addr_spec.c:185]: parse_to_param(): add param: tag=ZZ2ry8U898rSH
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=29
<To> [92]; uri=[sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true]
to body [<sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true>]
cseq <CSeq>: <1> <INVITE>
content_length=0
found end of header
add param: tag=e0090423
end of header reached, state=29
handling incoming response
branchi 0
From: <sip:8887779996@<kamailio_pvt_ip_addr>>;tag=e0090423
To: <sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true>;tag=ZZ2ry8U898rSH
Call-ID: OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM
CSeq: 1 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.9.0-742-8f1b7e0~64bit
Accept: application/sdpAllow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Proxy-Authenticate: Digest realm="<pbx_pub_ip_addr>", nonce="df67c993-df56-4246-9e79-10fdf0c79cbb", algorithm=MD5, qop="auth"
Content-Length: 0
Via: SIP/2.0/UDP <uac_pvt_ip_addr>:10376;received=<uac_pub_ip_addr>;branch=z9hG4bK-d8754z-e7184457335bac6a-1---d8754z-;rport=18214
Record-Route: <sip:<kamailio_pvt_ip_addr>;lr;ftag=e0090423;did=f4d.fe9;nat=yes>
P-SR-XBranch: z9hG4bK68dc.5ad386873790061ba2a8f1d254ec3300.0
, branchl 1 , branch_id 0
...
parse_msg(): SIP Request:
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:606]: parse_msg(): method: <ACK>
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:608]: parse_msg(): uri: <sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true>
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:610]: parse_msg(): version: <SIP/2.0>
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 232, <branch> = <z9hG4bK68dc.5ad386873790061ba2a8f1d254ec3300.0>; state=16
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=5
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:492]: parse_headers(): Via found, flags=2
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:494]: parse_headers(): this is the first via
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/parse_addr_spec.c:185]: parse_to_param(): add param: tag=ZZ2ry8U898rSH
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=29
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:171]: get_hdr_field(): <To> [92]; uri=[sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true]
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:172]: get_hdr_field(): to body [<sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true>]
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:152]: get_hdr_field(): cseq <CSeq>: <1> <ACK>
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:183]: get_hdr_field(): content_length=0
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/parse_addr_spec.c:185]: parse_to_param(): add param: tag=e0090423
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=29
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: topos [tps_msg.c:934]: tps_request_sent(): handling outgoing request (1, 1)
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: topos [tps_msg.c:380]: tps_pack_message(): compacted headers - x_via1: [SIP/2.0/UDP <kamailio_pvt_ip_addr>:5060;branch=z9hG4bK68dc.5ad386873790061ba2a8f1d254ec3300.0](82) - x_via2: [](0) - x_vbranch1: [z9hG4bK68dc.5ad386873790061ba2a8f1d254ec3300.0](46)
DEBUG: app_lua [app_lua_sr.c:1649]: sr_kemi_lua_exec_func_ex(): param[1] for: log is str: OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM|udp:<uac_pub_ip_addr>:18214|INVITE|failure route: incoming reply received - 407#012
Jun 3 07:23:05 inbound1 kamailio[3902]: ERROR: <core> [core/kemi.c:144]: sr_kemi_core_log(): OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM|udp:<uac_pub_ip_addr>:18214|INVITE|failure route: incoming reply received - 407
OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM|udp:<uac_pub_ip_addr>:18214|INVITE|Auth Request, send authorization to sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true;timeout=60;username=<username>;password=<pass>;carrierid=55
OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM|udp:<uac_pub_ip_addr>:18214|INVITE| ksr_auth gateway : sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true;timeout=60;username=<username>;password=<pass>;carrierid=55
OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM|udp:<uac_pub_ip_addr>:18214|INVITE| ksr_auth creds : <username><pass><pbx_pub_ip_addr>
hdr is <Proxy-Authorization: Digest username="<username>", realm="<pbx_pub_ip_addr>", nonce="df67c993-df56-4246-9e79-10fdf0c79cbb", uri="sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true", qop=auth, nc=00000001, cnonce="2931066055", response="65cbbb1afd6b54bcd5f594a336b53b89", algorithm=MD5>
OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM|udp:<uac_pub_ip_addr>:18214|INVITE| uac auth headers formed
OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM|udp:<uac_pub_ip_addr>:18214|INVITE| relay auth req
OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM|udp:<uac_pub_ip_addr>:18214|INVITE| ksr_route_realy
OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM|udp:<uac_pub_ip_addr>:18214|INVITE|relaying the message with Request-Uri - sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true Destination-Uri -
...
OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM|udp:<uac_pub_ip_addr>:18214|INVITE| req_mtd INVITE1
OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM|udp:<uac_pub_ip_addr>:18214|INVITE| not is dialog request , goto set carrier info
OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM|udp:<uac_pub_ip_addr>:18214|INVITE| target not set for branch route setting
OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM|udp:<uac_pub_ip_addr>:18214|INVITE|target not set for failure , setting
OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM|udp:<uac_pub_ip_addr>:18214|INVITE| core.is_trans_target_set onreply_routetrue
OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM|udp:<uac_pub_ip_addr>:18214|INVITE| ew branch [1] to sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true
has_totag(): no totag
parse_msg(): SIP Request:
method: <INVITE>
uri: <sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true>
version: <SIP/2.0>
Found param type 232, <branch> = <z9hG4bK68dc.5ad386873790061ba2a8f1d254ec3300.1>; state=16
end of header reached, state=5
Via found, flags=2
this is the first via
Found param type 234, <received> = <<uac_pub_ip_addr>>; state=6
Found param type 232, <branch> = <z9hG4bK-d8754z-e7184457335bac6a-1---d8754z->; state=6
Found param type 235, <rport> = <18214>; state=16
end of header reached, state=5
Via found, flags=4
this is the second via
end of header reached, state=10
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:171]: get_hdr_field(): <To> [74]; uri=[sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true]
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:172]: get_hdr_field(): to body [<sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true>]
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:152]: get_hdr_field(): cseq <CSeq>: <1> <INVITE>
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:183]: get_hdr_field(): content_length=286
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/parse_addr_spec.c:185]: parse_to_param(): add param: tag=e0090423
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=29
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: topos [tps_msg.c:934]: tps_request_sent(): handling outgoing request (0, 0)
Jun 3 07:23:05 inbound1 kamailio[3902]: DEBUG: topos [tps_msg.c:380]: tps_pack_message(): compacted headers - x_via1: [SIP/2.0/UDP <kamailio_pvt_ip_addr>:5060;branch=z9hG4bK68dc.5ad386873790061ba2a8f1d254ec3300.1](82) - x_via2: [SIP/2.0/UDP <uac_pvt_ip_addr>:10376;received=<uac_pub_ip_addr>;branch=z9hG4bK-d8754z-e7184457335bac6a-1---d8754z-;rport=18214](118) - x_vbranch1: [z9hG4bK68dc.5ad386873790061ba2a8f1d254ec3300.1](46)
received on udp socket: (106/100/389) [[SIP/2.0 100 Trying 0D 0A Via: SIP/2.0/UDP <kamailio_pvt_ip_addr>:5060;branch=z9hG4bK68dc.5ad386873790061ba2a8f1d254e]]
Jun 3 07:23:05 inbound1 kamailio[3898]: DEBUG: dialog [dlg_cseq.c:116]: dlg_cseq_prepare_new_msg(): prepare new msg for cseq update operations
Jun 3 07:23:05 inbound1 kamailio[3898]: DEBUG: <core> [core/parser/msg_parser.c:614]: parse_msg(): SIP Reply (status):
Jun 3 07:23:05 inbound1 kamailio[3898]: DEBUG: <core> [core/parser/msg_parser.c:616]: parse_msg(): version: <SIP/2.0>
Jun 3 07:23:05 inbound1 kamailio[3898]: DEBUG: <core> [core/parser/msg_parser.c:618]: parse_msg(): status: <100>
Jun 3 07:23:05 inbound1 kamailio[3898]: DEBUG: <core> [core/parser/msg_parser.c:620]: parse_msg(): reason: <Trying>
Jun 3 07:23:05 inbound1 kamailio[3898]: DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 232, <branch> = <z9hG4bK68dc.5ad386873790061ba2a8f1d254ec3300.1.cs1>; state=16
Jun 3 07:23:05 inbound1 kamailio[3898]: DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=5
Jun 3 07:23:05 inbound1 kamailio[3898]: DEBUG: <core> [core/parser/msg_parser.c:492]: parse_headers(): Via found, flags=2
Jun 3 07:23:05 inbound1 kamailio[3898]: DEBUG: <core> [core/parser/msg_parser.c:494]: parse_headers(): this is the first via
Jun 3 07:23:05 inbound1 kamailio[3898]: DEBUG: dialog [dlg_cseq.c:59]: dlg_cseq_prepare_msg(): prepare msg for cseq update operations
Jun 3 07:23:05 inbound1 kamailio[3898]: DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=10
Jun 3 07:23:05 inbound1 kamailio[3898]: DEBUG: <core> [core/parser/msg_parser.c:171]: get_hdr_field(): <To> [74]; uri=[sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true]
Jun 3 07:23:05 inbound1 kamailio[3898]: DEBUG: <core> [core/parser/msg_parser.c:172]: get_hdr_field(): to body [<sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true>]
Jun 3 07:23:05 inbound1 kamailio[3898]: DEBUG: <core> [core/parser/msg_parser.c:152]: get_hdr_field(): cseq <CSeq>: <2> <INVITE>
Jun 3 07:23:05 inbound1 kamailio[3898]: DEBUG: <core> [core/parser/msg_parser.c:183]: get_hdr_field(): content_length=0
Jun 3 07:23:05 inbound1 kamailio[3898]: DEBUG: <core> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header
Jun 3 07:23:05 inbound1 kamailio[3898]: DEBUG: dialog [dlg_cseq.c:87]: dlg_cseq_prepare_msg(): no second via in this message
receive_msg(): --- received sip message - reply - call-id: [OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM] - cseq: [2 INVITE]
t_reply_matching(): branchi 1.cs1
From: <sip:8887779996@<kamailio_pvt_ip_addr>>;tag=e0090423
To: <sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true>
Call-ID: OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM
CSeq: 2 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.9.0-742-8f1b7e0~64bitContent-Length: 0
, branchl 5 , branch_id 16
**t_reply_matching(): failure to match a transaction**
udp_rcv_loop(): received on udp socket: (106/100/1032) [[SIP/2.0 200 OK 0D 0A Via: SIP/2.0/UDP <kamailio_pvt_ip_addr>:5060;branch=z9hG4bK68dc.5ad386873790061ba2a8f1d254ec330]]
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: dialog [dlg_cseq.c:116]: dlg_cseq_prepare_new_msg(): prepare new msg for cseq update operations
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: <core> [core/parser/msg_parser.c:614]: parse_msg(): SIP Reply (status):
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: <core> [core/parser/msg_parser.c:616]: parse_msg(): version: <SIP/2.0>
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: <core> [core/parser/msg_parser.c:618]: parse_msg(): status: <200>
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: <core> [core/parser/msg_parser.c:620]: parse_msg(): reason: <OK>
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 232, <branch> = <z9hG4bK68dc.5ad386873790061ba2a8f1d254ec3300.1.cs1>; state=16
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=5
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: <core> [core/parser/msg_parser.c:492]: parse_headers(): Via found, flags=2
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: <core> [core/parser/msg_parser.c:494]: parse_headers(): this is the first via
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: dialog [dlg_cseq.c:59]: dlg_cseq_prepare_msg(): prepare msg for cseq update operations
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: <core> [core/parser/parse_addr_spec.c:185]: parse_to_param(): add param: tag=08UH03cc7HFcD
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: <core> [core/parser/parse_addr_spec.c:864]: parse_addr_spec(): end of header reached, state=29
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: <core> [core/parser/msg_parser.c:171]: get_hdr_field(): <To> [92]; uri=[sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true]
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: <core> [core/parser/msg_parser.c:172]: get_hdr_field(): to body [<sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true>]
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: <core> [core/parser/msg_parser.c:152]: get_hdr_field(): cseq <CSeq>: <2> <INVITE>
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: <core> [core/parser/msg_parser.c:183]: get_hdr_field(): content_length=218
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: <core> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header
Jun 3 07:23:05 inbound1 kamailio[3903]: DEBUG: dialog [dlg_cseq.c:87]: dlg_cseq_prepare_msg(): no second via in this message
receive_msg(): --- received sip message - reply - call-id: [OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM] - cseq: [2 INVITE]
t_reply_matching(): branchi 1.cs1From: <sip:8887779996@<kamailio_pvt_ip_addr>>;tag=e0090423To: <sip:1231231230@<pbx_pub_ip_addr>:5080;pstn_inbound=true;ignore_userinfo=true>;tag=08UH03cc7HFcDCall-ID: OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjMCSeq: 2 INVITEContact: <sip:1231231230@<pbx_pub_ip_addr>:5080;transport=udp>User-Agent: FreeSWITCH-mod_sofia/1.9.0-742-8f1b7e0~64bitAccept: application/sdpAllow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFYSupported: timer, path, replacesAllow-Events: talk, hold, conference, referContent-Type: application/sdpContent-Disposition: sessionContent-Length: 218Remote-Party-ID: "1231231230" <sip:1231231230@<pbx_pub_ip_addr>>;party=calling;privacy=off;screen=nov=0o=FreeSWITCH 1559530170 1559530171 IN IP4 <pbx_pub_ip_addr>s=FreeSWITCHc=IN IP4 <pbx_pub_ip_addr>t=0 0m=audio 16432 RTP/AVP 0 101a=rtpmap:0 PCMU/8000a=rtpmap:101 telephone-event/8000a=fmtp:101 0-16a=ptime:20 , branchl 5 , branch_id 16
**t_reply_matching(): failure to match a transaction**
```
#### SIP Traffic
Not sure if the callflow will appear disfigured below. Primarily what it depicts is that 200 ok from External PBX is dropped by Kamailio and hence kamailio tries to resen the auth based invote multiple times till request timeout occurs
```
|Time | UAC | Kamailio SBC | External PBX |
|6.649019 | INVITE SDP (g711U te | |SIP INVITE From: <sip:8887779996@<uac_address> To:<sip:18077881601@<uac_address> Call-ID:OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM CSeq:1
| | ------------------> | |
|6.649538 | 100 trying -- your c | |SIP Status 100 trying -- your call is important to us
| | <------------------ | |
|6.650087 | | INVITE SDP (g711U te |SIP INVITE From: <sip:8887779996@<uac_address> To:<sip:18077881601@<uac_address> CSeq:1
| | | ------------------> |
|6.651861 | | 407 Proxy Authentica |SIP Status 407 Proxy Authentication Required
| | | <------------------ |
|6.652194 | | ACK | |SIP ACK From: <sip:8887779996@<uac_address> To:<sip:18077881601@<uac_address> CSeq:1
| | | ------------------> |
|6.653097 | | INVITE SDP (g711U te |SIP INVITE From: <sip:8887779996@<uac_address> To:<sip:18077881601@<uac_address> CSeq:2
| | | ------------------> |
|6.673088 | | 100 Trying| |SIP Status 100 Trying
| | | <------------------ |
|6.676293 | | 200 OK SDP (g711U te |SIP Status 200 OK
| | | <------------------ |
|7.109339 | | INVITE SDP (g711U te |SIP INVITE From: <sip:8887779996@<uac_address> To:<sip:18077881601@<uac_address> CSeq:2
| | | ------------------> |
|7.110230 | | 200 OK SDP (g711U te |SIP Status 200 OK
| | | <------------------ |
|7.176010 | | 200 OK SDP (g711U te |SIP Status 200 OK
| | | <------------------ |
|8.109281 | | INVITE SDP (g711U te |SIP INVITE From: <sip:8887779996@<uac_address> To:<sip:18077881601@<uac_address> CSeq:2
| | | ------------------> |
|8.110154 | | 200 OK SDP (g711U te |SIP Status 200 OK
| | | <------------------ |
|8.176005 | | 200 OK SDP (g711U te |SIP Status 200 OK
| | | <------------------ |
```
### Possible Solutions
By monitoring redis, I can see that compacting headers by topos and tps storage C file on redis is only happening for the branch id of the first invite , such as
```
"HMSET" "b:x:z9hG4bK68dc.5ad386873790061ba2a8f1d254ec3300.0" "rectime" "1559887868" "a_callid" "OWY3ZTQ3NGM3NTg0N2U3YmE2MTBiOTIxMTRkOGZmNjM" "a_uuid" "atpsh-5cf9fea7-123a-1" "b_uuid" "btpsh-5cf9fea7-123a-1" "direction" "0" "x_via" "SIP/2.0/TCP <uac_pvt_address>:9364;received=<uac_pub_address>;branch=z9hG4bK-d8754z-e7184457335bac6a-1---d8754z-;rport=29567" "x_vbranch" "z9hG4bK68dc.5ad386873790061ba2a8f1d254ec3300.0" "s_rr" "<sip:<kamailio_pub_address>:5060;r2=on;lr;ftag=e0090423;did=508.39e1;nat=yes>,<sip:<kamailio_pub_address>;transport=tcp;r2=on;lr;ftag=e0090423;did=f4d.fe9;nat=yes>" "x_tag" "45a56f2c" "s_method" "INVITE" "s_cseq" "1" "a_contact" "sip:6666666666@<uac_pvt_address>:9364;transport=tcp;alias=<uac_pub_address>~29567~2" "as_contact" "<sip:atpsh-5cf9fea7-123a-1@<kamailio_pub_address>;transport=tcp>" "bs_contact" "<sip:btpsh-5cf9fea7-123a-1@<kamailio_pub_address>:5060>" "a_tag" "45a56f2c"
```
But when the 200 ok for re-invite comes back after authentication, the topos module tries to extract the records for new branch cseq such as
"HGETALL" "b:x:5ad386873790061ba2a8f1d254ec3300.1.cs1"
which is obviously not set and hence not fetched resulting in transaction not matched error and 200 ok being dropped.
If topos storage can HMSET for newer branch id as they are created, I presumme it should fix things up and matching transactions will be ok
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.1.8 (x86_64/linux) 5534c0
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 5534c0
compiled on 09:32:39 Jun 7 2019 with gcc 4.8.4
```
* **Operating System**:
```
My OS is
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1975
i try script:
```
$var(some_string) = 'a=foo1;b=foo2;c=foo3,4,5;d=3';
$var(c_value) = $(var(some_string){param.value,c,;});
xlog("L_INFO", "'c' param from '$var(some_string)' is '$var(c_value)'");
```
in log:
> 'c' param from 'a=foo1;b=foo2;c=foo3,4,5;d=3' is 'foo3'
Has this behaviour any reason? or it's possible to delete comma from stop list (and use separator parameter for comma-delimited list)?
```
diff --git a/parser/parse_param.c b/parser/parse_param.c
index b9e0fbc..e7784c8 100644
--- a/parser/parse_param.c
+++ b/parser/parse_param.c
@@ -355,7 +355,6 @@ static inline int parse_token_param(str* _s, str* _r, char separator)
case '\t':
case '\r':
case '\n':
- case ',':
/* So if you find
* any of them
* stop iterating
```
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/648
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests.
If you have questions about using Kamailio or related to its configuration file,
ask on sr-users mailing list:
* http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing
C code, ask on sr-dev mailing list
* http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the
developers to troubleshoot the issue.
If you submit a feature request (or enhancement), you can delete the text of
the template and only add the description of what you would like to be added.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
i want to give decimal value of ip address to the server_id but when i am converting the ipv6 address to decimal then its bigger then integer range.so here in kamailio, we need to update every place where ever we are using server id by int64.we need to also make changes to database also by changing the server_id field type.
### Troubleshooting
#### Reproduction
issue can be reproduced by following steps:
first get the server_id by converting the ipv6 ip address to decimal so whenever any endpoint register it will store the -1 into database as integer range is reached to limit.
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
(paste your debugging data here)
```
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your log messages here)
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your sip traffic here)
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.0.4 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 13:58:01 Nov 20 2017 with unknown
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
```
root@ip-172-31-0-35:~# uname -a
Linux ip-172-31-0-35 4.4.0-1022-aws #31-Ubuntu SMP Tue Jun 27 11:27:55 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1322