* You are viewing Posts Tagged ‘exten’

Record Call Ends In 10min

In my context I have:

exten => _NXXXXXX,1,Set(CHANNEL(musicclass)

Record ANSWERED Call

Hi,

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?

Thanks.

Gao

Pattern Extension Not Working In Dialplan

Hi,

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 ‘e’ in context ‘testmacro’

Please suggest what might be wrong.


Anurag Rana http://newbie42.blogspot.in/

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 ‘9595’ destination.

I’d like to reject the calls in my customer-foward context that do not exist in my customer-internal context.

I’ve tried doing something like:

exten => _X.,1,Progress()
same => n,ExecIf($[${DIALPLAN_EXISTS(customer-internal,${EXTEN},1)} 0]?Hangup(28))

But that’s still accepting the call as the _X makes it a Valid extension.

I’m looking for suggestions or ideas on a better way to do this.

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

Problem With Call Transfer From One Server To Another Server

Dear All,

I have pri with E1 facility that have 30 line and 100 pri number which is provided by service provider.Number started like 23568561,23568562,23568563
and so on. Service provider provide last four digit number for did mapping like 4561,4562,4563.


exten => 8561,1,Dial(SIP/4001@192.168.14.110,120,tT)
exten => 8561,n,hangup()

exten => 8562,1,Dial(SIP/4001@192.168.14.110,120,tT)
exten => 8562,n,hangup()

Call comes into first server successful.But problem with second server when call came into second server i got following error:

* chan_sip.c:20063 handle_request_invite: Call from ” to extension ‘4001’
rejected because extension not found.*

In one more scenario:

when i create one extension and call forwarding with this extension that time I’m able to transfer call successful the code is given below:

exten => 5001,1,Dial(SIP/4001@192.168.14.110,120,tT)
exten => 5001,n,hangup()


Regards Akhilesh