Hello. My greetings to all.
.When I create a new extension in the database, webrct records, makes and receives calls, but DEVICE_STATE does not reflect the status of the device unless I do module reload res_pjsip.so. After that, DEVICE_STATE works for the extension normally.
exten => _3700,1,NoCDR
same => n,Set(STATUSWEBRTC=${DEVICE_STATE(PJSIP/${EXTEN})})
same => n,NoOp(TEANS extension status is ${STATUSWEBRTC})
same => n,GotoIf($[“${STATUSWEBRTC}” = “UNAVAILABLE”]?unavailable)
same => n,Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})},120,rTt)
same => n,Hangup()
if I remove the device state check the extension works perfectly.