[asterisk-users] Camp / Callback feature in 1.4

Atis Lezdins atis at iq-labs.net
Tue Jun 10 10:02:52 CDT 2008


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

-- 
Atis Lezdins,
VoIP Project Manager / Developer,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835



More information about the asterisk-users mailing list