icorrect some bug instruduced during porting to sip api 2.0