<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 14/07/10 12:17, Danny Dias wrote:
<blockquote
 cite="mid:AANLkTimyYrLvRR2S1q8oXOGH_6qc98pJLRjhBr8SlYAk@mail.gmail.com"
 type="cite">
  <pre wrap="">Hello Asterisk community,

I'm trying to use BLF with Asterisk Realtime, i've been searching for
some info but nothing seems to be clear, can anyone help me eith some
ideas to make this work ok?

I'va my dialplan with Realtime

Thanks in advance

  </pre>
</blockquote>
Hi<br>
<br>
I was working on this myself a few weeks ago so here's a few tips, some
you may already know.<br>
<br>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<span class="Apple-style-span"
 style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">Changes
required to the sip.conf<br>
notifyringing should be set to "yes"<br>
both rtcachefriends and rtupdate set to "yes"<br>
limitonpeers must be set to "yes"<br>
<br>
Changes to the sip table<br>
new columns<br>
call-limit int (I think this can be call_limit as well which means you
would not always have to put the col name in`` quotes) <br>
subscribecontext varchar(80)<br>
<br>
the </span><span class="Apple-style-span"
 style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">subscribecontext
has to have the same context name in it that the hint commands are
under (the local context for the sip peers...)</span><br>
<br>
I could see no way of putting the hint commands into the extensions
table and BLF working, so they need to go into the extensions.conf but
if your realtime setup is similar to ours this is written by a shell
script that is running on a cron. You can change the shell script to
recognise when the required context is matched, let it write the
'switch =&gt; Realtime/@' line and then get it to write the necessary
'exten =&gt; &lt;exten&gt;,hint,SIP/&lt;exten&gt;' lines to the
extensions.conf, i.e. something like this<br>
<br>
<tt>appenddynamic()<br>
{<br>
&nbsp; mysql -u dbusername -pdbpassword -h dbhostname dbname -se "select
distinct(context) from extensions" | grep -v '^context$' | while read
context; do<br>
&nbsp;&nbsp;&nbsp; echo "[$context]" &gt;&gt; $ASTCONF<br>
&nbsp;&nbsp;&nbsp; echo "switch =&gt; Realtime/@" &gt;&gt; $ASTCONF<br>
&nbsp;&nbsp;&nbsp; if [ $context = "target_context" ]<br>
&nbsp;&nbsp;&nbsp; then<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo "exten =&gt; 100,hint,SIP/100"<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo "exten =&gt; 101,hint,SIP/101"<br>
&nbsp;&nbsp;&nbsp; fi<br>
&nbsp;&nbsp;&nbsp; echo "" &gt;&gt; $ASTCONF<br>
&nbsp; done<br>
}</tt><br>
<br>
<br>
I really hope that makes some sense!<span class="Apple-style-span"
 style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><br>
<br>
Ish<br>
</span>
<div class="moz-signature">-- <br>
<title></title>
<span
 style="font-family: Arial,Helvetica,sans-serif; color: rgb(0, 0, 0);">Ishfaq
Malik<br>
Software Developer<br>
PackNet Ltd<br>
<br>
Office:&nbsp;&nbsp;&nbsp;0161 660 3062<br>
</span>
</div>
</body>
</html>