DNID not available with PJSIP

I am trying to migrate from chan_sip to pjsip and the biggest problem I’m running into is that the channel variable ${CALLERID(dnid)} is not available, is it blank. I need to be able to get the number dialed is there any way to make that work?

use the ${EXTEN} variable

1 Like

I did:

same => n,Set(CALLERID(dnid)=${EXTEN})

that fixed the issue.

Many Thanks!

1 Like

I suspect he want the To URI, but ${EXTEN} gives the request one.