herlesupreeth / Kamailio_IMS_Config

Fixed version of Kamailio IMS configuration files for basic calling
48 stars 37 forks source link

Cant Make a Call #6

Closed BorjanEch0 closed 3 years ago

BorjanEch0 commented 3 years ago

I have managed to attach 2 samsung UE's but i cant make a call. When i press call the dial begins and ends immediately and no call is transmitted. I see a lot in logs but i cant make much of it. Here is attached logs and pcap.

volte.zip

BorjanEch0 commented 3 years ago

This did not go good. PCSCF went into an infitine registering loop.


 2(11191) NOTICE: <script>: Expires=600000
 2(11191) NOTICE: <script>: Old header - WWW-Authenticate=Digest realm="ims.mnc001.mcc001.deltanet.org", nonce="T6tulQzhzcHjA6/pDjy/TqiGl+MmaAAAYHplZ4jFUcQ=", algorithm=AKAv1-MD5, ck="4443d015ec8aff9bea4b89212ec58280", ik="0966ced8484c4362210c68f776bc5fda", qop="auth,auth-int"
 2(11191) NOTICE: <script>: New header - WWW-Authenticate=Digest realm="ims.mnc001.mcc001.deltanet.org", nonce="T6tulQzhzcHjA6/pDjy/TqiGl+MmaAAAYHplZ4jFUcQ=", algorithm=AKAv1-MD5, qop="auth,auth-int"
104(11370) NOTICE: <script>: PCSCF: REGISTER sip:ims.mnc001.mcc001.deltanet.org (sip:001010000000001@ims.mnc001.mcc001.deltanet.org (192.168.101.2:40225) to sip:001010000000001@ims.mnc001.mcc001.deltanet.org, CNR0IjeEws5bS9_vwonbfA..@192.168.101.2)
104(11370) INFO: rr [rr_mod.c:515]: pv_get_route_uri_f(): No route header present.
104(11370) NOTICE: <script>: PCSCF REGISTER:
 Destination URI: <null>
 Request URI: sip:ims.mnc001.mcc001.deltanet.org
104(11370) INFO: rr [rr_mod.c:515]: pv_get_route_uri_f(): No route header present.
104(11370) NOTICE: <script>: Source IP and Port: (192.168.101.2:40225)
 Route-URI:
104(11370) NOTICE: <script>: Received IP and Port: (10.0.20.2:5060)
104(11370) NOTICE: <script>: Contact header: <sip:001010000000001@192.168.101.2:5060>;+sip.instance="<urn:gsma:imei:35340811-675669-0>";q=1.0;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel";video;+g.3gpp.smsip
104(11370) INFO: ims_registrar_pcscf [sec_agree.c:264]: cscf_get_security(): No security parameters found
104(11370) INFO: ims_registrar_pcscf [sec_agree.c:296]: cscf_get_security_verify(): No security-verify parameters found
 3(11192) ERROR: ims_ipsec_pcscf [cmd.c:672]: ipsec_create(): No security parameters found in contact

Repeating this over and over and over for both ue;s

here the pcap noipsec.noprecon.pcapng.zip

BorjanEch0 commented 3 years ago

SCSCF also didnt look good.

(11408) DEBUG: ims_auth [authorize.c:460]: challenge(): Suspending SIP TM transaction
 3(11408) DEBUG: ims_auth [authorize.c:1528]: multimedia_auth_request(): Sending MAR
 3(11408) DEBUG: ims_auth [cxdx_mar.c:549]: cxdx_send_mar(): Successfully sent async diameter
