Bookmark and Share
Check Google Page Rank Locations of visitors to this page
Click to get Free offers

Monday, June 16, 2008

Create VOIP application with PHP

Asterisk is the application library to use for voip appliaction with PHP.
Asterisk Dialplan Commands
Here is a list of all the commands that you can use in your Dialplan (extensions.conf). You can obtain your Asterisk's list of available applications at the CLI by typing "show applications" and "show application ".

Notes:
An alphabetical list can be found at the end of this page
Please only list applications integrated in the Asterisk releases or CVS versions, with notes about version where it is included. Third party add-ons is listed in a separate section.

General commands
Authenticate: Authenticate a user
VMAuthenticate: Authenticate a user based on voicemail.conf
Bridge: Connect two arbitrary callers (new in Asterisk v1.6)
ChannelRedirect: Redirect an existing channel to the dialplan
Curl: Allows for the retrieval of external URLs. Also supports POSTing. Deprecated in favor of CURL.
DUNDiLookup: Look up a number with DUNDi
Page: Page a mobile device (new in Asterisk v1.2)
SendDTMF: Sends arbitrary DTMF digits
SendImage: Send an image file
SendText: Send client a text message
SendURL: Send a client a URL to display
System: Execute a system command
Transfer: Transfer caller to remote extension
TrySystem: Execute a system command with always 0 returned
Wait: Waits for some time
WaitExten: Waits for some time for caller to dial a new extension
WaitForRing: Wait for Ring Application
WaitMusicOnHold: Wait, playing Music On Hold



Billing
ForkCDR: Fork The CDR into 2 seperate entities
NoCDR: Make sure asterisk doesn't save CDR for a certain call
ResetCDR: Reset CDR data
SetAccount: Sets account code
SetAMAflags: Set the channel AMA Flags for billing
SetCDRUserField: Set CDR User field
AppendCDRUserField: Append data to CDR User field

Call management (hangup, answer, dial, etc)
Answer: Answer a channel if ringing
Busy: Indicate busy condition and wait for hangup
ChanIsAvail: Check if channel is available
Congestion: Indicate congestion and wait for hangup
Dial: Place a call and connect to the current channel
DISA: DISA (Direct Inward System Access)
Hangup: Unconditional hangup
RetryDial: Place a call, retrying on failure allowing optional exit extension.
Ringing: Indicate ringing

Caller presentation (ID, Name etc)
CallingPres: Change the presentation for the callerid
LookupBlacklist: Look up Caller*ID name/number from blacklist database
LookupCIDName: Look up CallerID Name from local database
PrivacyManager: Require phone number to be entered, if no CallerID sent
SetCallerID: Set CallerID. Deprecated in favor of CALLERID.
SetCallerPres: Channel independent setting of caller presenation
SetCIDName: Set CallerID Name. Deprecated in favor of CALLERID.
SetCIDNum: Set only the Caller ID number (not name). Deprecated in favor of CALLERID.
SoftHangup: Request hangup on another channel
Zapateller: Block telemarketers with SIT

ADSI
ADSIProg: Load Asterisk ADSI Scripts into phone
GetCPEID: Get ADSI CPE ID

Database handling
DBdel: Delete a key from the database.
DBdeltree: Delete a family or keytree from the database.
DBget: Retrieve a value from the database. Deprecated in favor of DB.
DBput: Store a value in the database. Deprecated in favor of DB.
MYSQL: Perform various mySQL database activities
DBQuery: Execute predefined queries against MySQL Servers, and get the result back into the dialplan.
RealTime: Populate variables with details from database using RealTime
RealTimeUpdate: Update a field in a database using RealTime

See Asterisk database for more information.

Application integration
AGI: Executes an AGI compliant application
DeadAGI: Executes AGI on a hung-up channel
EAGI: Executes an AGI compliant application with sound channels
EnumLookup: Lookup number in ENUM
ExternalIVR: Executes an ExternalIVR generator
Macro: Macro Implementation
MacroExclusive: Only one channel at a time may call this macro, all others have to wait (1.4)
MacroExit: Exit the macro as if it had fully completed (1.4)
NoOp: No operation. Can print values to console for debugging.
Perl: res_perl is the mod_perl of Apache, only for Asterisk
PHP: res_php integrates PHP into Asterisk without AGI
Read: Read a variable with DTMF
TXTCIDName: Lookup caller name from TXT record
UserEvent: Send an arbitrary event to the manager interface

Control flow & timeouts
AbsoluteTimeout: Set absolute maximum time of call
DigitTimeout: Set maximum timeout between digits
Gosub: Jump to a subroutine and return (new in v1.2)
GosubIf: Conditional jump to a subroutine and return (new in v1.2)
Goto: Goto a particular priority, extension, or context
GotoIf: Conditional goto
GotoIfTime: Conditional goto on current time
Random: jump to a specified location based on a random probability
ResponseTimeout: Set maximum timeout awaiting response
Return: Return from a Gosub or GosubIf (new in v1.2)
StackPop: Remove a return address without returning (new in v1.2)
While: Start A While Loop - *1.2beta
EndWhile: End A While Loop - *1.2beta
ExecIf: Conditional exec - *1.2beta


String & variable manipulation
ImportVar: Set variable to value
Math: Perform (rather simple) calculations. Deprecated in favor of MATH.
SetGlobalVar: Set variable to value. Deprecated in favor of GLOBAL.
Set: Set channel variable(s) or function value(s)
DBRewrite: Execute perl compatible regular expression and substitution out of a MySQL Database.

