Despite casting the discovered route to a `pjsip_sip_uri` you don't ever use the fact that you've done this (and subsequently have to cast back to a `pjsip_uri` to add it to the targets).  `PJSIP_URI_SCHEME_IS_SIP` is designed to work on `pjsip_uri`s too so you can go without casts.