[asterisk-users] Presence-awareness in Asterisk

Ondrej Valousek webserv at s3group.cz
Fri Nov 10 08:33:12 MST 2006


Hi Anselm,

Yes it looks promising.
> somehow update the status in the Asterisk DB
and that's the problem - how can I access Asterisk DB remotely (in some
nice and elegant way)?
That's why I was more thinking about mysql - it is already running on my
* box and remote access is no problem.

Question is, if I could do the same trick you did with Asterisk DB with
Mysql.
Thanks!

Ondrej

P.S.
Apache cgi is a possibility, indeed.

Anselm Martin Hoffmeister wrote:
> Am Freitag, den 10.11.2006, 14:35 +0100 schrieb Ondrej Valousek:
>   
>> Hello all,
>>
>> I am just wondering - how can I implement presence awareness in Asterisk?
>> I know there is the hint feature that might be useful (for someone) but
>> it is not exactly what I am looking for.
>>
>> My idea is some fairly simple application running on user desktop and
>> having just 3-4 buttons like
>> - online
>> - do not disturb
>> - forward to my mobile
>> and possibly also monitoring xscreensaver activity. This application
>> could then communicate with the * server (via AGI or SQL database or
>> something) and amend the dialplan accordingly.
>>
>> Does anyone implemented it somewhere? How can I achieve this?
>> I am happy with just any hint pointing me to the right direction.
>>     
>
> The implementation on the Asterisk side is quite easy.
> Consider the case where you have
>
> exten => 234,1,Dial(SIP/sip234)
>
> Now you want to replace that with some kind of *-magic such that either
> of the three options you mentioned can be selected.
>
> exten => 234,1,GotoIf($["${DB(Status/${EXTEN})}" = "dnd"]?10)
> exten => 234,2,GotoIf($["${DB(Status/${EXTEN})}" = "away"]?20)
> exten => 234,3,Dial(SIP/sip234)
> exten => 234,10,VoiceMail(b${EXTEN})
> exten => 234,20,Dial(.... your mobile number)
>
> (this is not beautiful, but you get the idea)
>
> This way, any time someone calls the Asterisk database will be queried
> for status information. You can put that information by hand from the
> CLI ( database put Status 234 dnd ) or use some other means to set it. I
> could imagine an Apache CGI script to do that, or you write a
> proprietary (Windows,KDE,...) APP that runs in the user taskbar and is
> able to somehow update the status in the Asterisk DB.
>
> BTW you can set something in the asterisk DB from the shell with the
> asterisk -rx "database set....." command.
>
> HTH
> Anselm
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>   



More information about the asterisk-users mailing list