Getting current sip username in extensions.conf?

Hi, is there a variable that contains the current sip user name in the dialplan?
I would like to call a custom function that requires the sip username, ie in this odbc call, i would like ARG1 to be the current user’s sip username.

[testfunctions]
exten => setmf,1,GotoIf($[${ODBC_TEST(${ARG1})}]?2:5)

Thanks!

Never mind, i found a function that returns what i was looking for :smile:

SIPCHANINFO(peername)

Will return only the username part of the sip uri.