Yes i'l be happy to see some working examples :)

I can't fully understand how freeswitch conceptually manage presence events.
And i not found any information about it in wiki.
With default configuration fs sends some notifications to subscribed phones 
without use any external scripts, but this works very unpredictable. (in most 
situations BLF change state only once and only for dialing side. after reboot 
phone  BLF state may be change again on some events or may not change any 
more)

if i use the following script blf state changed but only once after reboot the 
phone


#!/usr/bin/php
<?php
require_once('ESL.php');

function SendEvent($Username,$Domain,$State)
{
$esl_host = '127.0.0.1';
$esl_port = '8021';
$esl_password = 'ClueCon';
    print "Send -$State- event to -$Username-\n";

    $esl1 = new eslConnection($esl_host, $esl_port, $esl_password);

    $e1 = new ESLevent("PRESENCE_IN");
    $e1->addHeader("proto", "sip");
    $e1->addHeader("from", "$usern...@$domain");
    $e1->addHeader("login", "$usern...@$domain");
    $e1->addHeader("event_type", "presence");
    $e1->addHeader("alt_event_type", "dialog");
    $e1->addHeader("Presence-Call-Direction", "outbound");
    $e1->addHeader("answer-state", $State);

    $res = $esl1->sendEvent($e1);
}

SendEvent('220',"mydomain.net","confirmed");
sleep(4);
SendEvent('220',"mydomain.net","terminated");

?>



On Tuesday 22 December 2009 21:51:25 mm_202 wrote:
> Yuriy,
>
> The FS wiki has examples of how to control the BLF/MWI using events.
> I had no problem getting to work with my GXP2020.
>
> Let me know if you want some direct code examples.
>
> -- MM.
>
> On Thu, Dec 17, 2009 at 6:05 AM, Yuriy Ivzhenko <yivzhe...@mksat.net> wrote:
> > Hallo All!
> > I need information about setup BLF on GXP2010/2020 phones with
> > Freeswitch. I search in Freeswitch Wiki and maillist archives but find no
> > usable information.
> >
> > _______________________________________________
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users@lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users@lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org


_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Reply via email to