Russell Brown
2007-Sep-03 18:03 UTC
[asterisk-users] Manager Originate without phone off hook?
I'm trying to keep the DND status of my Snom phones and the astdb in line but I'm stuck on integrating my gui DND button which talks to * using the manager interface (actually it uses Astmanproxy as the gui host is on a different network to asterisk and can't see the Snom's across the network). All's working fine in my Dialplan; when someone dials the code for DND-on or DND-off I can do: .... exten => *08,n,System(wget -qb -O /dev/null -o /dev/null "http://admin:secret@${MYSNOM}/dummy.htm?settings=save&dnd_mode=off") exten => *08,n,Set(DB(DND/SIP/${MYSNOM})=0) .... which turns the DND indicator on the phone off or on in line with the database record. That's Great. However, I'm completely flummoxed on getting a GUI DND button to work sensibly via the Manager interface. I could use 'Originate' to make the phone dial '*08' but that forces the user to pickup the phone when they click the GUI DND button. Not Good :-( So... can anyone suggest how I can use the Manager interface to set an astdb record and send a request to the Snom to turn its DND indicator on or off at the same time? Thanks in advance. -- Regards, Russell -------------------------------------------------------------------- | Russell Brown | MAIL: russell at lls.com PHONE: 01780 471800 | | Lady Lodge Systems | WWW Work: http://www.lls.com | | Peterborough, England | WWW Play: http://www.ruffle.me.uk | --------------------------------------------------------------------
Moises Silva
2007-Sep-03 19:21 UTC
[asterisk-users] Manager Originate without phone off hook?
May be I am missing something, but, manager command DBPut should do the trick of putting the DB value. And, since you are already using the manager interface, you are using PHP or PERL to connect to the Database, why not wait for the DBPut command response and from the script execute wget?? Regards On 9/3/07, Russell Brown <russell at lls.lls.com> wrote:> > I'm trying to keep the DND status of my Snom phones and the astdb in > line but I'm stuck on integrating my gui DND button which talks to * > using the manager interface (actually it uses Astmanproxy as the gui > host is on a different network to asterisk and can't see the Snom's > across the network). > > All's working fine in my Dialplan; when someone dials the code for > DND-on or DND-off I can do: > > .... > exten => *08,n,System(wget -qb -O /dev/null -o /dev/null > "http://admin:secret@${MYSNOM}/dummy.htm?settings=save&dnd_mode=off") > exten => *08,n,Set(DB(DND/SIP/${MYSNOM})=0) > .... > > which turns the DND indicator on the phone off or on in line with the > database record. That's Great. > > However, I'm completely flummoxed on getting a GUI DND button to work > sensibly via the Manager interface. > > I could use 'Originate' to make the phone dial '*08' but that forces the > user to pickup the phone when they click the GUI DND button. Not Good :-( > > So... can anyone suggest how I can use the Manager interface to set an > astdb record and send a request to the Snom to turn its DND indicator on > or off at the same time? > > Thanks in advance. > -- > Regards, > Russell > -------------------------------------------------------------------- > | Russell Brown | MAIL: russell at lls.com PHONE: 01780 471800 | > | Lady Lodge Systems | WWW Work: http://www.lls.com | > | Peterborough, England | WWW Play: http://www.ruffle.me.uk | > -------------------------------------------------------------------- > > _______________________________________________ > --Bandwidth and Colocation Provided by http://www.api-digital.com-- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-- "Within C++, there is a much smaller and cleaner language struggling to get out."
Russell Brown
2007-Sep-04 07:24 UTC
[asterisk-users] Manager Originate without phone off hook?
Quoth "Moises Silva"...> >May be I am missing something, but, manager command DBPut should do >the trick of putting the DB value. And, since you are already using >the manager interface, you are using PHP or PERL to connect to the >Database, why not wait for the DBPut command response and from the >script execute wget??Yes I'm using DBPut but the GUI (in tcl/tk FWIW) is running on a different network to the phones so the http request has to come from the Asterisk box and not the one running the GUI. I guess I'm going to have to write an API and call that with Originate but I just wondered if anyone had a better (read easier!) suggestion. -- Regards, Russell -------------------------------------------------------------------- | Russell Brown | MAIL: russell at lls.com PHONE: 01780 471800 | | Lady Lodge Systems | WWW Work: http://www.lls.com | | Peterborough, England | WWW Play: http://www.ruffle.me.uk | --------------------------------------------------------------------
Russell Brown
2007-Sep-04 16:23 UTC
[asterisk-users] Manager Originate without phone off hook?
To answer my own question I found a way to acheive what I wanted so here's my solution for the record (might help someone else if they search the archives). In the Dialplan setup the following entries: [snom_setdndon] exten => _.,1,NoOp(Dummy Routine Called for ${EXTEN}) exten => _.,n,TrySystem(wget -qb -O /dev/null -o /dev/null "http://admin:${SNOM_PASSWD}@${EXTEN}/dummy.htm?settings=save&dnd_mode=on") exten => _.,n,Hangup [snom_setdndoff] exten => _.,1,NoOp(Dummy Routine Called for ${EXTEN}) exten => _.,n,TrySystem(wget -qb -O /dev/null -o /dev/null "http://admin:${SNOM_PASSWD}@${EXTEN}/dummy.htm?settings=save&dnd_mode=off") exten => _.,n,Hangup and then from the manager interface one can do: Action: Originate Channel: Local/192.168.1.21 at snom_setdndon Application: NoOp Data: Setting DND A bit convoluted but it works for me. -- Regards, Russell -------------------------------------------------------------------- | Russell Brown | MAIL: russell at lls.com PHONE: 01780 471800 | | Lady Lodge Systems | WWW Work: http://www.lls.com | | Peterborough, England | WWW Play: http://www.ruffle.me.uk | --------------------------------------------------------------------