[asterisk-users] BLF with Realtime

Ishfaq Malik ish at pack-net.co.uk
Wed Jul 14 08:02:42 CDT 2010


On 14/07/10 12:17, Danny Dias wrote:
> 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
>
>    
Hi

I was working on this myself a few weeks ago so here's a few tips, some 
you may already know.

Changes required to the sip.conf
notifyringing should be set to "yes"
both rtcachefriends and rtupdate set to "yes"
limitonpeers must be set to "yes"

Changes to the sip table
new columns
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)
subscribecontext varchar(80)

the subscribecontext has to have the same context name in it that the 
hint commands are under (the local context for the sip peers...)

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 
=> Realtime/@' line and then get it to write the necessary 'exten => 
<exten>,hint,SIP/<exten>' lines to the extensions.conf, i.e. something 
like this

appenddynamic()
{
   mysql -u dbusername -pdbpassword -h dbhostname dbname -se "select 
distinct(context) from extensions" | grep -v '^context$' | while read 
context; do
     echo "[$context]" >> $ASTCONF
     echo "switch => Realtime/@" >> $ASTCONF
     if [ $context = "target_context" ]
     then
         echo "exten => 100,hint,SIP/100"
         echo "exten => 101,hint,SIP/101"
     fi
     echo "" >> $ASTCONF
   done
}


I really hope that makes some sense!

Ish
-- 
Ishfaq Malik
Software Developer
PackNet Ltd

Office:   0161 660 3062
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100714/ce87f433/attachment-0001.htm 


More information about the asterisk-users mailing list