<div dir="ltr"><div>Hi All,</div><div> </div><div> </div><div>I want to test dnd sevice using openims and asterisk. I have registered my sip client with openims server. I have configured asterisk as an application server on openims server. When I register my client with openims server it sends subscription for reg event and ua-profile event for registration and dnd respectively. scscf sends 200 ok fir reg eevet subscribe and sends notification but for for ua-profile event scscf forwords the subscribe to asterisk. Asterisk sends 401 and my client sends resubscribe for the ssame with auth data. to which asterisk responds 403 forbidden.</div>
<div> </div><div>below is the sip.conf entry.</div><div>-------------------------------------------------------------------------------</div><div>[general]<br>port=5060<br>bindport=5060<br>bindaddr=0.0.0.0<br>realm=open-ims.test<br>
disallow=all<br>allowsubscribe=yes<br>subscribecontext=default<br>subscribewmi=yes<br>notifyringing=yes<br>notifyhold=yes<br>allow=ulaw<br>context=users<br>svrlookup=yes<br>canreinvite=no<br>dynamic_exclude_static=yes<br>
</div><div>[7200000001]<br>username=7200000001<br>type=peer<br>host=dynamic<br>secret=7200000001<br>context=users<br><a href="mailto:mailbox=7200000001@default">mailbox=7200000001@default</a><br>callerid=7200000001<br>-------------------------------------------------------------------------------</div>
<div>extension.conf</div><div>=============================================</div><div>exten => 7200000001,1,Macro(stdexten)</div><div> </div><div> </div><div>[app-dnd-activate]<br>; create list<br>exten => s,1,Set(i=1)<br>
exten => s,n,while($[${i}<10])<br>exten => s,n,Set(DB(DND_LIST${i}/${CALLERID(NUM)})=999)<br>exten => s,n,Set(i=$[${i}+1])<br>exten => s,n,EndWhile()<br>exten => s,n,Set(DB(DND/${CALLERID(NUM)})=1)<br>exten => s,n,Playback(do-not-disturb&activated)<br>
exten => s,n,Hangup<br></div><div>[app-dnd-deactivate]<br>exten => s,1,dbDel(DND/${CALLERID(NUM)})<br>exten => s,n,Playback(do-not-disturb&de-activated)<br>exten => s,n,Hangup</div><div><br>[app-dnd-list-add]<br>
exten => s,1,Playback(extension-toadd)<br>exten => s,n,Set(TIMEOUT(digit)=5)<br>exten => s,n,Set(TIMEOUT(response)=60)<br>exten => s,n,Read(blacknr,then-press-pound,,,,)<br>exten => s,n,SayDigits(${blacknr})<br>
exten => s,n,Playback(if-correct-press&digits/1)<br>exten => s,n,Noop(Waiting for input)<br>exten => s,n(end),WaitExten(60,)<br>exten => s,n,Playback(sorry-youre-having-problems&goodbye)</div><div>;addlist<br>
exten => 1,1,Set(i=1)<br>exten => 1,n,while($[${i}<10])<br>exten => 1,n,Set(extn=${DB(DND_LIST${i}/${CALLERID(NUM)})})<br>exten => 1,n,GotoIf($["${extn}"="999"]?add:next)<br>exten => 1,n(add),Set(DB(DND_LIST${i}/${CALLERID(NUM)})=${blacknr})<br>
exten => 1,n,Playback(num-was-successfully&added)<br>exten => 1,n,Wait(1)<br>exten => 1,n,Return()<br>exten => 1,n(next),Set(i=$[${i}+1])<br>exten => 1,n,EndWhile()<br>exten => 1,n,Return()</div><div>
[app-dnd-list-remove]<br>exten => s,1,Playback(extension-toremove)<br>exten => s,n,Set(TIMEOUT(digit)=5)<br>exten => s,n,Set(TIMEOUT(response)=60)<br>exten => s,n,Read(blacknr,then-press-pound,,,,)<br>exten => s,n,SayDigits(${blacknr})<br>
exten => s,n,Playback(if-correct-press&digits/1)<br>exten => s,n,Noop(Waiting for input)<br>exten => s,n(end),WaitExten(60,)<br>exten => s,n,Playback(sorry-youre-having-problems&goodbye)<br></div><div>
;removelist<br>exten => 1,1,Set(i=1)<br>exten => 1,n,while($[${i}<10])<br>exten => 1,n,Set(extn=${DB(DND_LIST${i}/${CALLERID(NUM)})})<br>exten => 1,n,GotoIf($["${extn}"="${blacknr}"]?remove:next)<br>
exten => 1,n(remove),Set(DB(DND_LIST${i}/${CALLERID(NUM)})=999)<br>exten => 1,n,Playback(num-was-successfully&removed)<br>exten => 1,n,Wait(1)<br>exten => 1,n,Return()<br>exten => 1,n(next),Set(i=$[${i}+1])<br>
exten => 1,n,EndWhile()<br>exten => 1,n,Return()</div><div> </div><div>[app-dnd-list-review]<br>;exten => s,1,Playback(entries-present-in-list)<br>exten => s,1,Set(i=1)<br>exten => s,n,while($[${i}<10])<br>
exten => s,n,Set(extn=${DB(DND_LIST${i}/${CALLERID(NUM)})})<br>exten => s,n,GotoIf($["${extn}"="999"]?next:process)<br>exten => s,n(process),Playback(extension)<br>exten => s,n,SayNumber(${extn})<br>
exten => s,n(next),Set(i=$[${i}+1])<br>exten => s,n,EndWhile()<br><br><br>[app-dnd-total-list-entries]<br>;total-list-member<br>exten => s,1,Set(i=1)<br>exten => s,n,Set(count=0)<br>exten => s,n,while($[${i}<10])<br>
exten => s,n,Set(extn=${DB(DND_LIST${i}/${CALLERID(NUM))})<br>exten => s,n,GotoIf($["${extn}"="999"]?next:count)<br>exten => s,n(count),Set(count=$[${count}+1])<br>exten => s,n(next),Set(i=$[${i}+1])<br>
exten => s,n,EndWhile()<br>exten => s,n,SayNumber(${count})<br>exten => s,n,Return()<br></div><div>=============================================</div><div>could anyone please help me to subscribe the dnd with asterisk.</div>
<div> </div><div>Thanks in advance!!</div><div> </div><div>tTanks.</div><div>Isshed</div></div>