Hello list,

I'm using Kamailio 3.1.5 in front of asterisk servers. Kamailio handles all the SIP registrations. Calls from SIP phones are forwarded to asterisks and then dialled out to Kamailio.

root@SBCserver:~# kamailio -V
version: kamailio 3.1.5 (x86_64/linux) 76fff5
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC, 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, PKG_SIZE 4MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 76fff5
compiled on 08:21:33 Oct 27 2011 with gcc 4.6.1
root@SBCserver:~#


Problem: 
When call is initiated from a softphone and is in ringing phase, CANCEL just don't work. I've done some initial debugging and the following piece of code in main route is failing.

# CANCEL processing
if (is_method("CANCEL"))
{
     xlog("L_NOTICE","$rm from $fu (IP:$si:$sp) ---CAPTURED IN MAIN---\n");
     if (t_check_trans()){
        t_relay();
        xlog("L_NOTICE","$rm from $fu (IP:$si:$sp) ---CHECK TRANS TRUE---\n");
     }
     xlog("L_NOTICE","$rm from $fu (IP:$si:$sp) ---CHECK TRANS FALSE---\n");
     exit;
}

Also the CANCEL fails the has_totag() condition !

The same Call CANCEL scenario works fine for any client on Public IP !

Hope to get some pointers for the solution.

Regards,
Sammy.