Record ANSWERED Call



I am using this dialplan to record incoming calls:

..... exten => 3331122,n,Set(MONITOR_FILE=${RECDIR}/${UNIQUEID}) exten => 3331122,n,MixMonitor(${MONITOR_FILE}.wav,b) exten => 3331122,n,GoSub(stdexten(${Ext1007})) exten => 3331122,n,Voicemail(1007@default,) exten => 3331122,n,Hangup()

The problem is it records all incoming calls include those with the disposition of "NO ANSWER, FAILED, BUSY, UNKNOWN.". For example the "NO ANSWER" call will leave a 44byte wav file in my ${RECDIR}

How can I record only the calls with the disposition of "ANSWERED"?

May be I should run a cronjob to clean up the 44byte file after it's been created? Is there a better way?



Asterisk Users 10 months ago 3 Answer

Pattern Extension Not Working In Dialplan



I created a dummy dialplan where I ask the user to enter the age.

[macro-age] exten => s,1,Background(my/age) ;;Play recorded message to enter age exten => s,n,WaitExten(10) exten => _XX,1,Set(AGE=${EXTEN}) ;; this line is not executing, instead dialplan is terminating with error given below. exten => s,n,NoOp(${AGE}) exten => s,n,GotoIf($[${LEN(${AGE})} > 0]?notEmpty) exten => s,n,Goto(s,1) exten => s(notEmpty),n,Background(my/thank-you) exten => s,n,Wait(1)

When I receive call and tries to enter the digits (86 lets say), it only accept just first digit and terminates even before considering second digit. Error message : WARNING[5726][C-0000000a]: pbx.c:6696 __ast_pbx_run: Invalid extension '8', but no rule 'i' or…

Asterisk Users 10 months ago 9 Answer

Rejecting A Call As If The Extension Does Not Exist.


I'm trying to address a problem with users transferring to invalid destinations.

In my sip peer I'm setting both __FORWARD_CONTEXT and __TRANSFER_CONTEXT to a context with a extension defined below to set some CDR variables before the call is transferred.

[customer-forward] exten => _X.,1,Progress() exten => _X.,n,Gosub(do-billing,s,1${EXTEN})) exten => _X,n,Goto(customer-internal,${EXTEN},1)

Now if my user Dials an invalid extension, Say '9595' from their sip phone they get back an 'Address Incomplete' message from their phone because it's not a valid extension defined in my dialplan.

If my user Transfers a call to '9595' the call gets transferred and then hung up on as there's no…

Asterisk Users 1.4 years ago 3 Answer

Callerid Overwrite


Hi all, I'm having issues with overwrite caller id, when I call someone my caller id should be "mycompanyinc" but instead my id shows up as my extension number 101.

this is what i have in sip.conf [101] type=friend context=sipphones call-limit

Asterisk Users 1.4 years ago 5 Answer