* You are viewing Posts Tagged ‘NoOp’

Custom Application Recording Problem

I have a compatibilty problem between asterisk 1.4 and 1.6.2 In my 1.4 asterisk I have a custom application that users call and make recordings which recording I save to a file with the caller Id.

Below is the config file which works perfectly in 1.4

[timo]
exten => 3552,1,Set(TIMEOUT(digit)=2) ; Set Digit Timeout to 5 seconds
exten => 3552,2,Set(TIMEOUT(response)=2) ; Set Response Timeout to 10 seconds
exten => 3552,3,Answer
exten => 3552,4,NoOp(${CALLERID(num)})
exten => 3552,5,Set(number=${CALLERID(num)})
exten => 3552,6,NoOp(${number})
exten => 3552,7,Background(recmsg1) ;"Please say yo message after the beep and end with a hash"
exten => 3552,8,Record(crystalrecords/${number}.gsm)
exten => 3552,9,Playback(crystalrecords/${number})
exten => 3552,10,Background(ackrec) ;"Press 1 to replay or 2 to re-record, 3 to save "
exten => 3552,11,WaitExten(5)
exten => timo,1,1,Goto,timo|3552|9
exten => timo,2,1,Goto(3552,7) ; re-record message
exten => timo,3,1,Goto(4,1)
exten => timo,4,AGI(timorec.php)
exten => i,1,Background(invalidentry)
exten => i,n,Goto(3552,10)
exten => t,1,Playback(thankyoubye)
exten => t,n,Hangup

In my 1.6 version I use the same configuration in extensions_custom.conf but I get the error below. It seems like 1.6 does not recognize the button the user has pressed.

MYSQL INSERT QUESTION IN DIALPLAN

I am not a programmer and I have learned so much from examples and the list.
Perhaps someone could tell me what I am doing wrong in my example below:

I am getting the caller ID and caller name from my local POTS line and I
want to add it into a sql table. I am trying with the following code but
the data never gets put into the table.

Can anyone correct my syntax and tell me what I am doing wrong?

[callerinfo]
exten => s,1,MYSQL(Connect connid localhost myuser mypassword cnam)
exten => s,n,MYSQL(Query resultid ${connid} INSERT INTO `calleridcapture`
(`number`,`name`) VALUES (${CALLERID(num)},${CALLERID(name)})
exten => s,n,MYSQL(Clear ${resultid})
exten => s,n,MYSQL(Disconnect ${connid})
exten => s,n,NoOp(Callerid Name ${CALLERID(name)})
exten => s,n,NoOp(Callerid Number ${CALLERID(num)})

The NoOP does show the correct CALLERID name & number when I test it. The
information just doesn’t go into my calleridcapture table in the cnam
database.

Thanks very much for your help
Again I am not a programmer and I am sure my syntax is wrong.

This is Asterisk 1.8.10.0

syntax error from digium fax manual ??

I’ve cut and pasted from the digium fax admin manual:

exten => send,1,NoOp(**** SENDING FAX ****)
exten => send,n,Wait(6)
exten => send,n,Set(GLOBAL(FAXCOUNT)=$[ ${GLOBAL(FAXCOUNT)} + 1 ])
exten => send,n,Set(FAXCOUNT=${GLOBAL(FAXCOUNT)})

Asterisk 1.8 and DeadAGI

On Wed, 4 Apr 2012, SamyGo wrote:

> NOOP is just for fun no benefit aside from printing something for you
> info on CLI.

It’s not fun, it’s misleading. Especially if English is not your primary
language.

The name is not obvious. The Wikipedia entry for ‘noop’ says a ‘no
operation’ instruction should be ‘nop,’ not ‘noop.’

Even the ‘help’ description is contradictory. It says ‘this application
does nothing’ and then it describes what it does.

There’s a perfectly obvious application specifically designed for console
output. It’s named ‘verbose’ and it has more features.

A ‘best practice’ would be to use the obvious application with the
intended action instead of the obtuse application with the convenient
side-effect.

A ‘noop’ does have it’s place as a ‘place holder’ for another application
or to make a syntactically valid place for a label. If that’s your intent,
use it.

Otherwise, ‘raise the bar’ in your dialplan coding skills and do the right
thing. Type the extra 3 characters and make your intent clear. Isn’t that
one of the ‘hallmarks’ of a skilled programmer?

Cut off + sign in telephonenumber

Hello,

I’m trying to cut off the “+” sign if part of a telephone number, but
not succeeding :

exten => test,n,Set(cid=+99999600)
exten => test,n,Set(regx=”([0-9])”)
exten => test,n,Set(cid2=$["${cid}" : ${regx}])
exten => test,n,NoOp(cid2=${cid2})

cid2 is empty afterwards…

What I want is to make sure there are only numbers and no other characters.

So +99999600 needs to become 99999600 (without + )
So 99999#600 needs to become 99999600 (without # )