I'm not sure exactly what to call the issue

Asterisks from source version 1.2

I did not set up our asterisks or have much linux experience. So I’m learning on the fly.


How do I set up the string to say if coming from 220 to 4099819543 don’t
record. We already stop recording 9819543 (exten=>4099819543,goto(infinity_no_record,${EXTEN},1)) as it is a remote audio phone #. But we use it in house so it is still getting recorded because the phone itself is still being recorded.

So I need one to say if from 220 (extension of the in house phone) to
4099819543 don’t record.

Someone else suggested these too me

[quote]dialplan logic like if [ $[callidnum]==‘220’,1:2] etc.

or better built in logic in the extension 4099819543/220,goto(somewhere
hot and sunny)[/quote]

I have no idea how to use the first one but I did try
exten=>4099819543/220,goto(infinity_no_record,${EXTEN},1)" which didn’t work

Also I realized in the course of this that our outbound modem lines for
faxing from UC and paging from Infinity are being recorded. So I wanted
to add those in the do not record list since I’m damn sure never going
to listen to the recording of modems talking.

I tried

exten=>630,goto(infinity_no_record,${EXTEN},1)"

and

exten=>_630,goto(infinity_no_record,${EXTEN},1)"

neither worked


This is from my extensions.conf it is what we use to turn off the
recording for remote audio paths. It works fine

[no_record_remotes]

exten=>4099819444,1,goto(infinity_no_record,${EXTEN},1)


Just a snipit showing how it sees calls coming from that inhouse phone

3-220-9819213|mb") in new stack

– Executing Dial(“Zap/5-1”, “Zap/G3/9819213”) in new stack

– Requested transfer capability: 0x00 - SPEECH

– Called G3/9819213

– Zap/69-1 is proceeding passing it to Zap/5-1

– Accepting call from ‘220’ to ‘4099819213’ on channel 0/2, span 3

– Executing Goto(“Zap/50-1”, “port3_real|4099819213|1”) in new
stack

– Goto (port3_real,4099819213,1)

– Executing Goto(“Zap/50-1”, “dial_mili|4099819213|1”) in new stack

– Goto (dial_mili,4099819213,1)

– Executing Wait(“Zap/50-1”, “0.7”) in new stack !! Got reject for
frame 55, but we only have others!

