I had a server all setup that was working pretty well, but as I was doing some security things I screwed it up and had to reinstall everything. Now call recordings are horrible and sound like this:
http://s000.tinyupload.com/download.php?file_id=58238805044662381352&t=58238805044662381352302451
Opening the file in Adobe Audition allowed me to adjust the playback rate, when I played it back at 2X speed, it sounded a little better, but there was still distortion. The distortion makes it sound robotic, slower and with clicking noises mixed in.
I have tried it as gsm and wav, tried setting the volume only because when I downloaded it to my PC it was really hard to hear, but on playback within asterisk the volume was fine. I also tried upgrading sox.
The call is coming in from a GSM gateway to the Asterisk 11 server which is a Dell R610 with 16GB RAM, RAID 10 HDD setup with nothing else to do other than record this call, so there shouldn't be any load issues. When I call from a phone to a phone, the audio sounds great on the handset The recordings sounded fine before I reinstalled everything, any tips?
Here is the dialplan info (but I don't think it is relevant, nor is it finished, only included to show nothing crazy happening)
[inbound-record]
exten => s,1,Set(TIMEOUT(digit)=5)
exten => s,n,Set(TIMEOUT(response)=15)
exten => s,n,Playback(press)
exten => s,n,Playback(digits/1)
exten => s,n,Read(ACCOUNTNUM,digits/1,i)
exten => s,n,System(/usr/bin/mkdir /var/lib/asterisk/sounds/outboundmsgs/${ACCOUNTNUM})
exten => s,n,Set(VOLUME(TX)=6)
exten => s,n,Set(VOLUME(RX)=9)
exten => s,n,Playback(vm-record-prepend)
exten => s,n,Record(/var/lib/asterisk/sounds/outboundmsgs/${ACCOUNTNUM}/tmp_greeting:wav)
exten => s,n,Wait(2)
exten => s,n,Playback(/var/lib/asterisk/sounds/outboundmsgs/${ACCOUNTNUM}/tmp_greeting)
exten => s,n,wait(2)
exten => s,n,Hangup
I worked till midnight last night with the tech support from OpenVox and we finally found the issue. There is something funny with their Ethernet ports on the new box where port 1 can only see slot 1, to see the others I plugged into port 2, but had left port 1 also plugged in - which effectively gave it 2 routes with the same IP.....
That would be why it was recording 50% slower, because in a round robin of receiving it would take a packet from port 1, then port 2, then port 1 again, but only 1 of them would have data. Unplugging one of them resolved all the issues.
Related
I'm currently working on a project where I need to do some specific tasks using asterisk.
WHAT I DID
I run the asterisk through a raspberry pi and convert PSTN call to VoIP using Obi110 device. However it routes incoming calls to my FreePBX. As extension file says it comes as"from trunk" context name. So to be able to answer the incoming call and play a sound file, I followed online tutorial and as an example I used provided code to check whether it actually works. So in extension_custom.conf I wrote following code,
[from-trunk]
exten => s,1,Answer ;
exten => s,2,Playback(tt-weasels) ;
exten => s,3,Hangup ;
exten => ste,1,Set(VOLUME(RX)=10) ; set the RX volume
exten => ste,2,Set(VOLUME(TX)=10) ; set the RX volume
exten => ste,hint,SIP/ste; hint 'ste' used for presence notification
exten => ste,3,Dial(SIP/ste) ; call the user ste'
exten => steand,1,Set(VOLUME(RX)=10) ; set the RX volume
exten => steand,2,Set(VOLUME(TX)=10) ; set the RX volume
exten => steand,hint,SIP/ste; hint 'steand' used for presence notification
exten => steand,3,Dial(SIP/steand) call the user 'steand' used for presence
notification
My Problem
After saving that and restarting asterisk and make a call to the PSTN line phone, it still rings rather than following the commands. Am I doing something wrong? I'm new to this. Thanks.
Extension s mean "no extension". More then likly, that you have no any goto to that extension in your dialplan.
Use
asterisk -rvvv
Check output of asterisk when call come in, you will see context and extension used.
Also you SHOULD not use SAME context in custom. You should use from-trunk-custom.
I have below dialplan where I am trying to play a sound like thursday which is skipping, but when I put evening the it says properly.
exten => *7000,1,NoCDR()
exten => *7000,n,Answer()
exten => *7000,n,System(/bin/cp /etc/asterisk/extensions_custom_WEEKEND_TEMPLATE.conf /etc/asterisk/extensions_custom_ACTIVE.conf)
exten => *7000,n,Wait(1)
exten => *7000,n,System('/usr/sbin/asterisk -rx "dialplan reload"')
exten => *7000,n,Playback(beep)
exten => *7000,n,Playback(thursday)
exten => *7000,n,Playback(service)
exten => *7000,n,Playback(activated)
exten => *7000,n,HangUp
And can we play the sound using the same voice as in freepbx lady voice.
"Freepbx lady" is Allison Smith, she offer record any sound file for additional money. http://theivrvoice.com/
What you described seams like incorrect file format.
Also whole dialplan is very bad design, reload dialplan for every dialplan rush is VERY VERY bad idea.Imagine what will be when 3 calls come in same moment.
Use asterisk REALTIME extensions architecture(dialplan from db) or db lookup for file name via func_odbc.
I have two asterisk servers one with PBX inflash and other only just Asterisk installed on CentOS . I need to migrate the stuff from PBXINFLASH to Asterisk 11.9.0 . The PbX in flash is running Asterisk 10.12.1.
I have a dialplan which works perfectly fine on the Asterisk 10.12.1 but on my new box with Asterisk 11.9.0 the DTMF or user key input is not working one one part of the dialplan. I have tried to do debug for dtmf both the servers are same no difference in debug resul, also strange this is my dialplan on one machine works fine and other works partially. The dial plan is call screen where caller presses 1 to proceed and recipient gets call and system ask to press 1 to accept call or hangup now one Asterisk 11.9.0 caller press 1 input is working fine but second user/recipient press 1 does not do any thing at all.
I am using sip account to test my dtmf. I have swapped my sip accounts and sip softphones to test still the same issue. Following are two parts of same macro half working and second half not taking user input
First Half that works and takes user input.
exten => _X.,n,GotoIf($[${GROUP_COUNT(${CallerNum})} > 1]?Exceeded) ;Exceeded?
exten => _X.,n,Set(HngupCount=1);Hangup
exten => _X.,n,Flite(Please press 1 to speak with ${destUID})
exten => _X.,n,Read(yesno,sip-silence,1,,2,5)
exten => _X.,n,GotoIf($[${yesno} = 1]?continue:hangup)
Second half which not working or taking user's input :-
[macro-Dial2]
exten => s,1,Wait(1);ResetCDR
exten => s,n,Set(_StartTime=${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)})
exten => s,n,ResetCDR
exten => s,n,Set(_RCount=1)
exten => s,n(Repeat),Flite(Hi there)
exten => s,n,Flite(${ARG1} wants to speak to you. Please press 1 to accept the call. 2 to forward the call to voicemail or 3 to reject the call.)
exten => s,n,Flite(we are connecting you)
exten => s,n,Read(ACCEPT,sip-silence,1,,1,5)
exten => s,n,Set(_RCount=$[${RCount} + 1])
exten => s,n,NoOp(Counter is ${RCount} -- the user selected: ${ACCEPT});
exten => s,n,Gotoif($[${ACCEPT} = 1]?accept:vm) ;Accept the call
exten => s,n(vm),Gotoif($[${ACCEPT} = 2]?voicemail:rej) ;forward the call to dummy voicemail (Actually just record the callers message)
exten => s,n(rej),Gotoif($[${ACCEPT} = 3]?reject) ;Reject the call and hangup
exten => s,n,Gotoif($[${RCount} > 2]?reject:Repeat) ; If no key pressed, just hangup the call and inform the User.
exten => s,n(accept),set(SecLeg=${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)})
In second half it works fine till the following lines :
exten => s,n,Flite(${ARG1} wants to speak to you. Please press 1 to accept the call. 2 to forward the call to voicemail or 3 to reject the call.)
exten => s,n,Flite(we are connecting you)
Note, in your dialplan user input will be taken only after all flite message playback finished
It is highly recommended play by flite only ${ARG1}, while all other(static part) record to file and use in READ command
You can get more info by enable dtmf debug in your asterisk.
For that you need edit logger.conf
I need a help on my asterisk project.
I have already set up an ivr for my company using asterisk.
server configurations are:
asterisk 10.0
digium TE121
E1 PRI from reliance communication india.
My problem is that when someone calls on my ivr number he/she will be diverted to a mobile/landline number as per the dtmf input they give.
When I redirect it to the landline number, the busy/noanswer state is detected perfectly and the dialstatus variable is being set. But when I redirect it to the mobile number, the busy state is not detected and Asterisk shows it as ringing until the dial timeout is reached.
The problem is that in India on landline numbers, the tones are defined by the international telecom authority and are given immediately. But on mobile numbers, the operator plays a voice file first instead of giving the busy tone. And then gives the busy tone after about 20 seconds. So Asterisk does not detect the busy tone on mobile numbers.
So if there is an technique or pathc to solve this problem, please let me know. Is there any solution using AFI/AMI scripting then it will be appriciated.
My ivr dialplan is as given below: I have changed the extention number for privacy issues.
exten => _2121212,1,GotoIfTime(10:00-19:00,mon-sat,*,*?2121212,2:2121212,4)
exten => _2121212,2,Background(ive1new)
exten => _2121212,3,WaitExten(15)
exten => _2121212,4,Playback(officehours1)
exten => _2121212,5,WaitExten(3)
exten => _2121212,6,Goto(3090700,4)
exten => 0,1,Dial(DAHDI/g2/<mobilenumber here>,30)
exten => 0,2,Goto(2121212-${DIALSTATUS},1)
exten => 1,1,Dial(DAHDI/g2/<mobilenumber here>,20,r)
exten => 1,n,Goto(2121212-${DIALSTATUS},1)
exten => 2,1,Dial(DAHDI/g2/<mobilenumber here>,20,r)
exten => 2,n,Goto(2121212-${DIALSTATUS},1)
exten => 3,1,Dial(DAHDI/g2/<mobilenumber here>,20,r)
exten => 3,n,Goto(2121212-${DIALSTATUS},1)
exten => 9,1,Goto(2121212,2)
exten => 2121212-NOANSWER,1,Dial(DAHDI/g2/<mobilenumber here>,20,r)
exten => 2121212-NOANSWER,2,hangup()
exten => 2121212-BUSY,1,Dial(DAHDI/g2/<mobilenumber here>,20,r)
exten => 2121212-BUSY,2,hangup()
exten => 2121212-CONGESTION,1,Dial(DAHDI/g2/<mobilenumber here>,20,r)
exten => 2121212-CONGESTION,2,hangup()
exten => 2121212-CHANUNAVAIL,1,Dial(DAHDI/g2/<mobilenumber here>,20,r)
exten => 2121212-CHANUNAVAIL,2,hangup()
You can do it with AGI
simply dial the number set a time out and check the dialstatus
is statis !=ANSWER
switch to another extension or DIAL another number
My understanding was that noises (including speech) before the busy signal would not matter much, so I wonder if the problem instead is that the busy tones are simply not the usual ones, but have a different pitch or timing, and thus are they not detected. I am pretty sure that happens with mobile providers where I live.
In the chan_dahd.conf file there is a variable called "busypattern" that you can fiddle with. I
I am using the asterisks. I want to transfer call using transfer application with h323 protocols. But I am not able to transfer call.
In the extensions.conf file I have added the following content.
exten => 118,1,answer()
exten => 118,n,set(__TRANSFER_CONTEXT=transfer)
exten => 118,n,saynumber(567)
exten => 118,n,wait(1)
exten => 118,n,transfer(H323/119)
exten => 119,1,answer()
exten => 119,n,saynumber(222)
exten => 119,n,hangup()
For anyone with a similar issue, sometimes transfer will not be possible if there is a mismatch with channel technology.
If one wants to use Transfer application
Transfer([Tech/]dest[|options]):
You must ensure that if TECH (SIP, IAX2, LOCAL etc) is used, only
an incoming call with the same channel technology will be transferred. If the incoming channel is SIP but you want to transfer to IAX it won't allow that.
What you are trying to do can be achieved with Goto command. Transfer is used to transfer calls to real devices/users but if you want to stick with that you can try:
exten => 118,n,transfer(Local/119#your_context)
or simply
exten => 118,n,transfer(Local/119)