diff --git a/res/res_pjsip_outbound_publish.c b/res/res_pjsip_outbound_publish.c
index 18525bf6cd4d023c432fccd296899a7ef3aa3e37..0fac8adf6b924acc89a0b1248fe42bc42eb6a0ab 100644
--- a/res/res_pjsip_outbound_publish.c
+++ b/res/res_pjsip_outbound_publish.c
@@ -986,7 +986,7 @@ static int sip_outbound_publisher_init(void *data)
 
 	pj_cstr(&event, publish->event);
 	if (pjsip_publishc_init(publisher->client, &event, &server_uri, &from_uri, &to_uri,
-				publish->expiration != PJ_SUCCESS)) {
+			publish->expiration) != PJ_SUCCESS) {
 		ast_log(LOG_ERROR, "Failed to initialize publishing client on outbound publish '%s'\n",
 			ast_sorcery_object_get_id(publish));
 		pjsip_endpt_release_pool(ast_sip_get_pjsip_endpoint(), pool);