20(11440) INFO: ims_auth [cxdx_avp.c:137]: cxdx_get_avp(): cxdx_get_experimental_result_code: Failed finding avp (avp_code = 297, vendor_id = 0)
20(11440) DEBUG: ims_auth [authorize.c:1305]: new_auth_vector(): new auth-vector with ck [2b4af4327b00d39c12ad6d823e14540a] with status 0
20(11440) DEBUG: ims_auth [authorize.c:1559]: pack_challenge(): setting QOP str used is [, qop="auth,auth-int"]
20(11440) DEBUG: ims_auth [authorize.c:1561]: pack_challenge(): QOP str used is [, qop="auth,auth-int"]
20(11440) DEBUG: ims_auth [authorize.c:1448]: get_auth_userdata(): Searching auth_userdata for IMPU sip:001010000000001@ims.mnc001.mcc001.deltanet.org (Hash 937)
20(11440) DEBUG: ims_auth [authorize.c:1457]: get_auth_userdata(): Found auth_userdata
20(11440) DEBUG: ims_auth [authorize.c:1681]: add_auth_vector(): Adding auth_vector (status 1) for IMPU sip:001010000000001@ims.mnc001.mcc001.deltanet.org / IMPI 001010000000001@ims.mnc001.mcc001.deltanet.org (Hash 937)
20(11440) DEBUG: ims_auth [cxdx_mar.c:464]: async_cdp_callback(): DBG:UAR Async CDP callback: ... Done resuming transaction
20(11440) INFO: ims_auth [cxdx_mar.c:79]: create_return_code(): created AVP successfully : [maa_return_code] - [1]
20(11440) WARNING: tm [t_suspend.c:192]: t_continue_helper(): active transaction not found
20(11440) DEBUG: ims_auth [cxdx_mar.c:87]: free_saved_transaction_data(): Freeing saved transaction data: async
 1(11406) NOTICE: <script>: SCSCF: REGISTER sip:scscf.ims.mnc001.mcc001.deltanet.org:6060 (sip:001010000000001@ims.mnc001.mcc001.deltanet.org (10.0.20.2:4060) to sip:001010000000001@ims.mnc001.mcc001.deltanet.org, CNR0IjeEws5bS9_vwonbfA..@192.168.101.2)
 1(11406) ERROR: <script>: ALGORITHM IS [AKAv1-MD5] and User-Agent is [SM-A715F-TK1 Samsung IMS 6.0]
 1(11406) DEBUG: ims_auth [authorize.c:728]: authenticate(): Running authenticate, is_proxy_auth=0
 1(11406) DEBUG: ims_auth [authorize.c:748]: authenticate(): Checking if REGISTER is authorized for realm [ims.mnc001.mcc001.deltanet.org]...
 1(11406) DEBUG: ims_auth [utils.c:168]: get_nonce_response(): Calling find_credentials with realm [ims.mnc001.mcc001.deltanet.org]
 1(11406) DEBUG: ims_auth [utils.c:57]: ims_find_credentials(): Searching credentials in realm [ims.mnc001.mcc001.deltanet.org]
 1(11406) DEBUG: ims_auth [utils.c:92]: ims_find_credentials(): *hook = 0x7fd8b6f8ebc8
 1(11406) DEBUG: ims_auth [utils.c:103]: ims_find_credentials(): Credential parsed successfully
 1(11406) DEBUG: ims_auth [utils.c:106]: ims_find_credentials(): Comparing realm <ims.mnc001.mcc001.deltanet.org> and <ims.mnc001.mcc001.deltanet.org>
 1(11406) DEBUG: ims_auth [utils.c:195]: get_nonce_response(): Found nonce response
 1(11406) DEBUG: ims_auth [authorize.c:786]: authenticate(): Nonce or response missing: nonce len [0], response16 len[0]
 1(11406) DEBUG: ims_auth [authorize.c:293]: challenge(): Looking for route block [REG_MAR_REPLY]
 1(11406) INFO: ims_auth [cxdx_mar.c:79]: create_return_code(): created AVP successfully : [maa_return_code] - [-2]
 1(11406) DEBUG: ims_auth [authorize.c:317]: challenge(): Need to challenge for realm [ims.mnc001.mcc001.deltanet.org]
 1(11406) DEBUG: ims_auth [authorize.c:324]: challenge(): Checking if REGISTER is authorized for realm [ims.mnc001.mcc001.deltanet.org]...
 1(11406) DEBUG: ims_auth [authorize.c:1448]: get_auth_userdata(): Searching auth_userdata for IMPU sip:001010000000001@ims.mnc001.mcc001.deltanet.org (Hash 937)
 1(11406) DEBUG: ims_auth [authorize.c:1457]: get_auth_userdata(): Found auth_userdata
 1(11406) DEBUG: ims_auth [authorize.c:1064]: get_auth_vector(): looping through AV status is 1 and were looking for 0
 1(11406) DEBUG: ims_auth [authorize.c:1064]: get_auth_vector(): looping through AV status is 1 and were looking for 0
 1(11406) DEBUG: ims_auth [authorize.c:1064]: get_auth_vector(): looping through AV status is 1 and were looking for 0
 1(11406) DEBUG: ims_auth [authorize.c:1064]: get_auth_vector(): looping through AV status is 1 and were looking for 0
 1(11406) DEBUG: ims_auth [authorize.c:1064]: get_auth_vector(): looping through AV status is 1 and were looking for 0
 1(11406) DEBUG: ims_auth [authorize.c:1064]: get_auth_vector(): looping through AV status is 1 and were looking for 0
 1(11406) DEBUG: ims_auth [authorize.c:1064]: get_auth_vector(): looping through AV status is 1 and were looking for 0
till infinity
herlesupreeth commented 3 years ago

I am guessing the UE didnt like disabling IPSec, please enable back only the IPSec

BorjanEch0 commented 3 years ago

FInally!! Succes!! i managed to get a few test calls through . With precondition off and mtu 1300 were key here! they solved the problem!!

Here are some pcaps..

However now the call dialed ends just as the other ue starts to ring and if i manage to pick up fast the call is unstabile, delays in audio, and crashes soon. could it be a ping issue or a timing issue?

BorjanEch0 commented 3 years ago

OK setting MTU 1000 fixed it all. stabile call for 1 minute. Eternal thankfulness from me for this. You are really a good person. Hoping i can repay you for this one day.

BorjanEch0 commented 3 years ago

P.S

I forgot to mention, the infinite loop was my misstake, i inserted 2 isims with the same impi and impu in both ues. not caused by ipsec

BorjanEch0 commented 3 years ago

success.zip Here are the traces i forgot.

So my final verdict is this, the air delay between the ue <--> enb <--> IMS+EPC is higher than the SIP protocol timeout.

It takes the packet longer to arrive server <--> ue than the ue and server are set to wait, i guess there is a variable somewhere to increase this? Since the enb is 15km away from the ims epc via 4 Microwave radio links.

herlesupreeth commented 3 years ago

Try increasing the following parameters in kamailio_pcsc.cfg

modparam("tm", "fr_timer", 3000)
# default invite retransmission timeout after 1xx: 120sec
modparam("tm", "fr_inv_timer", 120000)

            # Increase timer for inbound requests, we may have to do failover:
            t_set_fr(120000, 30000);

Its the time for transaction for INVITE and provisional responses in milliseconds. Try experimenting with it

YokeshwaranM2002 commented 2 months ago

FInally!! Succes!! i managed to get a few test calls through . With precondition off and mtu 1300 were key here! they solved the problem!!

Here are some pcaps..

However now the call dialed ends just as the other ue starts to ring and if i manage to pick up fast the call is unstabile, delays in audio, and crashes soon. could it be a ping issue or a timing issue?

how to solve this issue...can you explain...