# PJSIP: Check for channel variable?

**URL:** <https://community.asterisk.org/t/pjsip-check-for-channel-variable/48400>\
**Category:** Asterisk Support\
**Created:** [March 13, 2015, 12:37am UTC](https://community.asterisk.org/t/pjsip-check-for-channel-variable/48400 "2015-03-13T00:37:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cwstevens](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@cwstevens](https://community.asterisk.org/u/cwstevens)\
**Post date:** [March 13, 2015, 12:37am UTC](https://community.asterisk.org/t/pjsip-check-for-channel-variable/48400/1 "2015-03-13T00:37:55Z")

</div>

Is there a proper way to test for the existence of a channel variable with pjsip without causing warning spam in the CLI and logs? For example:

WARNING[16283][C-0000000c] func\_pjsip\_endpoint.c: Unknown property ‘chan\_var[my\_channel\_variable]’ for PJSIP endpoint

Using something like ${EXISTS(${PJSIP\_ENDPOINT(${my\_endpoint},chan\_var[my\_channel\_variable])} or ${ISNULL()} isn’t enough to keep the warnings silent.

In chan\_sip I was able to use ${EXISTS(${SIPPEER(${my\_sip\_peer},chanvar[my\_channel\_variable])} to check for a channel variable before trying to read it.

Thank you for your help.
