I'll answer my own question for the archives... although my question 
maybe was just too obvious ;-)<span class="moz-smiley-s3" title=";-)"></span><br>
<br>The problem was, that I had put this piece of Dialplan in my 
extensions.conf like this:
<br>
<br>[StumpelLocal]
<br>exten =&gt; _ZXX!,hint,${SIP_BYEXT(${EXTEN},${CONTEXT})}
<br>exten =&gt; _ZXX!,1,Verbose(3, Search extension ${EXTEN} in context ${CONTEXT})
<br>  same =&gt; n,Set(SIP=${SIP_BYEXT(${EXTEN},${CONTEXT})})
<br>  same =&gt; n,GotoIf(${SIP}?:notFound)
<br>  same =&gt; n,SIPAddHeader(Alert-Info: internal)
<br>  same =&gt; n,Dial(${SIP})
<br>  same =&gt; n(notFound),Playback(you-dialed-wrong-number)
<br>  same =&gt; n,Hangup
<br>
<br>
<br>[StumpelZwaag]
<br>include =&gt; StumpelLocal
<br>
<br>I registered my SIP accounts in the database with context StumpelZwaag. 
But of course the hints aren&#39;t being executed from StumpelZwaag, but 
probably from StumpelLocal (if they have a contect at all??), the lookup 
failed. So I changed the dynamic hint to:
<br>
<br>exten =&gt; _ZXX!,hint,${SIP_BYEXT(${EXTEN},StumpelZwaag)}
<br>exten =&gt; _ZXX!,1,Verbose(3, Search extension ${EXTEN} in context ${CONTEXT})
<br>  same =&gt; n,Set(SIP=${SIP_BYEXT(${EXTEN},${CONTEXT})})
<br>  same =&gt; n,GotoIf(${SIP}?:notFound)
<br>  same =&gt; n,SIPAddHeader(Alert-Info: internal)
<br>  same =&gt; n,Dial(${SIP})
<br>  same =&gt; n(notFound),Playback(you-dialed-wrong-number)
<br>  same =&gt; n,Hangup
<br>
<br>I hardcoded the context, so now it works.
<br>
<br>Also I found that &quot;core show hints&quot; on the CLI, also show the hints that 
were creating through this dynamic hint. So you will see the actual list 
of hints. At first I thought the dynamic hint would only be shown as
<br>                  _ZXX!@StumpelLocal        : ${SIP_BYEXT(${EXTEN}  
State:Unavailable     Watchers  0
<br>
<br>This is not the case, so you can test if your dynamic hint is working 
correctly by checking this table.
<br>
<br>Also my phone seems to be rather slow in processing the hint changes... 
so it may take a few minutes before the changes take effect. <div><br></div><div><br></div><div><br><br><div class="gmail_quote">On Tue, Mar 27, 2012 at 1:25 PM, Roland <span dir="ltr">&lt;<a href="mailto:asterisk@rolandow.com">asterisk@rolandow.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I would like to fetch my extensions from the database. I created a dynamic hint, but doesn&#39;t seem to work. The BLF on my phone doesn&#39;t change when the state of the extension changed.<div>
<br></div><div>This is in my dialplan:</div>
<div><br></div><div><div>exten =&gt; _ZXX!,hint,${SIP_BYEXT(${EXTEN},${CONTEXT})}</div><div>exten =&gt; _ZXX!,1,Verbose(3, Search extension ${EXTEN} in context ${CONTEXT})</div><div>  same =&gt; n,Set(SIP=${SIP_BYEXT(${EXTEN},${CONTEXT})})</div>

<div>  same =&gt; n,GotoIf(${SIP}?:notFound)</div><div>  same =&gt; n,SIPAddHeader(Alert-Info: internal)</div><div>  same =&gt; n,Dial(${SIP})</div><div>  same =&gt; n(notFound),Playback(you-dialed-wrong-number)</div><div>

  same =&gt; n,Hangup</div></div><div><br></div><div>Is something like this possible?</div>
</blockquote></div><br></div>