– Executing Monitor(“Zap/50-1”,
"wav|/var/store/calls/mili-20090203-095045-


I thought i had created this before. If I did and it was deleted or is again. Please send me a message explaining why so I can solve the issue.

Your writing makes this issue rather confusing. I think what you are trying to ask is:

“How do I keep one specific call, unmonitored?”
(or more specifically)
“How do I turn off monitoring when a call originating from 220 terminates to 4099819543”

Is this correct? Because if it is, I think I’ve got an answer for you.

Apologies Its been a busy couple of weeks and working on 5 different projects so my brain is just as scattered

My questions are How do I turn off monitoring when a call originating from 220 terminates to 4099819543 and How to turn off monitoring for any calls originating from X

I already now how to do any calls terminating at X

Don’t have time to test this right now but I think you are looking for something like:

exten => _X.,n,GotoIf($[ "${CALLERID(num)}" == "220" & "${EXTEN}" == "4099819543" ]?context,extension,priority) 

That is of course if 4099819543 is the extension you want to go to…

That didn’t work, but I may have the syntax wrong. I’m using different numbers than my question as the station that ext 220 is at is in use today so just testing from my desk till I have the code right.

exten=> _X.,n,GotoIf($[ “${CALLERID(num)}” == “4099819213” & “${EXTEN}” == “4099819797” ]infinity_no_record,${EXTEN},1)

With the above line active. It not only is still recording, its throwing errors on calls that don’t even pertain to the about line.

[code]Connected to Asterisk SVN-branch-1.2-r47862 currently running on pbx (pid = 4129)
Verbosity is at least 8
– Accepting call from ‘4099819213’ to ‘9819797’ on channel 0/4, span 1
– Executing Goto(“Zap/4-1”, “bell_out_td|9819797|1”) in new stack
– Goto (bell_out_td,9819797,1)
– Executing Set(“Zap/4-1”, “CALLERID(all)=<4099819213>”) in new stack
– Executing NoOp(“Zap/4-1”, "“OUTBOUND-PRES:4099819213"”) in new stack
– Executing Monitor(“Zap/4-1”, “wav|/var/store/calls/bellout-20090204-105843-4099819213-9819797|mb”) in new stack
– Executing Dial(“Zap/4-1”, “Zap/G3/9819797”) in new stack
– Requested transfer capability: 0x10 - 3K1AUDIO
– Called G3/9819797
– Zap/70-1 is proceeding passing it to Zap/4-1
– Accepting call from ‘4099819213’ to ‘4099819797’ on channel 0/1, span 3
– Executing Goto(“Zap/49-1”, “port3_real|4099819797|1”) in new stack
– Goto (port3_real,4099819797,1)
– Executing Monitor(“Zap/49-1”, “wav|/var/store/calls/to_infinity-20090204-105844-4099819213-4099819797|mb”) in new stack
Feb 4 10:58:44 WARNING[10058]: ast_expr2.fl:183 ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected TOK_EQ, expecting TOK_MINUS or TOK_COMPL or TOK_LP or TOKEN; Input:
“4099819213” == “4099819213” & “4099819797” == “4099819797”
^
Feb 4 10:58:44 WARNING[10058]: ast_expr2.fl:187 ast_yyerror: If you have questions, please refer to doc/README.variables in the asterisk source.
– Executing GotoIf(“Zap/49-1”, “0infinity_no_record|4099819797|1”) in new stack
!! Got reject for frame 113, but we only have others!
– Channel 0/1, span 3 got hangup
– PROGRESS with cause code 18 received
– Zap/70-1 is making progress passing it to Zap/4-1
– Hungup ‘Zap/49-1’
!! Got reject for frame 114, but we only have others!
– Channel 0/3, span 3 got hangup request
– Hungup ‘Zap/26-1’
== Spawn extension (dial_inf, 4099819523, 8) exited non-zero on ‘Zap/51-1’
– Hungup ‘Zap/51-1’
– Accepting call from ‘4098386334’ to ‘4099819160’ on channel 0/1, span 3
– Executing Goto(“Zap/49-1”, “port3_real|4099819160|1”) in new stack
– Goto (port3_real,4099819160,1)
– Executing Monitor(“Zap/49-1”, “wav|/var/store/calls/to_infinity-20090204-105902-4098386334-4099819160|mb”) in new stack
Feb 4 10:59:02 WARNING[10067]: ast_expr2.fl:183 ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected TOK_EQ, expecting TOK_MINUS or TOK_COMPL or TOK_LP or TOKEN; Input:
“4098386334” == “4099819213” & “4099819160” == “4099819797”
^
Feb 4 10:59:02 WARNING[10067]: ast_expr2.fl:187 ast_yyerror: If you have questions, please refer to doc/README.variables in the asterisk source.
– Executing GotoIf(“Zap/49-1”, “0infinity_no_record|4099819160|1”) in new stack
– Channel 0/4, span 1 got hangup request
– Hungup ‘Zap/70-1’
== Spawn extension (bell_out_td, 9819797, 4) exited non-zero on ‘Zap/4-1’
– Hungup ‘Zap/4-1’
– Channel 0/1, span 3 got hangup
– Hungup ‘Zap/49-1’

Without it

Connected to Asterisk SVN-branch-1.2-r47862 currently running on pbx (pid = 4129)
– Remote UNIX connection
Verbosity is at least 8
– Accepting call from ‘4099819998’ to ‘97340215’ on channel 0/23, span 2
– Executing Goto(“Zap/47-1”, “bell_out_td|7340215|1”) in new stack
– Goto (bell_out_td,7340215,1)
– Executing Set(“Zap/47-1”, “CALLERID(all)=<4099819998>”) in new stack
– Executing NoOp(“Zap/47-1”, "“OUTBOUND-PRES:4099819998"”) in new stack
– Executing Monitor(“Zap/47-1”, “wav|/var/store/calls/bellout-20090204-110024-4099819998-7340215|mb”) in new stack
– Executing Dial(“Zap/47-1”, “Zap/G3/7340215”) in new stack
– Requested transfer capability: 0x00 - SPEECH
– Called G3/7340215
– Zap/70-1 is proceeding passing it to Zap/47-1
– Zap/70-1 is making progress passing it to Zap/47-1
– Zap/70-1 answered Zap/47-1
– Channel 0/23, span 2 got hangup request
– Hungup ‘Zap/70-1’
== Spawn extension (bell_out_td, 7340215, 4) exited non-zero on ‘Zap/47-1’
– Hungup ‘Zap/47-1’
– Accepting call from ‘4098922795’ to ‘4099819554’ on channel 0/2, span 3
– Executing Goto(“Zap/50-1”, “port3_real|4099819554|1”) in new stack
– Goto (port3_real,4099819554,1)
– Executing Goto(“Zap/50-1”, “dial_mili|4099819554|1”) in new stack
– Goto (dial_mili,4099819554,1)
– Executing Wait(“Zap/50-1”, “0.7”) in new stack
– Executing Monitor(“Zap/50-1”, “wav|/var/store/calls/mili-20090204-110033-4098922795-4099819554|mb”) in new stack
– Executing Dial(“Zap/50-1”, “Zap/g1/4099819554”) in new stack
– Requested transfer capability: 0x00 - SPEECH
– Called g1/4099819554
– Zap/1-1 is proceeding passing it to Zap/50-1
– Zap/1-1 is ringing
– Channel 0/2, span 2 got hangup request
– Hungup ‘Zap/26-1’
== Spawn extension (dial_inf, 4098321501, 8) exited non-zero on ‘Zap/51-1’
– Hungup ‘Zap/51-1’
– Accepting call from ‘4099819213’ to ‘9819701’ on channel 0/17, span 1
– Executing Goto(“Zap/17-1”, “bell_out_td|9819701|1”) in new stack
– Goto (bell_out_td,9819701,1)
– Executing Set(“Zap/17-1”, “CALLERID(all)=<4099819213>”) in new stack
– Executing NoOp(“Zap/17-1”, "“OUTBOUND-PRES:4099819213"”) in new stack
– Executing Monitor(“Zap/17-1”, “wav|/var/store/calls/bellout-20090204-110038-4099819213-9819701|mb”) in new stack
– Executing Dial(“Zap/17-1”, “Zap/G3/9819701”) in new stack
– Requested transfer capability: 0x10 - 3K1AUDIO
– Called G3/9819701
– Zap/70-1 is proceeding passing it to Zap/17-1
– Accepting call from ‘4099819213’ to ‘4099819701’ on channel 0/3, span 3
– Executing Goto(“Zap/51-1”, “bell_out_td|8322184|1”) in new stack
– Goto (bell_out_td,8322184,1)
– Executing Set(“Zap/51-1”, “CALLERID(all)=<4099819213>”) in new stack
– Executing NoOp(“Zap/51-1”, "“OUTBOUND-PRES:4099819213"”) in new stack
– Executing Monitor(“Zap/51-1”, “wav|/var/store/calls/bellout-20090204-110039-4099819213-8322184|mb”) in new stack
– Executing Dial(“Zap/51-1”, “Zap/G3/8322184”) in new stack
– Requested transfer capability: 0x10 - 3K1AUDIO
– Called G3/8322184
!! Got reject for frame 120, but we only have others!
– Zap/69-1 is proceeding passing it to Zap/51-1
– Zap/69-1 is ringing
– Zap/70-1 is ringing
!! Got reject for frame 121, but we only have others!
– Zap/69-1 answered Zap/51-1
– Zap/70-1 answered Zap/17-1
– Channel 0/17, span 1 got hangup request
– Hungup ‘Zap/70-1’
== Spawn extension (bell_out_td, 9819701, 4) exited non-zero on ‘Zap/17-1’
– Hungup ‘Zap/17-1’
– Channel 0/3, span 3 got hangup request
– Hungup ‘Zap/69-1’
== Spawn extension (bell_out_td, 8322184, 4) exited non-zero on ‘Zap/51-1’
– Hungup ‘Zap/51-1’
-------------------------------------------[/code]

Hi,

I have tested this on my system it should work for you!

There is a lot of good information in;

  1. The doc folder of source take a look at
    channelvariables.txt.

  2. *CLI> show application GotoIf

  3. Chaper 6 in this book
    digium.com/elqNow/elqRedir.h … 510480.pdf

[outgoing]
exten => 4099819213,1,GotoIf($["${CALLERID(num)}" = “220”]?outgoing,${EXTEN:0},4)
exten => 4099819213,2,Hangup()

exten => _X.,1,set(CALLTIMESTAMP=${STRFTIME(${EPOCH},%y-%m-%d-%H%M)}-${CALLERID(num)}-${EXTEN:0})
exten => _X.,2,Set(CALLFILENAME=${CALLTIMESTAMP})
exten => _X.,3,Monitor(wav,${CALLFILENAME},m)
exten => _X.,4,Dial(${PSTN-TRUNK}/${EXTEN:0},T)
exten => _X.,5,Hangup()

Brett