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 -- Saludos Danny Dias SkypeID: danny.dias1
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
Thanks as always Zeeshan ;) I've changed my configuration, take a look: [8250] type=friend callerid=Extensi?n 8250 <8250> canreinvite=no context=pbx9 dtmfmode=rfc2833 host=dynamic insecure=no language=es nat=yes pickupgroupcallgroupqualify=2000 secret=cyx2mo type=friend username=8250 subscribecontext=pbx9 call-limit=100 disallow=all allow=g729 allow=g723 allow=ulaw allow=alaw allow=ilbc allow=gsm allow=h263 allow=h263p allow=h264 ***sip.conf*** [general] . . . . notifyringing=yes notifyhold=no rtupdate=yes rtcachefriends=yes ***extensions.conf*** [pbx9] exten => 8340,hint,SIP/8340 include => pruebas switch => Realtime/pbx9 at extensions In the Asterisk CLI i could see this message: [Jul 15 18:43:14] WARNING[15867]: chan_sip.c:15766 handle_request_subscribe: SUBSCRIBE failure: unrecognized format: 'multipart/related' pvt: subscribed: 0, stateid: -1, laststate: 0, dialogver: 0, subscribecont: 'pbx9', subscribeuri: '' asterisk -rx 'sip show subscriptions' Peer User Call ID Extension Last state Type Mailbox 0 active SIP subscriptions asterisk -rx 'show hints' -= Registered Asterisk Dial Plan Hints =- 8340 at pbx9 : SIP/8340 State:Idle Watchers 0 ---------------- - 1 hints registered And phone does not show any light with the the extension 8349 in use... Thanks in advance for your help> Message: 4 > Date: Wed, 14 Jul 2010 10:24:39 -0400 > From: Zeeshan Zakaria <zishanov at gmail.com> > Subject: Re: [asterisk-users] BLF with Realtime > To: Asterisk Users Mailing List - Non-Commercial Discussion > ? ? ? ?<asterisk-users at lists.digium.com> > Message-ID: > ? ? ? ?<AANLkTin5FE-Zr-ML8lGzHJWqQR_iLIO3uBzCwWWGaWKD at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > On asterisk 1.4 using real-time, subscribecontext field never worked for me > and I have to add the hints in extensions.conf. But once there, they work > just fine. > > Zeeshan A Zakaria >