Does Asterisk have a soultion for recording?

Does Asterisk have a soultion for recording?
I mean that I am trying to record the calls on the IP-PBX

is that possible?

I am not sure if I am overlooking something in your question, but I know you can use the Monitor command to record a call. Below is an example of how I use it:

exten => s,n,SetVar(CALLFILENAME=${UNIQUEID}_${FROM_DID})
exten => s,n,Monitor(wav,${CALLFILENAME},m)
exten => s,n,Dial(trunktype/trunkname/number,g)

[quote=“lmcconnell”]I am not sure if I am overlooking something in your question, but I know you can use the Monitor command to record a call. Below is an example of how I use it:

exten => s,n,SetVar(CALLFILENAME=${UNIQUEID}_${FROM_DID})
exten => s,n,Monitor(wav,${CALLFILENAME},m)
exten => s,n,Dial(trunktype/trunkname/number,g)[/quote]

I’ve been doing some googling and reading some posts and came across your reply in this forum. Wondered if I could ask u a question. I am fairly new to this so I apologize if this is trivial to you.

I have been trying to link the CDR, recordings, and info from another DB. All I am really wanting to know is how I can pass the uniqueID to another DB. What config file would I need to edit and what is some sample code for doing such. Also in your example above when in the dialplan do you let asterisk know where you want to store CallFileName? Thanks in advance for your time.

I didnt have it save the variable… I simply used it for part of the file name.

if you wanted to save a custom variable to the CDR you can use:
exten => s,n,Set(CDR(accountcode)=${whatevervariable})
( they have custom fields, but I could never get asterisk to write to it, so I used accountcode because it was writable and was not in use)

I am not sure I follow the question. You can reference it anytime via the dialplan by using the channel var ${UNIQUEID}

One of the things I do when I need to just pass or get information from our production DB is use CURL and have it reference an ASP script.(example from our calling card app)

exten => s,7,Set(cardok=${CURL(http://www.domain.com/getcardinfo.asp?cardnum=${cardnum})})

One of the other things I do is I monitor all the calls and then fire the 2wav2mp3 script afterwards… in order to do this you have to put

[globals] ; script to be executed when monitoring has been finished MONITOR_EXEC=/usr/local/bin/somebashscript
in your extensions.conf dialplan. This will execute the bash script that you specify when monitor is done. I wrote a script to look up and grab information from the CDR in the local mysql db and have it post the information to me via CURL and use of email. (our setup is not in a spot where it can directly ODBC into our MSSQL database)

I hope this all makes sense… if not just ask me whatever. I don’t mind helping. It’s a pain in the ass to get answers to a lot of these questions.