Sounds: Playback
Background: Play a sound file while waiting an extension
BackgroundDetect: Background a file with talk detect
ControlPlayback: Play a sound file with fast forward, rewind and exit controls
DateTime: Say the date and/or time (Obsolete)
Echo: Echo audio read back to the user
Festival: Say text with the Festival voice synthesizer
Flite: Say text with the Festival Lite voice synthesizer (faster response than Festival)
Milliwatt: Generate a Constant 1000Hz tone at 0dbm (mu-law)
MP3Player: Play an MP3 sound file or stream
MusicOnHold: Play Music On Hold indefinitely
Playback: Play a sound file
Playtones: Play a tone list while executing other commands
Progress: Play early audio to the caller before answering the line
SayUnixTime: Say the date and/or time
SayAlpha: Say Alpha
SayDigits: Say Digits
SayNumber: Say Number
SayPhonetic: Say Phonetic
SetMusicOnHold: Set default Music On Hold class
SetLanguage: Change language setting for sound playback
StopPlaytones: Stop playing a tone list

See Asterisk sound files for more information.

Sounds: Recording and monitoring (listening-in)
ALSAMonitor: Monitor the ALSA console
ChangeMonitor: Change monitoring filename of a channel
ChanSpy: Universal channel barge-in
Dictate: Records and plays back a dictation
ExtenSpy: Listen/whisper to a specific extension (new in 1.4)
MixMonitor: Record and mix call legs natively (unlike Monitor) v1.2.x
Monitor: Record a telephone conversation to a sound file
Record: Record user voice input to a file
StopMonitor: Stop monitoring a channel
StopMixMonitor: Stop monitoring a channel monitored with MixMonitor
SIP commands
SIPdtmfMode: Change DTMF mode during SIP call
SIP_HEADER(): Pick any header from a SIP invite message (replaces by SIPGetHeader)
SIPAddHeader: Add header to outbound SIP invite


ZAP commands
Flash: Flashes a Zap Trunk
ZapBarge: Barge in (monitor) Zap channel
ZapCD: ISDN call deflection (bristuff)
ZapEC: Echo cancellation on/off (bristuff)
ZapSendKeypadFacility: Send digits out of band over a PRI
ZapRAS: Provide ISDN data service
ZapScan: Scan Zap channels to monitor calls

See Asterisk zap channels, zapata.conf for more information.

Voicemail and conferencing
Directory: Provide directory of voicemail extensions
HasNewVoicemail: Conditionally branches to priority + 101
MailboxExists: Checks if mailbox exists
MeetMe: Simple MeetMe conference bridge
MeetMeAdmin: MeetMe conference Administration
MeetMeCount: MeetMe participant count
MiniVM: Mini-Voicemail (new in v1.6)
VoiceMail: Leave a voicemail message
VoiceMailMain: Enter voicemail system
VMAuthenticate: Authenticate a user based on voicemail.conf

See voicemail.conf for more information.

Queue and ACD management
AddQueueMember: Dynamically adds queue members
AgentCallbackLogin: Call agent callback login
AgentLogin: Call agent login
AgentMonitorOutgoing: Record agent's outgoing call
ParkAndAnnounce: Park and Announce
ParkedCall: Answer a parked call
PauseQueueMemeber: Pauses an agent
Queue: Queue a call for a call queue
RemoveQueueMember: Dynamically removes queue members
UnpauseQueueMemeber: Resumes an agent

Alarm Monitoring/Central Station
AlarmReceiver: Emulate an Ademco Contact ID Alarm Receiver

Amateur Radio/Repeater Linking
Rpt: Support Amateur Radio and Commercial Two Way Repeater Linking

External applications (not in the CVS)
Asterisk app_dbodbc: Dialplan modifiers using unixODBC
DynExtenDB: Store extensions in database
Iconv: Convert character sets.
LDAPget: Retrieve a value from a LDAP directory server
app Prepaid: Designed for Postgres
PPPD: PPP daemon connector
Asterisk cmd Backticks: Store shell command result to asterisk variable
Asterisk cmd ASR - professional, multi lingual speech recognation for Asterisk
Asterisk cmd Vxml - professional, VoiceXML interpreter for Asterisk

Bristuff application
All of those are part of the Bristuff asterisk patch.
PickUp: Mostly channel independent.
PickUpChan: Pick up the specified channel
PickupSIPuri
PickDown: Hang up on a remotely ringing call
Steal: Take over a bridged call (leg)
Devstate: Generate a device state change event (inuse, busy, ringing ...)
Segfault: Crash Asterisk with segfault
ZapCD: ISDN call deflection
ZapEC: Enable or disable echo cancellation for Zap
ZapInband: Inband call progress (pre-answer)
Autoanswer: Autoanswer a call for a specified extension
AutoanswerLogin: Login to the autoanswer application


vISDN applications
VISDNOverlapDial()

Applications for Sirrix channels
SrxEchoCan: Disable/enable Echo Cancellation
SrxDeflect: Deflect an incoming call
SrxMWI: Set / reset MessageWaitingIndication (MWI) on a Sirrix group

go to http://www.voip-info.org/wiki/index.php?page=Asterisk+-+documentation+of+application+commands
for details.
View blog reactions

No comments: