Daniel Johnson
2009-Jan-29 01:15 UTC
[asterisk-users] Callback / Camp / Extention Free notify?
Hi, I am trying to implement the callback feature of our old phone system. This feature may go by a different name in asterisk? It worked as follows. If phone A called phone B and it was BUSY, you press a button to enable a callback. User A is free to continue work or make other calls. What this meant is that when both phones became free, phone A would ring, on answer it would call phone B automatically. Here is how I have tried to achieve this with asterisk. When A calls B and B is busy you get a menu, 1 to set callback and 2 to leave voicemail. The set of the callback is done via AGI call to PHP script to set the details in MySQL DB. On all call hangups I check to see if there is a pending Callback via another AGI script. The script sets a couple of variables which I check in my Dialplan. If there is a callback pending for the phone that just hung up, I need to check that the other phone involved is FREE. This is what I can not get to work. I have tried ChanIsAvail which does not appear to work. I have hints setup for each SIP phone. Which would be perfect, however it does not appear that you can check the HINT STATE in the dialplan. I have done plenty of googling and have found this http://bugs.digium.com/view.php?id=10635 which appears that this kind of functionality was placed in 1.4.11. (DEVICE_STATE(), EXTENSION_STATE()) I have 1.4.21.2 and do not have these features. To continue with the rest of the feature. If the ChanIsAvail says all is good. I then launch another AGI to write a CALLFILE and remove the pending callback request from the DB. This all works if A is not busy when B finishes their call etc. I am sure that others have implemented this kind of feature. If you could share your implementation or give me some pointers or even the correct asterisk name so I can google and get the help I need, that would be great. I am considering trying out 1.6 which should have these features, however not sure if stability is going to be a problem. I have based my implantation based of a previous message to the list: On Tue, Jun 10, 2008 at 5:34 PM, Phil Knighton <phil.knighton at mjog.com> wrote:> > Hello > > > > I'm looking for a way to do the following using my Asterisk system and Snom > > SIP phones... > > > > Scenario: > > > > Caller on Internal Phone 1 calls internal phone2. Phone 2 is busy (or more > > accurately goes straight to voicemail). > > Caller on internal phone 1 can press a button / dial a code (explained in > > next step) and hangup > > When phone 2 is free, phone 1 rings and on answer dials phone 2 > > > > I was sure this was called "camping" - but all the camping stuff I can find, > > refers to the caller having to hang on the phone and wait. Am I missing > > something? > > > > Anyone have a solution? > > >Quick solution that comes into mind: Set(exten_copy = ${EXTEN}); Dial(SIP/${EXTEN}) if ("${DIALSTATUS}"="BUSY") { // prompt for camp Set(DB(camp/${EXTEN}/call_to)=${CALLERID(num)); } h => { Set(call_to=${DB(camp/${exten_copy}/call_to)}); if ("${call_to}"!="") { Set(DB(camp/${exten_copy}/call_to)=); System(call_to ${exten_copy} ${call_to}); } } So, in case if phone2 is busy, store callerid of phone1 in database, so when phone2 will hangup it will triger a script "call_to" which however can originate call trough manager or call-file. Of course you will need some additional handling in case if multiple callers decide to camp, or diferent protocols are used, etc. Regards, Atis Thanks in Advance for any help. Regards *Daniel Johnson* Systems Administrator / Systems Development Scanning Systems Australia Scanning Systems Australia *Office:* +61 7 3387 5555 *Facsimile:* +61 7 3387 5588 *E-mail:* dan.j at scanningsystems.com.au <mailto:dan.j at scanningsystems.com.au> *Website:* http://www.scanningsystems.com.au -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090129/ffc56d88/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: ssa-logo.jpg Type: image/jpeg Size: 5930 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20090129/ffc56d88/attachment.jpg
pdhales at optusnet.com.au
2009-Jan-29 01:33 UTC
[asterisk-users] Callback / Camp / Extention Free notify?
Funnily enough, most people install phones with BLF lamps, on install something like hudlite/FOP/etc so you know if the person is on the phone before you call them.. PaulH> Daniel Johnson <dan.j@scanningsystems.com.au> wrote: > > Hi, > > I am trying to implement the callback feature of our old phone system. > This feature may go by a different name in asterisk? > > It worked as follows. If phone A called phone B and it was BUSY, you > press a button to enable a callback. > User A is free to continue work or make other calls. > What this meant is that when both phones became free, phone A would > ring, on answer it would call phone B automatically. > > Here is how I have tried to achieve this with asterisk. > > When A calls B and B is busy you get a menu, 1 to set callback and 2 to > leave voicemail. > The set of the callback is done via AGI call to PHP script to set the > details in MySQL DB. > > On all call hangups I check to see if there is a pending Callback via > another AGI script. > The script sets a couple of variables which I check in my Dialplan. If > there is a callback pending for the > phone that just hung up, I need to check that the other phone involved > is FREE. This is what I can not get to work. > > I have tried ChanIsAvail which does not appear to work. > I have hints setup for each SIP phone. Which would be perfect, however > it does not appear that you can check the HINT STATE in the dialplan. > I have done plenty of googling and have found this > http://bugs.digium.com/view.php?id=10635 which appears that this kind of > > functionality was placed in 1.4.11. (DEVICE_STATE(), EXTENSION_STATE()) > I have 1.4.21.2 and do not have these features. > > To continue with the rest of the feature. If the ChanIsAvail says all is > > good. I then launch another AGI to write a CALLFILE and remove the > pending callback request from the DB. > This all works if A is not busy when B finishes their call etc. > > I am sure that others have implemented this kind of feature. If you > could share your implementation or give me some pointers or even the > correct asterisk name so I can google and get the help I need, that > would be great. > I am considering trying out 1.6 which should have these features, > however not sure if stability is going to be a problem. > > I have based my implantation based of a previous message to the list: > > On Tue, Jun 10, 2008 at 5:34 PM, Phil Knighton <phil.knighton@mjog.com> > wrote: > > > > Hello > > > > > > I'm looking for a way to do the following using my Asterisk system > and Snom > > > SIP phones... > > > > > > Scenario: > > > > > > Caller on Internal Phone 1 calls internal phone2. Phone 2 is busy > (or more > > > accurately goes straight to voicemail). > > > Caller on internal phone 1 can press a button / dial a code > (explained in > > > next step) and hangup > > > When phone 2 is free, phone 1 rings and on answer dials phone 2 > > > > > > I was sure this was called "camping" - but all the camping stuff I > can find, > > > refers to the caller having to hang on the phone and wait. Am I > missing > > > something? > > > > > > Anyone have a solution? > > > > > > > Quick solution that comes into mind: > > Set(exten_copy = ${EXTEN}); > Dial(SIP/${EXTEN}) > if ("${DIALSTATUS}"="BUSY") { > // prompt for camp > Set(DB(camp/${EXTEN}/call_to)=${CALLERID(num)); > } > > h => { > Set(call_to=${DB(camp/${exten_copy}/call_to)}); > if ("${call_to}"!="") { > Set(DB(camp/${exten_copy}/call_to)=); > System(call_to ${exten_copy} ${call_to}); > } > } > > So, in case if phone2 is busy, store callerid of phone1 in database, > so when phone2 will hangup it will triger a script "call_to" which > however can originate call trough manager or call-file. > > Of course you will need some additional handling in case if multiple > callers decide to camp, or diferent protocols are used, etc. > > Regards, > Atis > > > > Thanks in Advance for any help. > > Regards > > *Daniel Johnson* > Systems Administrator / Systems Development > Scanning Systems Australia > > Scanning Systems Australia > > *Office:* +61 7 3387 5555 > *Facsimile:* +61 7 3387 5588 > *E-mail:* dan.j@scanningsystems.com.au > <mailto:dan.j@scanningsystems.com.au> > *Website:* http://www.scanningsystems.com.au
Daniel Johnson
2009-Jan-29 03:30 UTC
[asterisk-users] Callback / Camp / Extention Free notify?
pdhales at optusnet.com.au wrote:> Funnily enough, most people install phones with BLF lamps, on install something like hudlite/FOP/etc so you know if the person is on the phone before you call them.. > > PaulHHi Paul, Yes I have seen these tools. However it is a manual process (simple, I know) and is not close to being as user friendly as the feature we are trying to achieve. *Daniel Johnson* Systems Administrator / Systems Development Scanning Systems Australia Scanning Systems Australia *Office:* +61 7 3387 5555 *Facsimile:* +61 7 3387 5588 *E-mail:* dan.j at scanningsystems.com.au <mailto:dan.j at scanningsystems.com.au> *Website:* http://www.scanningsystems.com.au -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090129/73185080/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: ssa-logo.jpg Type: image/jpeg Size: 5930 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20090129/73185080/attachment.jpg
pdhales at optusnet.com.au
2009-Jan-29 03:54 UTC
[asterisk-users] Callback / Camp / Extention Free notify?
> Daniel Johnson <dan.j@scanningsystems.com.au> wrote: >pdhales@optusnet.com.au wrote:> Funnily enough, most people install phones with BLF lamps, on install something likehudlite/FOP/etc so you know if the person is on the phone before you call them..> > PaulHHi Paul, Yes I have seen these tools. However it is a manual process (simple, I know) and is not close to being as user friendly as the feature we are trying to achieve. -------------------- Understood completely - I was simply saying that you might not find as much information as you were looking for because people use other tools. PaulH
Jeff LaCoursiere
2009-Jan-29 04:17 UTC
[asterisk-users] Callback / Camp / Extention Free notify?
On Thu, 29 Jan 2009, Daniel Johnson wrote:> pdhales at optusnet.com.au wrote: >> Funnily enough, most people install phones with BLF lamps, on install >> something like hudlite/FOP/etc so you know if the person is on the phone >> before you call them.. >> >> PaulH > > Hi Paul, > > Yes I have seen these tools. However it is a manual process (simple, I know) > and is not close to being as user friendly as the feature we are trying to > achieve. >I think you are looking to use a "campon" feature. Try this: http://www.voip-info.org/wiki/view/Asterisk+tips+campon j
Daniel Johnson
2009-Jan-29 04:53 UTC
[asterisk-users] Callback / Camp / Extention Free notify?
Jeff LaCoursiere wrote:> I think you are looking to use a "campon" feature. Try this: > > http://www.voip-info.org/wiki/view/Asterisk+tips+campon > > j >Hi Jeff, Yes I have seen this feature. Its a half implementation of what we require. The difference being that you must wait on the phone until the dialed party becomes available (be it on hold or continuous dial). From my original email, the description of out old systems callback feature: It worked as follows. If phone A called phone B and it was BUSY, you press a button to enable a callback. User A is free to continue work or make other calls. What this meant is that when both phones became free, phone A would ring, on answer it would call phone B automatically and the call connected as per normal. Thanks for your input, *Daniel Johnson* Systems Administrator / Systems Development Scanning Systems Australia Scanning Systems Australia *Office:* +61 7 3387 5555 *Facsimile:* +61 7 3387 5588 *E-mail:* dan.j at scanningsystems.com.au <mailto:dan.j at scanningsystems.com.au> *Website:* http://www.scanningsystems.com.au If you receive this email by mistake, please notify the sender and do not make any use of the email. We do not waive any privilege, confidentiality or copyright associated with it. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090129/190af738/attachment.htm
pdhales at optusnet.com.au
2009-Jan-29 05:02 UTC
[asterisk-users] Callback / Camp / Extention Free notify?
> Daniel Johnson <dan.j@scanningsystems.com.au> wrote: > > pdhales@optusnet.com.au wrote: > > Funnily enough, most people install phones with BLF lamps, on install > something like hudlite/FOP/etc so you know if the person is on the phone > before you call them.. > > > > PaulH > > Hi Paul, > > Yes I have seen these tools. However it is a manual process (simple, I > know) and is not close to being as user friendly as the feature we are > trying to achieve. > >Do the phones you are using support BLF? PaulH
pdhales at optusnet.com.au
2009-Jan-29 05:06 UTC
[asterisk-users] Callback / Camp / Extention Free notify?
> Daniel Johnson <dan.j@scanningsystems.com.au> wrote: > > Jeff LaCoursiere wrote: > > I think you are looking to use a "campon" feature. Try this: > > > > http://www.voip-info.org/wiki/view/Asterisk+tips+campon > > > > j > > > > Hi Jeff, > > Yes I have seen this feature. Its a half implementation of what we > require. > The difference being that you must wait on the phone until the dialed > party becomes available (be it on hold or continuous dial). > > From my original email, the description of out old systems callback > feature: > > It worked as follows. If phone A called phone B and it was BUSY, you > press a button to enable a callback. > User A is free to continue work or make other calls. > What this meant is that when both phones became free, phone A would > ring, on answer it would call phone B automatically and the call > connected as per normal. > >To be honest, I actually remember using a system like this - at the NAB 20 years ago. And it behaved exactly as you describe it...memories.... PaulH
Daniel Johnson
2009-Jan-29 05:11 UTC
[asterisk-users] Callback / Camp / Extention Free notify?
pdhales at optusnet.com.au wrote:> > > >> Daniel Johnson <dan.j at scanningsystems.com.au> wrote: >> >> pdhales at optusnet.com.au wrote: >> >>> Funnily enough, most people install phones with BLF lamps, on install >>> >> something like hudlite/FOP/etc so you know if the person is on the phone >> before you call them.. >> >>> PaulH >>> >> Hi Paul, >> >> Yes I have seen these tools. However it is a manual process (simple, I >> know) and is not close to being as user friendly as the feature we are >> trying to achieve. >> >> >> > > Do the phones you are using support BLF? > > PaulH > >Yes, the more expensive ones do. The majority do not. Linksys phones. Its not so much knowing if the user is busy or not, its the ability to be automatically notified once the user becomes available. *Daniel Johnson* Systems Administrator / Systems Development Scanning Systems Australia Scanning Systems Australia *Office:* +61 7 3387 5555 *Facsimile:* +61 7 3387 5588 *E-mail:* dan.j at scanningsystems.com.au <mailto:dan.j at scanningsystems.com.au> *Website:* http://www.scanningsystems.com.au If you receive this email by mistake, please notify the sender and do not make any use of the email. We do not waive any privilege, confidentiality or copyright associated with it. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090129/0577ea47/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: ssa-logo.jpg Type: image/jpeg Size: 5930 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20090129/0577ea47/attachment.jpg
Paul Hales
2009-Jan-29 23:14 UTC
[asterisk-users] Callback / Camp / Extention Free notify?
> Quick solution that comes into mind: > > Set(exten_copy = ${EXTEN}); > Dial(SIP/${EXTEN}) > if ("${DIALSTATUS}"="BUSY") { > // prompt for camp > Set(DB(camp/${EXTEN}/call_to)=${CALLERID(num)); > } > > h => { > Set(call_to=${DB(camp/${exten_copy}/call_to)}); > if ("${call_to}"!="") { > Set(DB(camp/${exten_copy}/call_to)=); > System(call_to ${exten_copy} ${call_to}); > } > } > > So, in case if phone2 is busy, store callerid of phone1 in database, > so when phone2 will hangup it will triger a script "call_to" which > however can originate call trough manager or call-file. > > Of course you will need some additional handling in case if multiple > callers decide to camp, or diferent protocols are used, etc. > >You could call a batch script from the dialplan that parses the output of 'show hints' with a simple grep to find the status of the individual in question. PaulH