How to place next call without hangups


At this moment client call to my system, where I answer it and prompt for number to dial. After that when call is done I have to get duration of that call and debit clients’ account.
This scenario I have done but is one more thing to do, namely if a callee disconnect I need give to client possibility to place another call.

Problem is if I use g option in Dial application then i lose ability to check duration of last call

Below is simplified my current dialplan

;the whole thing start here
exten => s,1,Noop(Wersja 3)
	same => n(NUMBER),GoSub(func-GETNUMBER,s,1)
	same => n,GoSub(func-PLACECALL,s,1)
	same => n,Hangup

;here I get number for caller
exten => s,1,Noop(Pobieranie numeru telefonu)
	same => n,Agi(,podaj numer telefonu na który chcesz zadzwonić i zatwierdź kratką)
	same => n,Read(CPB,${AUDIO_FILENAME},20)
	same => n,Return

exten => s,1,Noop(Dzwonie na podany numer telefonu)
	same => n,Dial(local/${CPB}@func-DIALNUMBER,55,L(${CALLLIMIT})) ;if i put g option here i cant get amount of time of call
	same => n,Goto(STATE-${DIALSTATUS},1)
	same => n,Hangup

exten => i,1,Noop(Cos sie wydarzylo)	
	same => n,GoSub(sub-TTS,s,1(nie można zrealizować tego połączenie))
	same => n,Return

exten => STATE-ANSWER,1,Noop(Polaczenie zwrocilo stan ODEBRANY)	
	same => n,Noop(${ANSWEREDSTATUS})
	same => n,Noop(${CDR(billsec)})
	same => n,Noop(${CDR(start)})
	same => n,Noop(${CDR(answer)})
;	same => n,GoSub(func-DEBITCARD,s,1)
;	same => n,GoSub(sub-TTS,s,1(proszę wykonać następne połączenia))
	same => n,Hangup	

exten => STATE-BUSY,1,Noop(Polaczenie zwrocilo stan ZAJETY)	
	same => n,GoSub(sub-TTS,s,1(numer obecnie jest zajęty. proszę spróbować później))
	same => n,Return

exten => h,1,Noop(Naliczanie oplaty za polaczenie)
;here i get amount of seconds of call - if I dont use g option in dial application
	same => n,Noop(Czas: ${CDR(billsec)})
	same => n,Return

exten => _X.,1,Noop(Dzwonie taaaam)
	same => n,Dial(PJSIP/${EXTEN}@monster-02)

Seems like you should be able to use CDR variables for this.
As far as the follow on call feature, the h or H options to Dial can accomplish this, with the code set in features.conf

nope cdr varoable are not filled in moment which i need . i used g and e option and place some magic and its works as i want

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.