I have merged two PRI lines i.e now we have 60 channels on one span.Is there any extra configuration required for itOr we can continue with basic configuration?
Just set same group for both pri with statment like
group=0
After that dial like
exten =>_X,1,Dial(DAHDI/g0/${EXTEN},,r)
There are alot of examples available
http://www.voip-info.org/wiki/view/Asterisk+ZAP+channels
Related
My call records are getting store in /var/log/asterisk/cdr-csv/Master.csv file. i want to limit the number of call to be stored ni this file, after that it should start form the beginning,
so for this what could be procedure
You can't limit number of records by asterisk
But you easy can rotate files by using logrotate linux utility.
For that you should create file /etc/logrotate.d/asterisk_cdr
/var/log/asterisk/cdr-csv/*csv {
missingok
rotate 5
size 2000k
create 0640 asterisk asterisk
}
For more info see documentation for logrotated
I'm using the parameter m(mymusic) in my call to Dial() to let the caller hear some music instead of the boring ring tone. However I'd like to have a different music file after some time. The time when the music changes should easily be changeable (by editing a variable), so it is no option to just create a music-on-hold-file which has X seconds of music 1 and then Y seconds of music 2.
What I want is basically this, but without a second Dial() and without an actual second call to ${device}, because that creates two "missed call" entries for one missed call, and it interrupts the phone's ring tone.
Set(time_until_new_music=20);
Dial(${device},${time_until_new_music},gm(music1));
if ( "${DIALSTATUS}" == "NOANSWER" ) {
Dial(${device},,m(music2));
}
Is this possible somehow?
Hold class can have unlimited number of different sound file of any length
Number of musiconhold classes also unlimited. So you can create your own set for every need
However you can't control from dialplan class info. You can use external steaming app and forward to that app param you need. Require expert level in both asterisk and linux.
Something like this may work:
s,1,Set(time_until_new_music=20)
s,2,Dial(${device},${time_until_new_music},gm(music1))
s,3,GotoIf($[${DIALSTATUS}=NOANSWER]?s,4:s,5)
s,4,Dial(${device},,m(music2))
s,5,Hangup()
I need a solution to this problem. When I dial through one PRI line x having group g0.
dial(DAHDI/g0/9xxxxxxxxx,35,rt)
and if that particular PRI is down(suppose signal is not down but not able to dial)for some reason, then how to re route and dial this number through another PRI. So that the dial does not fail.
You can put pri into groups using dahdi.conf, just set both pri to same group number
You also can use DIALSTATUS variable and GotoIF in dialplan to do hunting by dialplan(described in any asterisk book)
I have trouble with playing multiple sound files (.wav) in .call files.
I pass a lots of sound files in variable (SetVar: Sound=custom/1_Messages0201&custom/20c&...)
The problem is string size. When size is smaller than 240 characters, all sound files play correctly. All files after 240 th character are trimmed, and appears error
pbx_spool.c: Syntax error at line 10 of /var/spool/asterisk/outgoing/333.call
I was reading for limitation for dial string lenght
Note: Up until and including Asterisk 1.2 the length of the Dial string cannot exceed about 240 characters (any exceeding characters will be truncated). This limitation has been removed in Asterisk 1.4, unless you have set LOW_MEMORY in the compile options.
Is there any way to remove this limitation, or to increase dial string size.
Maybe anyone can suggest me any other better idea.
Asterisk version:
Asterisk 11.2.1 built by root # ip-XX-XXX-XXX-XXX on a x86_64 running Linux
Dial plan:
exten => 123,1,AGI(monitor.php,outgoing,Outgoing_UNLIMITED,${CALLERID(num)},${EXTEN},Set(CALLERID (num)=XXXXXXXXX))
exten => 123,1,Dial(SIP/6845987568/${EXTEN:0},30,T)
exten => 123,2,Set(CDR(userfield)=${NumberDialed})
exten => 123,3,Playback(${Sound})
Call file:
Channel: SIP/XXXXX/XXXXXX
CallerID: XXXXXXX
MaxRetries: 2
RetryTime: 15
Context: XXXXXX
Extension: 123
Priority: 1
Account: XXXXXX
SetVar: Sound=custom/1_Messages0201&custom/20c&custom/i&custom/1om&custom/March&custom/2c&custom/hiliadi&custom/i&custom/13of&custom/godina&custom/1_Messages0202&custom/3c&custom/3c&custom/3c&custom/3c&custom/3c&custom/3c&custom/3c&custom/3c&custom/1_Messages0203&custom/200c&custom/50c&custom/i&custom/6c&custom/leva&custom/i&custom/70c&custom/i&custom/8c&custom/stotinki&custom/1_Messages0204
SetVar: NumberDialed=XXXXXXXX
After call file fire you ALSO will have same issue in your dialplan(it also have limit). Playback application is not designed to play alot of different files. If you need do that, you have do that by dialplan.
You can send it like this:
Setvar: file_max=2
Setvar: file1=custom/1_message
Setvar: file2=custom/2_message
After that use asterisk's dialplan to play files one-by-one. For example like this:
exten => 123,3,Set(i=0);
exten => 123,n(loop),Set(i=$[ ${i} + 1 ])
exten => 123,n,GotoIF($[ $i > ${file_max} ]?exit)
exten => 123,n,Playback(${file${i}})
exten => 123,n,Goto(loop)
exten => 123,n(exit),Noop(end)
Note, there will be alot of other issues with this task, i recomend you check opensource dialler code like vicidial or hire expert.
My solution to this problem is to set a "campaign" call variable, and then define the various "campaigns" in a DB. I then use a DB look up in the dial plan to get the list of sound files. I have my DBGet Ruby script return two values; a "more files" flag and a list of up to ten sound files. I loop the DBGet and keep playing sets of file to the customer as long as the "more files" flag is true.
It works like a charm. And keeps the call files -much- easier to read.
I'm trying to make a conference and play a sound file in the background of the conference. How can I make this possible?
this obviously wouldn't work because the sound file will be played before entering the conference.
exten => s,1,playback(some/soundfile)
same => n,confbridge(1)
Thanks in advance!
Wanted to add my solution here in case anyone ever needs it.
first make a context for the conf bridge in extensions.conf:
[conf-msg]
exten => s,1,ConfBridge(01)
where 01 is the bridge number
Then via the command line you can do:
asterisk -x 'channel originate local/s#conf-msg application Playback file'
Its really as simple as that.
You have create new call,simple method using call files.
http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out
After that you have place one of call legs to your conference like this
Channel: Local/1111#conference
Application: Playback
Data: some/soundfile
Where conference is context to get to ur conference room.
No need do spy or somethign like that,that is wast of time/cpu
See here for a similar question:
Asterisk- How to 'whisper' music using ChanSpy(), or any alternative?
Basically, you want to add a participant that points to a local channel (as above, only enter the channel instead of spying), play your sounds, then hangup.
Same answers, but for many confBridge:
In extension.conf:
[autobridge]
exten => _X.,1,ConfBridge(${EXTEN})
Then, like tgwaste's answer, you could initiate message into conference room 1234, by using originate:
originate local/1234#autobridge application Playback en_US/tt-monkeys
from console or a manager connection,
Or as arheops's answer suggest, by adding a file in outgoing spool dir:
printf "Channel: Local/%d#autobridge\nApplication: %s\nData: %s\n" \
1234 Playback sound/file >/var/spool/asterisk/outgoing/f-$RANDOM
from anything at filesystem level ( with correct permissions, could be shared! :-).