How to make a change in the VoiceMail Asterisk 11 - asterisk

New to asterisk, and have to support an old installation. If I need to change the voicemail options, is the only way to change the ./usr/local/src/asterisk/apps/app_voicemail.c file?
After changing it, how would I go about it?
This is what I gathered from my research:
You need to run:
./configure
make menuconfig (and adjust the settings to match your current system)
make
make install
all as root
I am also horrible at Linux, so can someone enlighten me on the process to change VoiceMail config ?

app_voicemail have no settings for changing options.
You can rewrite it using AGI or can rewrite source code. Both will be offtopic here(not one page).
Here is all options you can control without coding:
pro-sip*CLI> core show application VoiceMail
-= Info about application 'VoiceMail' =-
[Synopsis]
Leave a Voicemail message.
[Description]
This application allows the calling party to leave a message for the specified
list of mailboxes. When multiple mailboxes are specified, the greeting will be
taken from the first mailbox specified. Dialplan execution will stop if the
specified mailbox does not exist.
The Voicemail application will exit if any of the following DTMF digits are
received:
0 - Jump to the 'o' extension in the current dialplan context.
* - Jump to the 'a' extension in the current dialplan context.
This application will set the following channel variable upon completion:
${VMSTATUS}: This indicates the status of the execution of the VoiceMail
application.
SUCCESS
USEREXIT
FAILED
[Syntax]
VoiceMail(mailbox[#context][&mailbox[#context][&...]][,options])
[Arguments]
options
b: Play the 'busy' greeting to the calling party.
d([c]): Accept digits for a new extension in context <c>, if played during
the greeting. Context defaults to the current context.
g(#): Use the specified amount of gain when recording the voicemail
message. The units are whole-number decibels (dB). Only works on supported
technologies, which is DAHDI only.
s: Skip the playback of instructions for leaving a message to the calling
party.
u: Play the 'unavailable' greeting.
U: Mark message as 'URGENT'.
P: Mark message as 'PRIORITY'.

Related

Multiple CDR records Asterisk 13

Running Asterisk 13.12.1, FreePBX 13.0.192.19.
We had to install new server and since we previously used much older asterisk, there were some fixes applied. We DIDN'T update previous, but we made clean install, just copied dialplans, sip config etc.
The problem is that we are now having multiple CDR records per call. We previously had NOCDR lines for local contexts, and we tried I have tried to change those to exten => _X!,1,Set(CDR_PROP(disable)=1) but that didn't work at all.
Here is the example:
[main context]
exten => remote-mon-1,1,Dial(SIP/lokal300&SIP/lokal301&Local/06xxxxxx#shift-remote-1&Local/06xxxxxx#shift-remote-2&Local/06xxxxxx#shift-remote-3&Local/06xxxxxx#shift-remote-4&Local/06xxxxxx#shift-remote-5&Local/06xxxxxx#shift-remote-6,,m(remote)M(whoanswered,remote))
[shift-remote-1]
exten => _X!,1,Set(CDR_PROP(disable)=1)
exten => _X!,n,Dial(SIP/gsm10/${EXTEN},540)
Basically what the above does is calling two local phones (300 and 301) as well as multiple (6) remote mobile phones via gsm gateway.
1) So CDR PROP is completely ignored (I think someone said how its not working with Local context but I need confirmation). How can I fix it?
2) Any other ideas how to avoid creating multiple CDR record for each call?
Thank you!
Update: As this was flagged as a duplicate of Asterisk 13.4 cdr engine is creating 2 records per call , I need to explain that In that question the solution is applying unofficial patch, which is not something we want to do. I was looking for official approved way on why CDR_PROP is not working correctly. Furthermore (I just checked) the link to patch in that post is not working, as site is unreachable. One more reason to not flag this as duplicate.
1) use NoCDR, not forget add '/n' to local channels
pro-sip*CLI> core show application NOCDR
-= Info about application 'NoCDR' =-
[Synopsis]
Tell Asterisk to not maintain a CDR for this channel.
[Description]
This application will tell Asterisk not to maintain a CDR for the current
channel. This does *NOT* mean that information is not tracked; rather, if the
channel is hung up no CDRs will be created for that channel.
If a subsequent call to ResetCDR occurs, all non-finalized CDRs created for the
channel will be enabled.
NOTE: This application is deprecated. Please use the CDR_PROP function to
disable CDRs on a channel.
[Syntax]
NoCDR()
[Arguments]
Not available
[See Also]
ResetCDR(), CDR_PROP
2) Read /etc/asterisk/cdr.conf params.

