diff --git a/res/res_pjsip_exten_state.c b/res/res_pjsip_exten_state.c
index 5e8a0175e3320669b4965d3e6835c32365647da3..a8a11bc7fb2cafbe370474307cfb80a28977e7f0 100644
--- a/res/res_pjsip_exten_state.c
+++ b/res/res_pjsip_exten_state.c
@@ -354,7 +354,7 @@ static int new_subscribe(struct ast_sip_endpoint *endpoint,
 {
 	if (!ast_exists_extension(NULL, endpoint->context, resource, PRIORITY_HINT, NULL)) {
 		ast_log(LOG_NOTICE, "Extension state subscription failed: Extension %s does not exist in context '%s' or has no associated hint\n",
-			endpoint->context, resource);
+			resource, endpoint->context);
 		return 404;
 	}