If you are overseas and cannot get a visa to enter Canada in order to make your refugee claim, you can still be accepted by Canada as a refugee. According to the definitions of a refugee, you will have to be outside your country of origin. Once outside, it is recommended that you register your claim with the UNHCR and begin the process of being recognized as a Convention Refugee. In many cases, this will also be necessary in order to grant you long-term status in your country of asylum. Once recognized by the UNHCR, you can then be sponsored to come to Canada by a Group of Five or a Community Organization.
If you are aware of a religious or community organization that is a Sponsorship Agreement Holder, then you can be sponsored from overseas prior to receiving the UNHCR certificate as it is not a requirement in this case. You will be interviewed at the Canadian Embassy in your country of asylum and if you are determined to be a Convention Refugee, you can be granted a visa to come to Canada as a Permanent Resident. It is important to be aware that this process can take several years before you are granted the visa.