Closed Sivanesh1992 closed 1 year ago
Please use a valid MSISDN, tel:00000001 is not valid neither is tel:00000002, there should not be leading zeros
i tested with one plus mobile with same MSISDN its working but while using samsung mobiles voice call is not establishing.
hmmm..I am guessing its related to Samsung sending the following (which is wrong) in INVITE (did you change in Samsung IMS settings to prefer using tel rather than sip ??)
Whereas Oneplus sends the following (correct one) in INVITE
we don't see any sip setting in samsung mobile
i try to change apn internet to ims also but sms is working voice call is not establishing
sorry , which file i need to change
After apply changes i need to rebuild?
Please apply the below diff and give it a try (please revert the previously applied diff). Yes it should be applied to scscf/kamailio_scscf.cfg
diff --git a/scscf/kamailio_scscf.cfg b/scscf/kamailio_scscf.cfg
index 7b8c945..76e599b 100644
--- a/scscf/kamailio_scscf.cfg
+++ b/scscf/kamailio_scscf.cfg
@@ -451,6 +451,12 @@ route {
# #$ru = $(ru{re.subst,/;phone-context=[A-Za-z.0-9+-]*@/;phone-context=NETWORKNAME@/g});
# }
# }
+ if ($hdr(P-Asserted-Identity) =~ "tel:.*" && $fu =~ "sip:.*") {
+ # For broken SIP implementation in Samsung devices
+ remove_hf("P-Asserted-Identity");
+ append_hf("P-Asserted-Identity: <$(fu{re.subst,/;*//g})>\r\n");
+ msg_apply_changes();
+ }
if (!is_method("REGISTER|SUBSCRIBE")) {
# sip:xxx;phone-context=xxxx@xxx format is not desired
if (($ru =~ ".*phone-context.*") && ($ru =~ "sip:.*")) {
No need to rebuild after applying the changes
Hi @herlesupreeth
After done above changes i facing same issue . from oneplus 8T mobile i am able to make call and send sms to samsung mobile But from samsung mobile i am not able to make call but able to send sms.
ausf.log nssf.log bsf.log pcf.log udm.log udr.log sgwu.log upf.log mme.log hss.log pcrf.log smf.log sgwc.log amf.log nrf.log scp.log
I dont think you applied the diff correctly. Remove all changes from SCSCF and apply the below change in PCSCF (pcscf/route/mo.cfg)
diff --git a/pcscf/route/mo.cfg b/pcscf/route/mo.cfg
index 8e7673f..67e4712 100644
--- a/pcscf/route/mo.cfg
+++ b/pcscf/route/mo.cfg
@@ -24,9 +24,9 @@ route[MO]
# Add P-Charging-Vector
sip_p_charging_vector("g");
- if (is_present_hf("P-Preferred-Identity") && pcscf_assert_identity("location", "$hdr(P-Preferred-Identity)")) {
+ if (is_present_hf("P-Preferred-Identity") && pcscf_assert_identity("location", "$hdr(P-Preferred-Identity)") && $hdr(P-Preferred-Identity) =~ "sip:.*") {
append_hf("P-Asserted-Identity: $hdr(P-Preferred-Identity)\r\n");
- } else if (is_present_hf("P-Asserted-Identity") && pcscf_assert_identity("location", "$hdr(P-Asserted-Identity)")) {
+ } else if (is_present_hf("P-Asserted-Identity") && pcscf_assert_identity("location", "$hdr(P-Asserted-Identity)") && $hdr(P-Asserted-Identity) =~ "sip:.*") {
append_hf("P-Asserted-Identity: $hdr(P-Asserted-Identity)\r\n");
} else if (pcscf_assert_identity("location", "$(fu{tobody.uri})")) {
append_hf("P-Asserted-Identity: <$(fu{tobody.uri})>\r\n");
after applying above changes still facing same issue
Please send me the logs of the PCSCF and SCSCF
Also, apply the below diff removing previous diffs
diff --git a/pcscf/route/mo.cfg b/pcscf/route/mo.cfg
index 8e7673f..5dc95e8 100644
--- a/pcscf/route/mo.cfg
+++ b/pcscf/route/mo.cfg
@@ -24,12 +24,19 @@ route[MO]
# Add P-Charging-Vector
sip_p_charging_vector("g");
- if (is_present_hf("P-Preferred-Identity") && pcscf_assert_identity("location", "$hdr(P-Preferred-Identity)")) {
+ if (is_present_hf("P-Preferred-Identity") && pcscf_assert_identity("location", "$hdr(P-Preferred-Identity)") && $hdr(P-Preferred-Identity) =~ "sip:.*") {
append_hf("P-Asserted-Identity: $hdr(P-Preferred-Identity)\r\n");
- } else if (is_present_hf("P-Asserted-Identity") && pcscf_assert_identity("location", "$hdr(P-Asserted-Identity)")) {
+ } else if (is_present_hf("P-Asserted-Identity") && pcscf_assert_identity("location", "$hdr(P-Asserted-Identity)") && $hdr(P-Asserted-Identity) =~ "sip:.*") {
append_hf("P-Asserted-Identity: $hdr(P-Asserted-Identity)\r\n");
} else if (pcscf_assert_identity("location", "$(fu{tobody.uri})")) {
- append_hf("P-Asserted-Identity: <$(fu{tobody.uri})>\r\n");
+ # For broken SIP implementation in Samsung devices
+ if ($fu =~ "tel:.*") {
+ $var(new_hdr) = $(fu{tobody.uri}) + "@" + NETWORKNAME;
+ $var(new_hdr) = $(var(new_hdr){re.subst,/tel:/sip:/g});
+ append_hf("P-Asserted-Identity: <$var(new_hdr)>\r\n");
+ } else {
+ append_hf("P-Asserted-Identity: <$(fu{tobody.uri})>\r\n");
+ }
} else {
append_hf("P-Asserted-Identity: <$pcscf_asserted_identity>\r\n");
}
hi @herlesupreeth sorry for delay reply.
after make above changes i am not able to see volte in bouth one plus and samsung mobile newlog.zip scscf.log pcscf.log
in pcscf log i am getting below error:
docker logs pcscf
Deploying component: 'pcscf-1'
mysqld is alive
0(39) INFO: pv [pv_shv.c:60]: shvar_init_locks(): locks array size 16
0(39) CRITICAL:
Thanks for the logs. Will take a look and get back. There is an error in the patch I sent.
Please try with this update diff in PCSCF (pcscf/route/mo.cfg)
diff --git a/pcscf/route/mo.cfg b/pcscf/route/mo.cfg
index 8e7673f..9f32879 100644
--- a/pcscf/route/mo.cfg
+++ b/pcscf/route/mo.cfg
@@ -24,12 +24,19 @@ route[MO]
# Add P-Charging-Vector
sip_p_charging_vector("g");
- if (is_present_hf("P-Preferred-Identity") && pcscf_assert_identity("location", "$hdr(P-Preferred-Identity)")) {
+ if (is_present_hf("P-Preferred-Identity") && pcscf_assert_identity("location", "$hdr(P-Preferred-Identity)") && $hdr(P-Preferred-Identity) =~ "sip:.*") {
append_hf("P-Asserted-Identity: $hdr(P-Preferred-Identity)\r\n");
- } else if (is_present_hf("P-Asserted-Identity") && pcscf_assert_identity("location", "$hdr(P-Asserted-Identity)")) {
+ } else if (is_present_hf("P-Asserted-Identity") && pcscf_assert_identity("location", "$hdr(P-Asserted-Identity)") && $hdr(P-Asserted-Identity) =~ "sip:.*") {
append_hf("P-Asserted-Identity: $hdr(P-Asserted-Identity)\r\n");
} else if (pcscf_assert_identity("location", "$(fu{tobody.uri})")) {
- append_hf("P-Asserted-Identity: <$(fu{tobody.uri})>\r\n");
+ # For broken SIP implementation in Samsung devices
+ if ($fu =~ "tel:.*") {
+ $var(new_hdr) = "$(fu{tobody.uri})@NETWORKNAME";
+ $var(new_hdr) = $(var(new_hdr){re.subst,/tel:/sip:/g});
+ append_hf("P-Asserted-Identity: <$var(new_hdr)>\r\n");
+ } else {
+ append_hf("P-Asserted-Identity: <$(fu{tobody.uri})>\r\n");
+ }
} else {
append_hf("P-Asserted-Identity: <$pcscf_asserted_identity>\r\n");
}
i done above changes same issue able to make voice call from one plus mobile to samsung but samsung to oneplus is call is not establishing.
Damn.. again its an issue in the diff I sent. Sorry, can you please try the below diff
diff --git a/pcscf/route/mo.cfg b/pcscf/route/mo.cfg
index 8e7673f..5f6f268 100644
--- a/pcscf/route/mo.cfg
+++ b/pcscf/route/mo.cfg
@@ -24,12 +24,19 @@ route[MO]
# Add P-Charging-Vector
sip_p_charging_vector("g");
- if (is_present_hf("P-Preferred-Identity") && pcscf_assert_identity("location", "$hdr(P-Preferred-Identity)")) {
+ if (is_present_hf("P-Preferred-Identity") && pcscf_assert_identity("location", "$hdr(P-Preferred-Identity)") && $hdr(P-Preferred-Identity) =~ "sip:.*") {
append_hf("P-Asserted-Identity: $hdr(P-Preferred-Identity)\r\n");
- } else if (is_present_hf("P-Asserted-Identity") && pcscf_assert_identity("location", "$hdr(P-Asserted-Identity)")) {
+ } else if (is_present_hf("P-Asserted-Identity") && pcscf_assert_identity("location", "$hdr(P-Asserted-Identity)") && $hdr(P-Asserted-Identity) =~ "sip:.*") {
append_hf("P-Asserted-Identity: $hdr(P-Asserted-Identity)\r\n");
} else if (pcscf_assert_identity("location", "$(fu{tobody.uri})")) {
- append_hf("P-Asserted-Identity: <$(fu{tobody.uri})>\r\n");
+ # For broken SIP implementation in Samsung devices
+ if ($fu =~ "tel:.*") {
+ $var(new_hdr) = $(fu{tobody.uri}) + "@NETWORKNAME";
+ $var(new_hdr) = $(var(new_hdr){re.subst,/tel:/sip:/g});
+ append_hf("P-Asserted-Identity: <$var(new_hdr)>\r\n");
+ } else {
+ append_hf("P-Asserted-Identity: <$(fu{tobody.uri})>\r\n");
+ }
} else {
append_hf("P-Asserted-Identity: <$pcscf_asserted_identity>\r\n");
}
still facing same issue after change above patch
Samsung phones has one of the most non-spec compliant and shittiest IMS implementation. Please try out the below diff
diff --git a/pcscf/route/mo.cfg b/pcscf/route/mo.cfg
index 8e7673f..db0c43e 100644
--- a/pcscf/route/mo.cfg
+++ b/pcscf/route/mo.cfg
@@ -24,12 +24,20 @@ route[MO]
# Add P-Charging-Vector
sip_p_charging_vector("g");
- if (is_present_hf("P-Preferred-Identity") && pcscf_assert_identity("location", "$hdr(P-Preferred-Identity)")) {
+ if (is_present_hf("P-Preferred-Identity") && pcscf_assert_identity("location", "$hdr(P-Preferred-Identity)") && $hdr(P-Preferred-Identity) =~ "sip:.*") {
append_hf("P-Asserted-Identity: $hdr(P-Preferred-Identity)\r\n");
- } else if (is_present_hf("P-Asserted-Identity") && pcscf_assert_identity("location", "$hdr(P-Asserted-Identity)")) {
+ } else if (is_present_hf("P-Asserted-Identity") && pcscf_assert_identity("location", "$hdr(P-Asserted-Identity)") && $hdr(P-Asserted-Identity) =~ "sip:.*") {
append_hf("P-Asserted-Identity: $hdr(P-Asserted-Identity)\r\n");
} else if (pcscf_assert_identity("location", "$(fu{tobody.uri})")) {
- append_hf("P-Asserted-Identity: <$(fu{tobody.uri})>\r\n");
+ # For broken SIP implementation in Samsung devices
+ if ($fu =~ "tel:.*") {
+ $var(new_hdr) = $(fu{tobody.uri}) + "@NETWORKNAME";
+ $var(new_hdr) = $(var(new_hdr){re.subst,/tel:/sip:/g});
+ append_hf("P-Asserted-Identity: <$var(new_hdr)>\r\n");
+ $fu = $var(new_hdr);
+ } else {
+ append_hf("P-Asserted-Identity: <$(fu{tobody.uri})>\r\n");
+ }
} else {
append_hf("P-Asserted-Identity: <$pcscf_asserted_identity>\r\n");
}
thanks for your support @herlesupreeth now i am able to make call from samsung to one plus .
Awesome.. thanks for testing out patches. I will push the changes to repo now.
HI @herlesupreeth i found one more issue if i make a call from one plus8T to one plus norde CE 5G mobile call is automatically answered .
If i call from one plus nore CE5G to one plus8T mobile i am getting full ring until i answer the call manually
Then it could be a setting in phone. Not related to IMS in my opinion.
ok @herlesupreeth thankyou
thanks for your support @herlesupreeth now i am able to make call from samsung to one plus .
Hi @Sivanesh1992 , may I know which Samsung model you are using here? Thanks!
hi i am using below commit commit 795d8ba4297ee375c1760b2be4c274c720392448 in open5gs_hss_cx branch . Lte is attached and able to send sms but voice call is not established. call_notworking.zip