[Home]

Summary:ASTERISK-00460: [patch] Campon feature
Reporter:pliew (pliew)Labels:
Date Opened:2003-10-30 04:46:58.000-0600Date Closed:2011-06-07 14:05:27
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_queue.diff
( 1) campon-1.6.2-diff.txt
( 2) campon-1.6.2-diff2.txt
( 3) campon-1.8.diff.txt
Description:Allows ability to camp-on a caller with MOH, when the extension is busy. Caller can break out of camp-on by pressing 1 or 2. Drops back onto the dialplan with different priority. I've put it here because I modified the app_queue file to provide this functionality.

****** ADDITIONAL INFORMATION ******

Sample extensions.conf
[macro-ext]
;
; Standard extension macro:
;   ${ARG1} - Technology/Number
;
exten => s,1,Dial(${ARG1},30|tr)
exten => s,2,Voicemail(u${MACRO_EXTEN})
exten => s,102,Campon(${ARG1}) ; phone busy camp the caller on
exten => s,103,Voicemail(b${MACRO_EXTEN}) ; caller decides to leave voicemail by pressing 1
exten => s,203,Directory(Default)        ; caller decides to call another extension by pressing 2

You have to record "campon" voice file to instruct the caller ie "extension in busy, press 1 for voicemail, 2 for directory, or hold the line to wait". A repeat voice file "campon-repeat" is used for subsequent instructions every 45 seconds (default). The default MOH used is "default", these can be overwritten by adding to queues.conf

[campon]
music => random
timeout => 30
Comments:By: tclark (tclark) 2003-11-07 03:33:41.000-0600

This is a nice feature, BUT i am not so sure that over loading the queues is the best place to add this patch, it realy has nothing to do with agents and ACD
it will only make maintenance more complex in the future,
I'd vote to refactor this into app_campon, & strip out all the queue stuff
and the agent stuff & the q strategy stuff ....

By: pliew (pliew) 2003-11-07 15:36:54.000-0600

I agree with you that this campon facility should be in its own app. It was a quick way for me to get it up and running for our own system. I suppose I'm trying to gauge the reaction to this facility, and if by consesus, that it should be integrated into the CVS, I'm more than happy to  spend the time to move it into its own module and re-submit it. Actually, it doesn't have to be a consesus, if there is anybody else wanting it, I will do it. For my part, our office is finding the facility useful.

By: John Todd (jtodd) 2003-11-08 13:01:16.000-0600

I'm also in agreement that it should be it's own application.  Queues are getting too complex already, and I suspect that this will never be added to CVS if the current patch list of things to go into app_queue is any indication.  I think this would be a useful app to have, and you have my vote for making this a standalone.  

As for voicefiles, you may find that you can splice something together with the many pre-recorded voices I have for Allison Smith on http://www.loligo.com/asterisk/sounds/

By: pliew (pliew) 2003-11-08 16:38:56.000-0600

Thanks John, I will splice some voice files together, better than my gutteral utterances. I've started work on moving the campon feature to its own app - when done, I will probably open a new bugnote in applications and ask Digium to close this one on re-aasigned. On a side note I hope they have received my disclaimer via snail mail.

By: pliew (pliew) 2003-11-10 05:03:34.000-0600

Please close this - I've created a new bug 509 to make this an application. However, I've put it in the wrong place!!! sorry - please move 509 to applications. Thanks.

By: John Todd (jtodd) 2003-11-14 01:47:24.000-0600

Closing this, since new patch/etc. is in ASTERISK-505.

By: Alec Davis (alecdavis) 2010-10-01 00:48:39

Paul: Is there any chance you've kept app_campon alive for later versions.

Maybe time to re-vitalise this?

By: Alec Davis (alecdavis) 2010-10-08 05:33:30

work in progress - and works
The reason for this is that dialplan doesn't keep the ordering of calls - explanation in ~127633

requires campon.gsm from ASTERISK-505
campon-repeat.gsm was never done.
may support queues.conf [campon] parameters from ASTERISK-505

dialplan example:
[dial-campon]
exten => _XXX,1,Campon(SIP/${EXTEN})
exten => _XXX,n,Wait(10)

exten => o,1,NoOp(Operator)     ;0 user press
exten => o,n,Wait(10)

exten => v,1,NoOp(VoiceMail)    ;1 user press
exten => v,n,Wait(10)

exten => d,1,NoOp(Directory)    ;2 user press
exten => d,n,Wait(10)

exten => a,1,NoOp(abort)        ;* user press
exten => a,n,Wait(10)

exten => h,1,NoOp(abort)        ;# user press
exten => h,n,Wait(10)

[phones]
exten => 649,hint,SIP/${EXTEN}
exten => 649,1,Progress()
exten => 649,n,Goto(dial-campon,${EXTEN},1)



By: Russell Bryant (russell) 2010-10-10 04:46:47

I really don't think this is the right way to go.  This code is derived from ancient times, and there are newer better ways of accomplishing this.  You shouldn't have to retry periodically.  Asterisk knows about device states.  A bigger issue though is that there is already "camp on" infrastructure in Asterisk as of Asterisk 1.8 (the call completion code).  It is doing this exact thing.  For this "stay on the call camp on" feature to go into Asterisk, I think it needs to be done as an extension to the call completion feature infrastructure so that the same queue of callers is used, regardless of the camp on method (staying on the call, a generic callback set up by the dialplan, or one of the protocol specific methods of subscribing to camp on services).

By: Alec Davis (alecdavis) 2010-10-10 13:52:31

russell: Agreed, for 1.6.2 the ancient way is the way to go, for non-development sites.

It will be good to see app_queue rewritten to use CCSS for 1.8 and trunk. then campon will just fall into place.

By: Leif Madsen (lmadsen) 2010-10-12 12:23:27

At this point, if app_queue doesn't already do this, I don't see it happening in 1.8; only trunk.

By: Leif Madsen (lmadsen) 2010-10-12 12:24:20

At this point I'm closing this issue. If some patches or anything see the light of day, I suggest you open a new issue for it. Discussions can take place on the asterisk-dev mailing list per usual.

Thanks!

By: Alec Davis (alecdavis) 2010-10-26 06:18:08

uploaded campon-1.6.2-diff2.txt

<u><b>queues.conf:</b></u>
[campon]
timeout = 15
ringinuse = no
periodic-announce-frequency = 15
periodic-announce = campon-repeat
context = campon-exit

<u><b>extensions.conf:</b>(edited for simplicity)</u>
....
[macro-dial]
exten => s,1, ...get {devices} {timeout} from database etc
exten => s,n,Set(EXTSTATE=${EXTENSION_STATE(${ARG1}@phones)})
exten => s,n,GotoIf($["${EXTSTATE}"="NOT_INUSE"]?dialmult)
exten => s,n,GotoIf($["${EXTSTATE}"="UNKNOWN"]?dialmult)
exten => s,n,Set(EXTCAMPON=${ARG1})
exten => s,n,Campon(${devices})

exten => s,n(dialmult),Dial(${devices},${timeout},r)

[campon-exit]
exten => 0,1,NoOp(1 pressed)
exten => 0,n,Goto(phones,8000,1)

exten => 1,1,NoOp(1 pressed)
exten => 1,n,Voicemail(${EXTCAMPON},u)
exten => 1,n,Hangup()



By: Alec Davis (alecdavis) 2012-10-01 14:41:16.731-0500

uploaded campon-1.8.diff.txt

Still in use on production server.