Find out the transport request of an application

I Have created a application, in SAP ABAP and also I have generated a request number for that application, no I have forgot which is my request number since there are many requests in development server.
So, can someone help me how I can find out my request number, from my application.
Either you start transaction SE10, if necessary enter your user name (should be there by default) and hit Enter. You'll get a complete list if your transports, you just have to find the one, you need.
Or you start the transaction where you developed your application (you did not specify, if it is a program than SE38 or SE80, if it is a function module than SE37, SE24 for classes, etc (however in SE80 you can see everything)) enter the program name and go to menu: Goto / Object directory entry, a popup comes up, now click the button 'Lock overview'. Another popup comes up and tells you, which transport contains your object.
Steps to Identify all the request numbers of an object/application.
Open 'SE38'.
Provide your object/application name.
Click on 'Display Button'.
In the Menu bar click on 'Utilities'.
Click on 'Versions' --> 'Version Management'.
Now we can find all the request numbers of that object/application.

Trigger a script in a FreePBX Distro when arbitrary call is picked up

I am using Asterisk 13.17.0 on a FreePBX 14.0.1.1 distro. I would like to execute a python script whenever a call gets picked up, regardless of whether it is an internal or external one, passing to it as command line parameters the number who's calling and the user who's picking it up. How could I modify my dialplan in order for this to be done? I've tried modifying the [app-pickup] extension in /etc/asterisk/extensions_additional.conf, but picking up an internal call with this modification was to no avail
You should check diall command params, especial G param
https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_Dial
G( context^exten^priority ) - If the call is answered, transfer the calling party to the specified priority and the called party to the specified priority plus one.
context
exten
priority
In freepbx you can change dial params in settings tab.
You also SHOULD NOT ever touch extensions_additional.conf, it even have warning on top of file. File will be rewrited every time you change config. You have do changes in extensions_custom.conf

Playback a file to both sites of a call by DTMF request

I want to play a sound file to both call legs whenever the caller clicks a DTMF,
I used asterisk features so if the caller clicks the dtmf 6 a sound file will be played to both call legs, The problem is asterisk features only allow the feature to run on one side of the call: self OR peer,
I tried configuring 2 features with the same DTMF like that:
features.conf:
[applicationmap]
PlaySound6p => 6,peer/peer,Playback,tt-monkeys
PlaySound6s => 6,self/peer,Playback,tt-monkeys
but the playback of tt-monkeys works only 1 time, here is the log:
-- Feature Found: PlaySound6p exten: PlaySound6p
-- Playing 'tt-monkeys.slin' (language 'en')
writting asterisk features show command returns:
Dynamic Feature Default Current
--------------- ------- -------
PlaySound6s no def 6
PlaySound6p no def 6
It appears asterisk doesn't fire 2 features when they are configured on the same DTMF,
Anyone knows a way this can be done?
Thanks,
Rami.
Only one feature can be fired by digit.
Digits will be "consumed" and not go after that.
However you can start on that digit one or more OTHER call, each one you can connect to this channel by ChanSpy or audiohooks and whatever you want.

execute command after asterisk confbridge recording is finished

I'm trying to find answer how to make Asterisk execute some command (my script) after confbridge's recording is finished
There is the next info in confbridge.conf:
record_conference=yes
Records the conference call starting when the first user enters the
room, and ending when the last user exits the room.
It records file well but I want it sending wav file via email.
Could anybody help me?
My config now looks like this (if it's necessary):
exten => 333,1,ConfBridge(100010,100010_bridge_profile,100010_user_profile)
Dialplan scripting is limited to events relating to each call channel. To get event info for other parts of asterisk (such as the ConfBridge application) you should hook into the Asterisk Manager Interface (AMI).
There are many libraries already created to make working with the AMI easier. (That site may be outdated. Refer to the official Asterisk Wiki whenever possible.)
The AMI event you're interested in is "ConfBridgeEnd". Docs here.
You can use h-extension after confbridge, in which you have check if confbridge still active(last user).
If yes, run your script via System call.

Resources