There was mistake in Json syntax but it does not work with kamcmd as well : 
[root@SBC-4-2 kamailio]# kamcmd ul.rm_contact location 30001@jeff.sip.teledge.com "sip:30001@43.228.229.106:38048;x-nat=yes;pv-ip=10.212.134.171;pb-ip=43.228.229.106;pb-pt=38048;transport=tcp"
error: 404 - Contact not found

ul.dump : 

Info: {
                                       AoR: 30001@jeff.sip.teledge.com
                                       HashID: 286668796
                                       Contacts: {
                                               Contact: {
                                                       Address: sip:30001@43.228.229.106:38048;x-nat=yes;pv-ip=10.212.134.171;pb-ip=43.228.229.106;pb
-pt=38048;transport=tcp
                                                       Expires: 445
                                                       Q: -1.000000
                                                       Call-ID: Yzk0NWUzOWIzMWI2MzQzM2JhMzE2NzAyOWQyNDM1ODI.
                                                       CSeq: 5
                                                       User-Agent: FreeSWITCH-mod_sofia/1.10.3-release~64bit
                                                       Received: [not set]
                                                       Path: [not set]
                                                       State: CS_SYNC
                                                       Flags: 0
                                                       CFlags: 0
                                                       Socket: udp:10.50.8.11:5060
                                                       Methods: 15359
                                                       Ruid: uloc-5f5c7a22-afe4-2
                                                       Instance: [not set]
                                                       Reg-Id: 0
                                                       Server-Id: 0
                                                       Tcpconn-Id: -1
                                                       Keepalive: 0
                                                       Last-Keepalive: 1599896245
                                                       KA-Roundtrip: 0
                                                       Last-Modified: 1599896245
                                               }
                                               Contact: {
                                                       Address: sip:30001@43.228.229.106:38048;x-nat=yes;pv-ip=10.212.134.171;pb-ip=43.228.229.106;pb
-pt=38048;transport=tcp
                                                       Expires: 716
                                                       Q: -1.000000
                                                       Call-ID: MzAwN2Y0NTc1YmVkY2RlYWRmMTI2Zjg1MDk5YzRlODE.
                                                       CSeq: 5
                                                       User-Agent: FreeSWITCH-mod_sofia/1.10.3-release~64bit
                                                       Received: [not set]
                                                       Path: [not set]
                                                       State: CS_SYNC
                                                       Flags: 0
                                                       CFlags: 0
                                                       Socket: udp:10.50.8.11:5060
                                                       Methods: 15359
                                                       Ruid: uloc-5f5c7a22-afdf-8
                                                       Instance: [not set]
                                                       Reg-Id: 0
                                                       Server-Id: 0
                                                       Tcpconn-Id: -1
                                                       Keepalive: 0
                                                       Last-Keepalive: 1599896384
                                                       KA-Roundtrip: 0
                                                       Last-Modified: 1599896384
                                               }

I found ka_timeout parameter which is exactly what i was looking for but it is not yet available in stable version : 
https://www.kamailio.org/docs/modules/devel/modules/usrloc.html#usrloc.p.ka_timeout



On Sat, Sep 12, 2020 at 12:06 AM Juha Heinanen <jh@tutpro.com> wrote:
sagar malam writes:

> I have tried ul_rm_contact but it is not working :
> curl POST --data
> '{"jsonrpc":"2.0","method":"ul.rm_contact","params":{"0":"location","1":"
> 30001@XXXXX.com
> <30001@jeff.sip.teledge.com>","2":"sip:30001@X.X.X.X:43108;x-nat=yes;pv-ip=10.212.134.167;pb-ip=X.X.X.X;pb-pt=43108;transport=tcp"}}'
> -H "Content-Type: application/json" -X POST 10.50.7.14:5060/RPC2

Second param is AOR (username@domain).  Yours does not look like it.
Use ul.dump to check.

-- Juha

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
Thanks,

Sagar