Friday, October 29, 2010

Asterisk Bootable CDROM

Boot and run Asterisk from a bootable CDROM.
Variable information (config files, network settings, etc) are typically stored on a USB Flash drive or floppy.
There are many Live CD Linux distributions that use this model. The well known being http://www.knoppix.org/.

Asterisk Live CD distributions
AdminsParadise VoIP CentOS based LiveCD including PBX(Asterisk) + CallingCard(A2Billing) + FreePBX + Hylafax + Avantfax Amatix InstantPBX Debian based LiveCD including PBX(Asterisk) + CallingCard(A2Billing) Amatix Office Debian based LiveCD/USB providing email, calendar, contacts, telephony (ISDN, VoIP), instant messaging and presence. Integrates Asterisk and Openfire into eGroupWare. AstBill and Asterisk Live CD AstBill Live CD contains AstBill-0.9.0.13, Asterisk 1.2 and MySQL 5.0.15 based on DSL and Knoppix. Asterisk Live! ( Asterisk on CD-ROM, especially suited for use in Germany: http://www.asterisk.de.ms/ ) <= Asterisk 1.0, last update in 2004! asterLive LiveCD based on Debian Etch (x86) and includes zaptel and bristuff drivers (Debian Etch kernel 2.6.18-6) made from the ZaKoTel Debian Etch packages of Asterisk AstLinux PBXware CD delivery method is easy to install. It takes few minutes to install the firmware which includes all software and applications needed. This method is recommended for customers with no Linux experiance since CD installation is a trully plug and play. Celliax LiveCD, with a working installation of Celliax (Asterisk + chan_celliax and configuration utilities) based on Knoppix. The Celliax LiveCD contains also all is needed to run Celliax on Windows: the cygwin installer and the tgz with the asterisk-celliax stuff to be untarred in a basic cygwin installation. CosmoPBX is a Live CD released under GNU/GPL by VoIP-OutSourcing.com based on Knoppix and includes latest Asterisk 1.4 and Asterisk-GUI <= last update in 2007 kasterx Knopsterisk "From PC to PBX in 4 Minutes!" ST-PBX Live Asterisk 1.2 and Debian on a Live CD, with posibility to install to harddrive. Slast Asterisk 1.4 and Slax. Easy to customize for demos and emergencies Medianix "FreePBX" (Unlike what the name suggests, this live CD does not use FreePBX). A liveCD based on both Debian and Morphix with latest asterisk 1.4, asterisk-gui and more, all packaged for debian sid (packages and repository also available). This is a free version of the Medianix LiveCD, a commercial one with many improvements and ad-hoc written software will be available soon. Unlimitel PBXonCD - Complete Asterisk CD with Ultra Fast Web Management Interface. This LiveCD is free but it can only connect with Unlimitel's VoIP network in Canada. If you need a LiveCD Asterisk system to be use in Canada, this is it. A commercial version including the hardware is also available for a complete IP-PBX solution. Xorocm Rapid Live CD - Complete Asterisk System in 3 Minutes!
Some of the distributions listed above may have also have the ability to install and run from a harddrive.
Asterisk

Asterisk cmd Set

Sets variable to value

Version differences:
This command is not available in Asterisk 1.0.9. Use SetVar instead.
As of v1.2 SetVar is deprecated and we are back to Set.
As of v1.4 the use of Set() to set multiple variables at once and the g flag have both been deprecated. Please use multiple Set() calls and the GLOBAL() dialplan function instead.
As of v1.6 only if you have a corresponding "compat" setting, then Set() does not strip surrounding quotes from the right hand side as it did previously.


 Set(variablename=value|options]) (starting with Asterisk 1.4)
 Set(variablename=value[|variable2=value2][|options]) (up to and including Asterisk 1.2)

This application can be used to set the value of channel variables or dialplan functions. It will accept up to 24 name/value pairs upto Asterisk 1.2, but only one name/value pair in Asterisk 1.4 or later.
When setting variables, if the variable name is prefixed with _ the variable will be inherited into channels created from the current channel. If the variable name is prefixed with __ the variable will be inherited into channels created from the current channel and all children channels.
Next to the Set() command there is also the SET function available.

g: set a global variable (valid in the entire dialplan, not just the channel)   exten => 100,1,Set(GLOBAL(FOO)=456)

extensions.conf:
; If clearglobalvars is not set, then global variables will persist
; through reloads, and even if deleted from the extensions.conf or
; one if its included files, will remain set to the previous value.
;
clearglobalvars=no

Note that Set() changes behaviour in Asterisk 1.6 which can be controlled via asterisk.conf:

 [compat]
 app_set=1.6

If (and only if), in /etc/asterisk/asterisk.conf, you have a compat category, and you have app_set = 1.6 under that, then the behavior of this app changes, and does not strip surrounding quotes from the right hand side as it did previously.

 Set(numTries=4)
 Set(CALLERID(number)=000000)
 Set(CALLERID(name)="The Name")
 Set(NIGHTMODE=1,g) ; set a global variable

To increment a variable, you can use:

 Set(total=$${total} + 1)

To set inherited variable:

 Set(_CALLID=${UNIQUEID})
 Set(__CALLID=${UNIQUEID})

NOTES:
Variable names are not case sensitive. Each channel gets its own variable space. There is no chance of collisions between different calls, and the variable is automatically trashed when the channel is hangup. Make sure you do not put spaces around the equals sign in the assignment. Set(numTries = 4),with a space on either side of the "=", will set numtries to "". If trying to zero out the CALLERID(name) do not use empty quotes, use Set(CALLERID(name)=)
Try using the variable in your dialplan:

 Playback(${variablename})
 SayDigits(${variablename})


Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ

Aksys Networks



KONNECT Office Phone System - A small business phone system (1-30 phones) that doesn’t require a PBX, server or hosted service. It supports multiple locations seamlessly without additional hardware.

KONNECT Business Phones - IP Phones that are designed to run on a SIP-based PBX (eg. Asterisk, trixbox, PBX in a flash). It offers tight integration with advanced PBX features like Visual Voicemail, Call Parking, Call Recording, SLA, BLF, etc.


Phones connect Peer-2-Peer without need for a PBX or other hardware System offers both VoIP and Analog capabilities Offers Key Telephone System experience with VoIP capabilities Full feature-set that SMBs want to have Simple to configure multi-site capabilities without need for VPN


IP Phone ready to use with any SIP-based PBX (eg. Asterisk) Can deliver Key Telephone System functionality Proprietary SIPSTIM scripting allows for quick custom application development Survivability for Hosted implementations using analog as failover

 



Thursday, October 28, 2010

Asterisk func set

 SET assigns a value to a channel variable  ${SET(=[])}
Might be useful to assign the value of a complex expression to a variable, while still using that value to evaluate still another expression.
Returns the value set  Set(one=${SET(two=${SET(three=${SET(four=0)})})})

Sets variables ${one}, ${two}, ${three}, and ${four} to 0.

 GotoIf(${SET(DB(sw/provider)=$[!0${DB(sw/provider)}])}?provider1:provider2)

Alternates between provider1 and provider2 (for load distribution). Please note that for Asterisk versions before 1.4.37 and 1.6.2.13 as well as 1.8.0 you will most probably have to remove the 0 from the line above (due to an extensions.conf parser fault).


Asterisk High Availability Solutions

Ways to increase system availability and balancing: HAAST from GenerationD www.GenerationD.com offers high availability / clustering for your existing Asterisk servers. A software based solution, High Availability ASTerisk (HAAST) offers rapid automatic failover, manual promote/demote for maintenance, a command line interface, a telnet interface, and a web based interface. Supports master-slave failover, load-balanced, hot-standby, warm-standby modes. Installation is straight forward, with no external hardware required. Real-time fail-over takes 10 seconds to complete. HAAST is a commercial solution, in use at call centers and other high-uptime environments.
DNS SRV on the CPE side but not all phones handle this.
SARK-HA from Aelintra Telecom offers High Availability Asterisk out-of-the box. Runs Aelintra's SARK UCS MVP Asterisk implementation on a pair of servers.... Real-time failover takes less than 20 seconds to complete. Setup requires only 4 additional data fields to filled out in the SARK globals panel. Illustrated set-up guide HERE.
Ranch Networks offers High Availability White_Paper_one_one_HA.pdf solution for Asterisk. This is Hardware based solution. (Just for two asterisks boxes).
Flip1405 Manages virtual IP between two Asterisk servers and queries UDP5060 for state changes Downtime less than 30 seconds Only 2 dependencies (nmap and arping) Incredibly easy to setup
SERVERware is a next generation communication technology solution. Delivers a wide range of IP services and applications. It is redundant, high available and fault tolerant. The SERVER edition of SERVERware is the most economical way to start delivering IP service from a single server. This edition includes all the necessary components that allow service providers to offer any of the supported VPS templates with a clear path upgrade to network edition. NETWORK edition of SERVERware contains up to 256 host servers creating a farm of virtual private servers from which IP service delivery platform is served. This allows service providers to offer redundant, flexible and scalable IP services like mail, web, hosted PBXes etc... Commercial
sysMONIT is a high availability hosts failure detection module that implements small and simple daemon running on each host, sending signaling UDP packets, for purpose of efficient detection of hosts failures, and taking over services by another spare hosts.
Failover switches to automatically switch connections (T1, Ethernet, etc.) to a backup system. Vovida has a SIP load balancer. This allows several Asterisk servers to be setup and appear to be a single server to users. Other load balacing approaches involve the SER SIP proxy, UltraMonkey (see below) or simple DNS round-robin. And then there's also app_distributor as third party application or app_random. there are a lot of bugs and the last version was released in 2002

Use the Linux-HA software to provide high-availability (HA) failover on programmed conditions - by default node hang or crash. Linux-HA also has many telephony-oriented HA APIs as defined by the Service Availability Forum (SAF). It also provides sub-second failover, and works well with shared disk or without. It is commonly used with the DRBD package to provide HA with no single point of failure, and no special hardware requirements.
Stratus, which as been making high-end continuous processing systems for 20 years, has just added an under $10,000 Linux based continuous processing solution: Stratus ftServer T Series Systems


QueueMetrics is able to monitor clustered call-centers with the load distribuited over a number of Asterisk servers as if they were one big single box.
OrderlyStats - Dedicated Real Time Call Centre Management and Statistics Package, can monitor single or clustered asterisk servers from a single page.
Overview
The following is a brief HOWTO for installing High-Availability Asterisk using Open Source tools combined with fail-over capable & intelligent hardware (the fonebridge).
The heartbeat utility is used in a 'Passive-Active' scenario but could easily be modified to do 'Active-Active'.

Background
Some of our more demanding customers in the Call Center and Banking Industry are loathe to accept an implementation with no mechanism for fail-over and high-availability so this is the hardware/software combination we are using to meet their demands.

Client Background
The following scenario was used for a medium sized call center operation with about 60 analog stations, and a single T1 PRI.

Hardware
2 x 1U Supermicro Servers (P4, 512Mb, Dual Gig Eth, Dual SATA with RAID 0) 1 x Redfone Quad T1 fonebridge to terminate PRI connectivity, power channel banks and provide fail-over capability between the two Supermicros. 1 x T1 PRI 3 x Adtran 750 FXS channel banks to drive analog phones 2 x UPS/Surge Protectors
Software
Fedora Core 4 Asterisk, zaptel, libpri from CVS head Linux HA software suite from Ultramonkey. They have RPMs for RHE3 that install fine on Fedora Core 4 Each server is a mirror image of the other in terms of Asterisk configs and software.
Software Install
After a standard install of FC4, Asterisk, zaptel, libpri we installed all of the packages from Ultramonkey pretty much following their guidelines: http://www.ultramonkey.org/3/installation-rh.el.3.html
You may have a few dependencies issues, mainly perl libs, but we were able to satisfy all of them by using Yum. If you are running Apt you should be able to accomplish the same thing.

Configuring Hearbeat
After installing heartbeat there are only three files that need to be modified for your environment. They are ha.cf, haresources and authkeys. They should all be placed in the /etc/ha.d/ directory. The files should be absolutely identical on all machines that are part of your Asterisk high-availability cluster. We only have two servers running but you could easily scale to more using the exact same configurations. These are our config files. All comment lines have been removed but as you can see they are short and simple.

ha.cf
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility local0
keepalive 200ms
deadtime 2
warntime 1
initdead 120
udpport 694
bcast eth0
node asterisk1
node asterisk2

haresources
asterisk1 10.10.10.110 fonulator asterisk

authkeys
auth 1
1 sha1 SuPerS&cretP@$$werd

Operation
Each Asterisk server has a unique IP address which is part of the LAN segment. This could be a NATed network or Internet facing with public IP addresses. Heartbeat manages the monitoring of the hardware state of each machine over Ethernet or serial port or a combination of both (recommended) and assigns the Virtual IP to the Asterisk server which is currently in an active state. Example;

Asterisk1= 10.10.10.100
Asterisk2= 10.10.10.120
Virtual IP= 10.10.10.110 (see haresources)

With Heartbeat it is important that your node names are identical to the host names reflected in #uname -n. You also may need to manually add IP/hosts statements to your /etc/hosts file so each machine knows how to reach the other via IP.

Following the rules in haresources, Heartbeat will assign machine name asterisk1 as the primary server when both systems start up. It will then start the following scripts; fonulator (this is the little script that configures the fonebridge) and asterisk which starts the Asterisk server. These are both standard startup scripts placed in /etc/init.d/ .
If the Primary server suffers a hardware fault or simply stops responding to the heartbeats going between the two nodes asterisk2 will execute /etc/init.d/fonulator start to reconfigure the fonebridge on the fly and begin redirecting traffic to asterisk2 followed by /etc/init.d/asterisk start to start the Asterisk server.

Results
With heartbeat, IP takeover occurs in under a second. The fonulator utility re-configures the fonebridge in just about the same amount of time and then depending on your hardware platform and the complexity of apps running in Asterisk it can take between 5-15 seconds for Asterisk to start up on your secondary server, load all config files, clear alarms and be ready to process calls. Total fail-over time about 15-20 seconds.

Resources
Ultramonkey http://www.ultramonkey.org (High Avail software packages)
Linux HA http://www.linux-ha.org (The High Availability Linux Project)
Redfone http://www.red-fone.com (Maker of the Quad T1/E1 fonebridge)


This tutorial, presented by Open Innovation, aims at presenting a robust cluster architecture to assess reliability based on Open Source software (Postgres, Pgpool, Csync2, ....) and native IP phone features by avoiding complex and expensive common cluster approaches. This solution currently is up and running to serve all business VoIP traffic (800 IP phones) of one of the most used credit card in Italy.
The tutorial is in PDF format and can be downloaded here: A reliable architecture for Asterisk Cluster
Overview
Use standard Ubuntu/Debian packages to create an Active/Passive high-availability solution for asterisk 1.4 using hearbeat 1.0 (and FreePBX) and using SIP (not redphone/PRI/analog/etc). Note: Use Debian server, do not use Ubuntu server until RAID-1 issues are solved (perhaps Ubuntu Intrepid?).

Background
Many ISP's are now providing "Dynamic T1" instead of (or in addition to) standard T1-PRI service. This "Dynamic T1" just means that they are providing highly prioritized VOIP/SIP between your customer site and them across a T1 (or other highspeed connection). So, it is now more and more possible to get cheaper service using VOIP only without T1-PRI and get very similar call quality. This solution deals with Debian/Ubuntu, but also the special issues that are raised with heartbeat when connecting to the upstream provider via SIP. Many clients want failover support to "seal the deal".

Issues
Heartbeat "takes over" an IP address by adding an "alias" to an interface IN ADDITION to an IP that must always be there so that heartbeat can communicate. For a PBX type install that is not behind a NAT, with no upstream SIP proxy (OpenSer), an alias will be added to BOTH the WAN interface and the LAN interface. Asterisk will need to bind to both the LAN and WAN to operate. Unless you do some routing/proxy magic outlined in this solution, you will run into trouble because asterisk will put the wrong SRC/VIA address in IP/SIP packets. This will cause problems upstream, because your ISP/SIP provider may authenticate based on IP and you will be appearing to send packets from the wrong IP. This will cause problems in the LAN for similar reasons.

Software Install
apt-get install asterisk
apt-get-install heartbeat

Heartbeat Config Generally
See the configuration info in the "Redfone" HOWTO above this one generally. I'm using the 10.10.10.0 addresses from above and 77.77.77.0 as a WAN address in my examples. I'm assuming that the shared LAN address is 10.10.10.110 and the shared WAN address is 77.77.77.110. Asterisk1 server's "other" WAN IP is 77.77.77.100. For sake of example: Asterisk2 machine has 77.77.77.120.

haresources
asterisk1 10.10.10.110 77.77.77.110 fixrouting asterisk

Routing fixes
For each interface to which Asterisk binds it gets the IP address by doing a routing lookup. If you look at 'ip route show' and the look after the word 'src' you will see which IP will be used for that interface (also look at 'ip route get'). It will put this IP into VIA headers and send all IP/UDP/SIP packets from this IP. When this server is primary we need to fix the routing so that all packets on LAN look like they are coming from the 'shared' IP of the two servers for the LAN... AND.. (for multi-homed) we need to fix the routing for the WAN interface also.

The 'fixrouting' script detailed below needs to be /etc/init.d/fixrouting
#! /bin/sh -e
set -e

case "$1" in
   start)
ip route change 10.10.10.0/24 src 10.10.10.110 dev eth0
       ip route change 77.77.77.0/24 src 77.77.77.110 dev eth1
   ;;
 stop)
       ip route change 10.10.10.0/24 src 10.10.10.100 dev eth0
       ip route change 77.77.77.0/24 src 77.77.77.100 dev eth1
   ;;
 force-reload|restart)
   $0 stop
   $0 start
   ;;
 *)
   echo "Usage: /etc/init.d/fixrouting {start|stop|restart|force-reload}"
   exit 1
   ;;
esac

exit 0

Results
When a failover happens that makes this server primary the "shared" IPs will be taken over and then the routing fix will make sure that all packets look like they are coming from that IP in asterisk. When this server fails or becomes secondary IPs will be released and the routing fix will set things back to the Passive state so that the Active machine might still be able to communicate with it (and avoid IP conflicts). The current solution I have uses UltraMonkey ( http://www.ultramonkey.org ) for load-balancing and failover and it works like a champ. There are obviously a lot of details there, and I'd be happy to detail them if people are interested. There is also a site that has two clusters with uniform reachability for all phones and PRIs. None of this requires a lot of dialplan tuning on a day-to-day basis.
Asterisk

Asterisk cmd SendText

Send text to the client on the connected channel.


This application accepts a text string as argument and attempts to send it to the calling client via the sendtext function of the channel driver.


See the channel driver documentation for support of text. In Asterisk SIP, for example, sendtext is implemented via the SIP MESSAGE method, sending payload data in the signalling messages with content type text/plain. This means any SIP phone that implements the SIP MESSAGE method should be supported.


The application does not encode characters in any special way, it simply passes the given text buffer to the channel driver service routine.


 WARNING16710 pbx.c: No application 'SendText' for extension (XXXX, YYYY, 1): 
 load app_sendtext.so in modules.conf


Note: You could consider to use Dial() with the 'M' option to call SendText() upon a successful connect. This way SendText() might be used also on outbound calls, not only on inbound ones.

New in Asterisk 1.8: SendText is now implemented in chan_gtalk and chan_jingle. It will simply send XMPP text messages to the remote JID.
 exten => 123, 1, Answer
 exten => 123, 2, SendText(hello world)
 exten => 123, 3, HangUp

NOTE: The Answer step at priority 1 is needed, since the channel need to be established before anything can be sent on it. Look at auto-answer mode on your phone, possibly together with an Asterisk .call file (or SIPSAK) to send text messages from a remote device or process.

Asterisk does not have a ReceiveText() dialplan application, however here is how you can send and receive text using an AGI script:

 print STDERR "1.  Testing 'sendtext'...";
 print "SEND TEXT \"hello world\"\n";
 my $result = ;
 &checkresult($result);


 print STDERR "2.  Receiving Text 'receivetext'...";
 print "RECEIVE TEXT 3000\n";
 my $result = ;
 &checkresult($result);

When 123 (see example above) is called on a SNOM phone, you should hangup and the Message Waiting Indicator lamp will start blinking. The screen will indicate "SMS". Press the SMS softkey (snom190) or the Message button (snom 320/360) and the screen will display the message, shown to originate from 123. On the snom 320 you have 2x24 characters minus the Caller ID/ Called extension to display the message; scrolling is not possible. Apparently the snom 190 show the sms only if it is less than 9 char long.

See the SNOM FAQ entry for more on this topic.


Firmware 7 The XML Minibrowser is now also implemented for SNOM 320 and 300 (next to 370 and 360).
Firmware 4.0 & 4.1 Now it works even the SIPSAK option "-O desktop", just set the phone settings "Support broken registrar" to "on" and "Long SIP-Contact (RFC3840)" to "off" and "Refer-To Brackets" to "off". but off course it will only work after the call is answered. If you don't want this use SIPSAK via System() or TrySytem() in Asterisk to send a message.
Firmware 3.60r: Partial success together with Asterisk 1.0.2bristuffed and a SNOM line set to auto-answer mode: Depending on the line's SIP setting "Support broken registrar" the SNOM 360 will either reply with "404 Not Found" (broken registrar OFF) or "200 Ok" (broken registrar ON) in combination with Asterisk's SendText() application. SIPSAK also works, but only when the option "-O desktop" is not used.
Firmware 3.60i: Although above example gives the desired result of displaying the message, the recent revisions (3.60i) of SNOM phone firmware have a protocol bug, they sent a misformulated 200 OK response back to the server.
Firmware 3.56y: The snom200 phone does not implement receiving a MESSAGE request within a dialog. It returns a "501 Not Implemented" message, although you can send out-of-dialog MESSAGE requests successfully.

With chan_sccp2 version 20051019 SendText is supported. Create a custom SIP header with SIPAddHeader and carry your text within, read it it with SIP_HEADER Use the IAX2 patch 7619 that can carry variables from Asterisk to Asterisk In case of two Asterisk boxes connected through an analog line: Use SendDTMF and Read and encode your text as DTMF - for a related (non-Asterisk) solution check out MF TeleType Use Asterisk's SMS application to send and receive short messages

Wednesday, October 27, 2010

Sipsak



sipsak is a small comand line tool for developers and administrators of SIP applications. It can be used for some simple tests on SIP applications and devices.
sending OPTIONS request sending text files (which should contain SIP requests) traceroute (see section 11 in RFC3261) user location test flooding test random character trashed test interpret and react on response authentication with qop supported short notation supported for receiving (not for sending) string replacement in files can simulate calls in usrloc mode uses symmetric signaling and thus should work behind NAT
Available for Linux, BSD & Win32 SIPr: Open source SIP application testing framework (pronounced as "SIPPER") SIPp: Load testing tool Open Source VOIP Software

Tuesday, October 26, 2010

Asterisk sip progressinband


 progressinband=yes

When "RING" event is requested, always send 180 Ringing (if it hasn't been sent yet) followed by 183 Session Progress and in-band audio

 progressinband=no

Send 180 Ringing if 183 has not yet been sent establishing audio path. If audio path is established already (with 183) then send in-band ringing (this is the way asterisk historically behaved because of buggy phones like polycom)

 progressinband=never

Whenever ringing occurs, send "180 ringing" as long as "200 OK" has not yet been sent. This is the default behaviour of Asterisk.

Note that inband progress is not usually desired, because it requires extra Asterisk resources to run a generator to generate the inband ringing. If the endpoint is generating its own, then there is no need to tell Asterisk to do it.

Once '183 Session Progress' is sent, it is not useful to send '180 Ringing' any longer... the 183 message informs the endpoint that future progress indications for this session will be provided inband via the audio stream. Most (if not all) SIP endpoints would ignore any 180 received after a 183 anyway.

WARNING!!
        to get inaband audio on asterisk 1.6.2.x sometimes need to do prematuremedia=no  also. if prematuremedia=yes(default), inband  not work

Q: I use 2 ISDN channels with a with a fritz! card and the junghanns capi drivers. The problem appears with SIP to ISDN calls.
The SIP 180 ringing message doesn't appear because the ISDN PBX sends the "ALERT" message in-band (channel B), and not in the D channel. So Asterisk doesn't know when the ISDN channel is ringing. With my configuration Asterisk can not understand the in-band signalling for the capi channels, is it possible to use "in-band" signallisation for capi channels?

A: I guess that's "Early Media Connect", i.e., if the phone supports that (not all do), the channels get bridged just after dial completed, (SIP 183), and what you hear is the remote ring tones (from your telco), not locally generated (as if it received SIP 180 Ringing).

Go back to Asterisk config sip.conf

Saturday, October 23, 2010

Asterisk Paging and Intercom

On legacy phone systems you can find the following kinds of paging: Dial a code to connect to a separate overhead paging and announcement system (like in an airport) Dial a code and connect directly to a built-in one-way announcement speaker on one or more phones Dial a code and connect directly to a built-in two-way announcement and talkback function on one or more phones
Some overhead paging systems also provide a talkback system so that the person being paged can just speak to respond. Background noise issues limit where this feature can be used. The talkback function is usually setup to be hands free. That means that the person responding to the page does not need to take any action other then speaking.

New in Asterisk 1.2: The new dialplan command Page utilizes MeetMe to page one or more phones.

New in Asterisk 1.8: A new RTP engine and channel driver have been added which supports Multicast RTP.
The channel driver can be used with the Page application to perform multicast RTP paging. The dial string format is:

 MulticastRTP///

Type can be either basic or linksys. Destination is the IP address and port for the RTP packets. Control address is specific to the linksys type and is used for sending the control packets unique to them.

There is also another system available since many years, the best one, combining paging and intercom. Here the talback system is limited to only one phone. The paging is done in one way mode through a group of phones, and the person being paged can respond pressing a digit to switch the nearer phone to two-way mode, simultaneously hanging-up all other phones speakers.
This mode combine the best of the two world, eliminate the noise problems, and keep the communication private as soon as the paged person pressed the right digit on a phone.
It should be possible to implement this mode on Asterisk with a managed conference and a feature map application.

Multicasting begin to be supported at all major phones manufacturers, Aastra firmware v2.2, Snom v7, Linksys,... allow the setting of a multicast listening address. This will permit to reduce the generated trafic for an extensive paging.

If a phone is in use when a page arrives, some systems can do a "whisper page" so that only the person being paged can hear the page.

SIP phones for the most part don't support any of these phone based paging functions. If a SIP phone offers an Auto Answer function, you can approximate limited paging intercom functionality. The phones most often mentioned supporting this are:


There is an 'allpage.agi' now available at http://aussievoip.com.au/allpage.agi. Documentation is available in the file. This should work with Snom and Grandstream GXP2000 phones (and possibly budgettones if they roll the changes across) with firmware greater than 1.0.13 (not publically available at time of writing, due out in October 2005)

Intercom DOES work with the Snom 200 as the mailing list link above shows. Tested on 12/20/04 with firmware 2.04g on Snom 200. One change for that posting is that the variable called in the dialplan must read "_VXML_URL" instead of "VXML_URL". Howeverr, the 'correct' way of doing Paging/Intercom is with SipAddHeader. See allpage.agi for example code.

Some analog phones have an Auto Answer function. These phone are often used in door phone systems.

ADSI phones can be configured to Auto Answer if sent the right set of signals. For information on how to do this, contact http://www.sayson.com.

Some older analog answering machines have a remote intercom function that can be used for overhead paging. Examples:

For overhead paging, you can make an Asterisk Extension go to the sound card, and wire its output to a traditional external paging system. You can also get boxes to interface an phone FXO or FXS port directly to a sound system. Examples:


Another possiblity for overhead paging is using hallway speakers that have a direct VOIP connection. Examples:


Another way to automate this is with Backticks. Someone has posted a method of using Backticks and shell scripts to dial all phones automatically. Another method for overhead paging is to solder a cable, with an RCA jack(or whatever you need), directly to the speaker of a phone that provides auto-answer. This cable can be connected directly to your amp or sound sytem used for paging.

Setting up paging with a sound card

You can use the Grandstream Budgetone phone mentioned above, it even has a round punch-out that can be used to run your cable through. Using the Grandstream as interface to the paging system is a low-cost solution that has a proven track record. With a total investment of $80 for the phone, wire, and connectors you can have a basic paging system at your office. A second unit at a remote office or warehouse makes it easy to have paging across the street, or on the other side of the world.
open up the phone and splice a connector jack in place of the builtin speaker. You can use a female RCA jack or a mini-stereo jack. jack can easily be mounted in the side of the case and used to connect to a traditional paging amplifier or amplified computer speakers. the reboot process as outlined on Asterisk phone grandstream budgetone works quite well for keeping these phones registered on the Asterisk. We've set them to reboot every four hours and have enjoyed over six months without a single user complaint. The Grandstream GXP-2000 would also work well for this- it has a 3.5mm audio jack built in. I have also read that the new redesigned BT100 series also has a headset jack.
The Grandstream GXP-2000 works very well for overhead paging. You can punch down on a 66 block a 3.5mm jack cable which then connects to your paging system. With the four sip accounts you can customize paging for different departments by having a different ring tone configured. I have this connected to an older Valcom 9970 Single Zone unit and two Handytone 488 attached to two 9 Zone Valcom 1109RTVAs. The 1109RTVA unit accepts your dtmf 0-9 (0 all call) to determine which zone to page. I can now page across the VPN to other buildings. Make sure you set the HT-488 FXO Port PSTN Silence Timeout to 10 seconds instead of 60 for paging. This reduces lockups. Also change FAX mode from t38 to Pass Thru. This is firmware 1.0.3.44 bootloader 1.0.8.11 - diver We have worked with Grandstream to develop a dial plan example that lets you use both the built-in paging function as well as a dedicated prefix method for intercom Asterisk Intercom/Paging with Grandsteam (Revised for GXP-21xx Series Phones) 10-22-2010 - BEZ(zktech)
Asterisk | Asterisk Configuration | Channel Configuration | Configuration for Specific Phones

Asterisk Grandstream Paging

(Revised for GXP-21xx Series Phones) 10-22-2010

Here is an example of two paging methods that can be used from the Grandsteam GXP-20XX and GXP-21XX series.

These methods can be extended to do many paging tasks. Our favorite is using the GXP-XXXX intercom button to trigger a meetme session with all the extensions in an office.

The first method uses the Paging function in the phone.
This is the most natural and allows you to use the phones built-in feature.
You select your line and hit the OK (GXP-2000) button or the MENU (GXP-20XX,GXP-21XX) button
This puts the phone into paging mode then you dial the extension.

The second method is to prefix the extension with an * character.
This is was the traditional method offered by Grandstream on their site, I have provided them with the first method and they are working on a white paper using the first method.

This example was written to run on Asterisk 1.4.x
(We have run modified version with 1.6.x and 1.8.x as well, on 1.8 you must modify the ChanIsAvail it appears that jumping has been dropped.)
Will post a more up to date 1.8.x version when we get ready to go production. - BEZ (zktech)

[Ext-IN]
exten => _2XXX,n,Set(l_Exten=${EXTEN})
exten => _2XXX,n,Set(l_IsPaging=${SIP_HEADER(Call-Info)})
exten => _2XXX,n,GotoIf($["${l_IsPaging}"="answer-after=0"]?callInterCom|1)
exten => _2XXX,n,Goto(Internal,${EXTEN},1)

exten => _*2XXX,1,Set(l_Exten=${EXTEN})
exten => _*2XXX,n,Goto(callInterCom,1)

exten => callInterCom,1,Macro(CoreExtPage,SIP/${l_Exten})

Please note: The s2 line has been modifed for full RFC compliance: This is requried for GXP-21XX series phones. It is backwards compatiable to the GXP-20XX series phones.

[macro-CoreExtPage]
exten => s,1,ChanIsAvail(${ARG1}|js) ; j is for dump and s is for ANY call
exten => s,2,SIPAddHeader(Call-Info: \;answer-after=0)
exten => s,3,NoOp() ; Add others here
exten => s,4,Dial(${ARG1}|j)
exten => s,5, Hangup
exten => s,105,Hangup

- BEZ (zktech) http://www.zktech.com

Please note this Grandstream link is based on the old version of our examples but may be of some help.
Grandstream Paging PDF

Adhearsion

Adhearsion is a new way to write voice-enabled applications. It's not just an API or library — it's a fully-featured framework, the first of its kind, designed for maximal code reuse and intuitiveness. The name "Adhearsion" is a combination of "adhesion" and "hear" because Adhearsion shines best when integrating technologies with voice. Supports both the AGI and AMI interfaces of Asterisk.

Adhearsion is a framework for building Ruby based VOIP applications on Asterisk. Adhearsion uses the "Ruby on Rails" database object relational mapper that maps Ruby objects directly to database tables. Adhearsion also maps Ruby objects to Asterisk internal variables giving your application almost total control over call processing.

# This is an example dialplan.rb file which# would handle how calls are processed by# Asterisk. This is all completely valid Rubyinternal { case extension when 100...200 callee = User.find_by_extension extension unless callee.busy? then dial callee else voicemail extension when 111 then join 111 when 888 play weather_report('Dallas, Texas') when 999 play %w(a-connect-charge-of 22 cents-per-minute will-apply) sleep 2.seconds play 'just-kidding-not-upset' check_voicemail end}

Asterisk config iax.conf

In iax.conf you configure the Inter-asterisk ( IAX ) connections.
The configuration of iax.conf is well documented in the Asterisk handbook. From the sample IAX.CONF in the distribution:

Further user sections may be added, specifying a context and a secret used for connections with that given authentication name. Limited IP based access control is allowed by use of "permit" and "deny" keywords. Multiple rules are permitted. Multiple permitted contexts may be specified, in which case the first will be the default.

You can also override caller*ID so that when you receive a call you set the Caller*ID to be what you want instead of trusting what the remote user provides.

There are three authentication methods that are supported: md5, plaintext and rsa. The least secure is "plaintext", which sends passwords cleartext across the net. "md5" uses a challenge/response md5 sum arrangement, but still requires both ends have plain text access to the secret. "rsa" allows unidirectional secret knowledge through public/private keys. If "rsa" authentication is used, "inkeys" is a list of acceptable public keys on the local system that can be used to authenticate the remote peer, separated by the ":" character. "outkey" is a single, private key to use to authenticate to the other side.

Public keys are named /var/lib/asterisk/keys/.pub while private keys are named /var/lib/asterisk/keys/.key. Private keys should always be 3DES encrypted.


The follow codecs are valid for the allow/disallow parameter:
g723.1 gsm ulaw alaw g726 slinear lpc10 adpcm g729 speex ilbc h261 h263 all
With notransfer=yes you can prohibit Asterisk from stepping out of the media path and connecting the two endpoints directly to each other. This, of course, effects your call detail records (CDR) and billing information.
Note: This is quite similar to the sip.conf setting canreinvite=no

This has been changed in 1.4 to transfer=yes, options are yes no and mediaonly


Alternatively you can directly set the bit vlues:

 tos=0x18   ; where the tos bits are set individually and in combination

For example

  tos=0x10 = low delay
  tos=0x08 = high throughput
  tos=0x04 = high reliability
  tos=0x02 = ECT bit set
  tos=0x01 = CE bit set

or set multiple bits, such as

  tos=0x18 

to set both low delay and high throughput.

Please see:


Although IAX channel details (username, secret, etc.) can be written explicitly into each dial string in extensions.conf, dial strings can be simplified/clarified by storing all of this information in the iax.conf file and then simply referencing by the channel name:

 Dial(IAX2//)

For example, to call IAXtel you can create an entry in iax.conf like this:

[iaxtel-outbound]
type=peer
username=
secret=
peercontext=iaxtel
host=iaxtel.com

Then use a Dial command of:

 exten => _1700XXXXXX,1,Dial(IAX2/iaxtel-outbound/${EXTEN})

Note: The "peercontext" setting is only available in Asterisk CVS as of 2004-06-26.

Needs updating: added to wiki Oct14, 2004 Directive Value General Peer User

For the most up to date list of directives supported by your version of Asterisk, check the source code for your version. In the file channels/chan_iax2.c, look for the functions named build_user, build_peer, and set_config. They contain directive names supported in the type=user, type=peer, and [general] sections of iax.conf, respectively. You don't have to be able to understand C to find the directive names, either; they're quite obvious. The information you find in the source will be more accurate than any list you're likely to find on a wiki page.


register => my_user:secret@host

[my_iaxprovider]
type=peer
auth=md5
notransfer=yes
host=IP
disallow=all
allow=gsm
allow=ulaw
allow=alaw
qualify=yes
trunk=yes

[my_user]
type=user
auth=md5
notransfer=yes
disallow=all
allow=gsm
allow=ulaw
trunk=yes
secret=XXXX
context= (context in extensions.conf where i want recive the incoming call)

N.B. Outbound calling in extensions.conf

exten =>_X.,1,Dial(IAX2/my_user:secret@my_iaxprovider/${EXTEN})

Register commands to connect to another IAX server has to be in the [general] section of iax.conf. To set up IAX in trunk mode, add "trunk=yes" to your definition in iax.conf. IAX Trunking needs support of a hardware timer. See Asterisk timer for more information. Do not use both "host=dynamic" and "defaultip=111.222.333.444", make sure it is just one or the other (see bugs 558 and 673). If you do not use IP-based access control for all of your type=user entries, and you expect your Asterisk installation to be reasonably secure, your iax.conf file must contain a "guest" entry with no secret specified. When a remote system connects to yours, it can connect without specifying a username (that is, connect anonymously). If you have a type=user section which does not specify a secret, Asterisk will allow them to connect with any secret specified in the file. This means that if you have a large number of type=user entries but no guest entry in iax.conf, someone only has to guess any one of your secrets to connect to your server as that user. In other words, they do not need to know both the username and the secret; the secret alone is enough! Asterisk gives preference to a secretless user for anonymous incoming connections, though, so the inclusion of such a section will solve this problem. For more information on IAX authentication within Asterisk, see Asterisk IAX authentication. Add a last entry in iax.conf with no password to force anonymous calls into a specific context. If you use realtime, don't have any user without a password and without permit/deny. Use the general option mailboxdetail=yes for details and the number of waiting voicemails. Works with most IAX phones like the AT-320 or softphones If you have "update_registry: Restricting registration for peer 'xxxxxx' to 60 seconds (requested 1200)", you can add maxregexpire=1300 to the [general] section.

For troubleshooting IAX calls, turning on IAX debugging output can be very useful. In Asterisk 1.4 or later, the CLI command 'iax2 set debug on' turns on debugging output. In Asterisk 1.2, use 'iax2 debug' to enable IAX debugging output, and 'iax2 no debug' to turn it back off again. See also: Asterisk IAX authentication
Turn on iax debugging and see as which user the incoming call is trying to connect. You will probably need to have a type=user section which does not specify a secret= line. Check your context= lines. The first context= line listed in that section will be used if the call doesn't request a specific context.
See also: Asterisk No authority found
Turn on iax debugging. Check if the username of the incoming call exists as section name (the text in square brackets) in iax.conf. Note: it is not sufficient to have this specified only in a username= line; username= is used for outbound (i.e., type=peer) connections only. Note that this section will typically have type=user, though type=friend will also work.
if you get
Nov 2 15:58:47 ERROR[823]: chan_iax2.c:4040 handle_call_token: Call rejected, CallToken Support required. If unexpected, resolve by placing address 192.168.1.1 in the calltokenignore list or setting user iaxhorst requirecalltoken=no
Since AST-2009-006 there is a check for a call token performed. Older clients (e.g. Asterisk 1.2 before 1.2.35) don't support call tokens, so there is a parameter

per peer or
calltokenoptional = 192.168.1.0/255.255.255.0
per subnet.
Asterisk | Asterisk Configuration | IAX Channels

Asterisk Cisco CallManager Integration

Why integrate Cisco CallManager and Asterisk?
Features: Asterisk provides features that CallManager by itself does not. Migration: Allow a gradual migration from a closed source PBX to open source PBX.
There are two ways to accomplish this: Using H.323: In CCM Asterisk appears as a H.323 Gateway. Using SIP (only in CCM 4.X+): Open up the CallManager Administration web page. Since a SIP trunk requires MTP, make sure you have one: Service -> Media Resource -> Media Termination Point Normally your CallManager server should appear there if you do an empty query if not, go to the CallManager Serviceabilty web page, and activate the Cisco IP Voice Media Streaming App service Select Device->Trunk from the menu. Image
Select the "Add a New Trunk" link from the upper right hand corner of the "Find and List Trunks" page. Image
Select "SIP Trunk" as the "Trunk type" and "SIP" as the "Device Protocol". Click on the "Next" button. Image
Enter a name in the "Device Name". Valid characters are letters, numbers, dashes, dots (periods), and underscores. The device name is only used internally in Call Manager so it can be anything you want. Enter a description in the "Description" field. Select a device pool. Enter the IP address of your Asterisk server in the "Destination Address" field. Select "UDP" as the "Outgoing Transport Type". Modify any other settings as needed for your ((CiscoCallManager|CallManager) installation. Click on the "Insert" button. Add route patterns in CallManager that send calls to Asterisk using the SIP trunk that you just created. In sip.conf:

[callman01]
type=friend
context=incoming
host=10.0.0.1
disallow=all
allow=ulaw
allow=alaw
nat=no
canreinvite=yes
qualify=yes

[callman02]
type=friend
context=incoming
host=10.0.0.2
disallow=all
allow=ulaw
allow=alaw
nat=no
canreinvite=yes
qualify=yes

It is important to use "qualify" in sip.conf since Call Manager does not support registration for SIP trunks.

Here is a simple example of how to send calls to Call Manager in extensions.conf:


[macro-dialout-callmanager]

exten => s,1,ChanIsAvail(SIP/callman02&SIP/callman01)
exten => s,2,Dial(${CUT(AVAILCHAN||1)}/${ARG1})
exten => s,3,Hangup

exten => s,102,Congestion

[outgoing]

exten => _XXXX,1,Macro(dialout-callmanager,${EXTEN})
exten => _9NXXXXXX,1,Macro(dialout-callmanager,${EXTEN})
exten => _91NXXNXXXXXX,1,Macro(dialout-callmanager,${EXTEN})

exten => i,1,Congestion

Cisco Call Manager Express 3.3

CCME can be configured as follows:

Configure a dial-peer pointing to your asterisk server on the CCME 3.3 router:

dial-peer voice 13 voip
destination-pattern 22..
session protocol sipv2
session target ipv4:10.0.0.1
dtmf-relay rtp-nte
codec g711alaw

And configure asterisk exactly the same as above for Call Manager 3.2, except for voicemail to work add:


Into your sip.conf entry.

Cisco Call Manager 6.1

It' very simitar to 4.1, but you must change the UDP protocol of sip in this menu:

System > Security Profile > SIP Trunk Security Profile

Outgoing Transport Type: UDP

CM6SIPTrunkSecurityProfile2.jpg

Here is the step by step guide for h323 trunk to cisco call manager.
(valid for both for asterisk and trixbox)

First of all do this:

cp /etc/asterisk-1.2.8-samples/ooh323.conf /etc/asterisk
amportal stop
amportal start

Then apply the followings as stated.

A- Here is my working ooh323.conf file;

; Objective System's H323 Configuration example for Asterisk
; ooh323c driver configuration
;
; general section defines global parameters
;
; This is followed by profiles which can be of three types - user/peer/friend
; Name of the user profile should match with the h323id of the user device.
; For peer/friend profiles, host ip address must be provided as "dynamic" is
; not supported as of now.
;
; Syntax for specifying a H323 device in extensions.conf is

For Registered peers/friends profiles
; OOH323/name where name is the name of the peer/friend profile.
;

For unregistered H.323 phones
OOH323/ip:port OR if gk is used OOH323/alias where alias can be any H323
; alias
;
; For dialing into another asterisk peer at a specific exten
; OOH323/exten/peer OR OOH323/exten@ip
;
; Domain name resolution is not yet supported.
;
; When a H.323 user calls into asterisk, his H323ID is matched with the profile
; name and context is determined to route the call
;
; The channel driver will register all global aliases and aliases defined in
; peer profiles with the gatekeeper, if one exists. So, that when someone
; outside our pbx (non-user) calls an extension, gatekeeper will route that
; call to our asterisk box, from where it will be routed as per dial plan.

general
;Define the asetrisk server h323 endpoint

;The port asterisk should listen for incoming H323 connections.
;Default - 1720
port=1720

;The dotted IP address asterisk should listen on for incoming H323
;connections
;Default - tries to find out local ip address on it's own
bindaddr=10.1.23.101

;This parameter indicates whether channel driver should register with
;gatekeeper as a gateway or an endpoint.
;Default - no
gateway=no

;Whether asterisk should use fast-start and tunneling for H323 connections.
;Default - yes
;faststart=no
;h245tunneling=no

;H323-ID to be used for asterisk server
;Default - Asterisk PBX
h323id=ObjSysAsterisk
e164=100

;CallerID to use for calls
;Default - Same as h323id
callerid=asterisk

;Whether this asterisk server will use gatekeeper.
;Default - DISABLE
;gatekeeper = DISCOVER
;gatekeeper = a.b.c.d
gatekeeper = DISABLE

;Location for H323 log file
;Default - /var/log/asterisk/h323_log
;logfile=/var/log/asterisk/h323_log

;Following values apply to all users/peers/friends defined below, unless
;overridden within their client definition

;Sets default context all clients will be placed in.
;Default - default
context=default

;Sets rtptimeout for all clients, unless overridden
;Default - 60 seconds
;rtptimeout=60 ; Terminate call if 60 seconds of no RTP activity
; when we're not on hold
rtptimeout=3
;do not drop this below 3 nor increase much...other wise
;you will not able to call same number again for some time because
;it hangs.Now 3 seconds waiting is needed and it is acceptable.

;Type of Service
;Default - none (lowdelay, thoughput, reliability, mincost, none)
;tos=lowdelay

;amaflags = default

;The account code used by default for all clients.
;accountcode=h3230101

;The codecs to be used for all clients.Only ulaw and gsm supported as of now.
;Default - ulaw
; ONLY ulaw, gsm, g729 and g7231 supported as of now
disallow=all ;Note order of disallow/allow is important.
allow=gsm
allow=ulaw
allow=g729
allow=g723

; dtmf mode to be used by default for all clients. Supports rfc2833, q931keypad
; h245alphanumeric, h245signal.
;Default - rfc 2833
dtmfmode=rfc2833

User/peer/friend definitions
; User config options Peer config options
; ------------------ -------------------
; context
; disallow disallow
; allow allow
; accountcode accountcode
; amaflags amaflags
; dtmfmode dtmfmode
; rtptimeout ip
; port
; h323id
; email
; url
; e164
; rtptimeout

;

;Define users here
;Section header is extension
myuser1
type=user
context=context1
disallow=all
allow=gsm
allow=ulaw

mypeer1
type=peer
context=context2
ip=a.b.c.d ; UPDATE with appropriate ip address
port=1720 ; UPDATE with appropriate port
e164=101

myfriend1
type=friend
context=default
ip=10.0.0.82 ; UPDATE with appropriate ip address
port=1820 ; UPDATE with appropriate port
disallow=all
allow=ulaw
e164=12345
rtptimeout=60
dtmfmode=rfc2833

B-here is the trunk configuration to cisco call manager;

Dial rules:8XXXX
custom dial string:OOH323/$OUTNUM$@10.8.23.5:1720

C-here is outbond routes

Route name:h323trunk
Dial rules:8XXXX
OOH323/$OUTNUM$@10.8.23.5:1720

D-For cisco call manager

first create a h323 gateway with asterisk ip
then create route patern and route to this gateway
be carefull abaout regions codecs because you must allow these codecs in oh323.conf as i stated in the beginning conf file.

Brothers i recommend you update your trixbox to version 1.2.3
as described in update trixbox section in that way your addon versions will be change and you will have more stable h323 trunk in long term.(you will just change addon versions in the upper part.)


FOR SER & TRIXBOX INTEGRATION FOLLOW THE LINK BELOW:
http://www.trixbox.org/modules/newbb/viewtopic.php?topic_id=7786&post_id=30904&order=0&viewmode=thread&pid=30735&forum=2#forumpost30904 Brothers,
The addons used in trixbox 2.0 and trixbox 1.2.3 are causing the asterisk crash...
saying core dumped...

here is the solution;
on trixbox 1.2.3 (NOT TRIXBOX 2.0 !!!);

STEP 1:DELETE CURRENT ADDONS RPM ;
rpm -qa | grep asterisk-addons

rpm -e asterisk-addons-1.2.4_1.2.12.1-1.294


STEP2:LOAD ADDONS VERSION 1.2.3

rpm -i asterisk-addons-1.2.3-1.219.i386.rpm

(i put in the link->http://n.domaindlx.com/ergenay/rpms/asterisk-addons-1.2.3-1.219.i386.rpm)(sometimes page is under load so try your chance.)
(also same link on "http://www.ergenay.com" alüminyum korkuluk )

amportal stop

amportal start

then it works perfect.

on trixbox 2.0 it is NOTworking whatever you do...
so STAY on 1.2.3 and DO rpm change if you are using "ooh323".

Friday, October 22, 2010

Asterisk config sip.conf

Configuration file for Asterisk SIP channels, for both inbound and outbound calls.

Starting with Asterisk v1.2.0: The global option "port" in 1.0.X that is used to set which port to bind to has been changed to "bindport" to be more consistent with the other channel drivers and to avoid confusion with the "port" option for users/peers. [tammari]type=friendcallerid="Tuomas Tammisalo" <1000>username=tammarihost=dynamicsecret=********regcontext=tammari-internalregexten=1005dtmfmode=rfc2833insecure=verycanreinvite=yesnat=yesqualify=yescontext=merus-sipphonepickupgroup=1callgroup=1mailbox=1000@defaultIn sip.conf under [general] add a register definition:

Format:
 register => user[:secret[:authuser]]@host[:port][/extension]

 or
 register => fromuser@fromdomain:secret@host

 or
 register => fromuser@fromdomain:secret:authuser@host:port/extension

See also: bug 14367 with a documentation fix for 1.6.

If you have problems with your network connection going up and down (e.g. an unreliable cable connection) and you keep losing your sip registry, you may want to add registerattempts and registertimeout settings to the general section above the register definitions. Setting registerattempts=0 will force Asterisk to attempt to reregister until it can (the default is 10 tries). registertimeout sets the length of time in seconds between registration attempts (the default is 20 seconds).

In case of DynDNS issues, for example with myasterisk.dyndns.org changing its IP, you might want to consider taking a look at ddclient to automate a "sip reload" in the CLI.

P.S. Note for sipgate.co.uk users: /extension must be your sipgate number (this is not true; I am using "99" --jrc) - define one to accept this in your extensions.conf. An alternate port does not seem to work with sipgate.co.uk unless it is defined as the bindport in sip.conf without the [:port] syntax.

; Register 2345@mysipprovider.com with authname 2345 at mysipprovider.com at sip provider as 1234 here: register => 2345:password@mysipprovider.com/1234 ; Register 1235@mysipprovider.com with authname 1235 and realm mysipprovider.com at proxyof.mysipprovider.com as s here. ; (as needed by budgetphone.nl): register => 1235@mysipprovider.com:password:1235@proxyof.mysipprovider.comuser is the user id for this SIP server (ex 2345) authuser is the optional authorization user for the SIP server secret is the user's password host is the domain or host name for the SIP server. This SIP server needs a definition in a section of its own in SIP.conf (mysipprovider.com). port send the register request to this port at host. Defaults to 5060 /1234 is the Asterisk contact extension. 1234 is put into the contact header in the SIP Register message. The contact extension is used by remote SIP server when it needs to send a call to Asterisk. See the example below. The default context extension is "s".
Agreed, it's not very good to have a lot of cleartext passwords in this text file, but that's how it works now.
You only need to register if a) you want to be called, and b) you appear to the other side as having a dynamic IP address. Check the success of your own server's registrations at the CLI with "SIP SHOW REGISTRY", whereas you can obtain a list of clients that registered with your server with the help of "SIP SHOW PEERS". You may examine all details of a peer's registration with "SIP SHOW PEER ". Enter "HELP SIP" at the CLI for additional commands.

The server definition for outgoing calls looks like this:

 [mysipprovider-out]
 type=peer
 secret=password
 username=2345
 host=sipserver.mysipprovider.com
 fromuser=2345
 fromdomain=fwd.pulver.com
 canreinvite=no
 insecure=very
 qualify=yes
 nat=yes
 context=from-mysipprovider ; this section will be defined in extensions.conf

In extensions.conf you'd then use a statement like this:

 exten => _9.,1,Dial(SIP/${EXTEN:1}@mysipprovider-out,30,r)

Please note that the ${EXTEN:1} variable here extracts all but the first characters from the current extension (the current match), in this case: 9 + the following digits. Refer to the Asterisk variables Substrings section for more details

Here is the section(in extensions.conf) which routes calls from our sip provider to where we decide:

 [from-mysipprovider]
 exten => 1234,1,Answer ; 1234 is the contact extension, default contact extension is "s"
 exten => 1234,2,Dial(SIP/111,25,Ttr) ; incoming calls are redirected to SIP telephone with number 111       
 exten => 1234,3,Hangup


[general]context = (own_context in extensions.conf where recive the call )realm = real.combindport=5060srvlookup=yesdisallow=allallow=ulawallow=gsmlanguage=entrustrpid = yes sendrpid = yes register => fromuser@fromdomain:secret@hostregister => XXXX@YYYY.com:AAAA@IP[my_provider]type=peerfromuser=XXXXfromdomain=YYYY.comcanreinvite=nosecret=AAAAAinsecure=veryhost= IP disallow=allallow=gsmallow=ulawallow=alawqualify=yesnat=no

Outbound call in extensions.conf exten => _X.,1,Dial(SIP/${EXTEN}@my_provider)The [general] section of sip.conf includes the following variables: allowsubscribe = yes|no : Allow or Ignore Subscribe requests allow = : Allow codecs in order of preference (Use DISALLOW=ALL first, before allowing other codecs) disallow = all : Disallow all codecs (global configuration) Asterisk sip allowexternaldomains = yes|no : Enable/Disable INVITE and REFER to non-local domains. Default yes. (New in v1.2.x). allowguest = yes|no : Allow or reject guest calls. Default is yes. (this can also be set to 'osp' if asterisk was compiled with OSP support). (New in v1.2.x). Asterisk sip allowoverlap = yes|no : Enable/disable overlap dialing support. Default yes. Autocreatepeer = yes|no : If set, anyone will be able to log in as a peer (with no check of credentials; useful for operation with SER). Default no. Asterisk sip autodomain = yes|no : Enable/disable Asterisk's ability to add local hostnames and local IP address to the domain list. externip or externhost are also taken into the domain list. Default no. (New in v1.2.x). bindaddr = IP_Address : IP Address to bind to (listen on). Default 0.0.0.0 (all network interfaces). bindport = Number : UDP Port to bind to (listen on). Used to be port in Asterisk v1.0.x. Default 5060. callerid = : Caller ID information used when nothing else is available. Defaults to asterisk. (The ability to override the default appears to available in Asterisk 1.0.9. Unsure about other versions.) canreinvite = update|yes|no|nonat (global setting): For some reason this defaults to yes, so beware... Asterisk sip checkmwi = Number : Global interval (in seconds) between mailbox checks. Default 10 seconds. (New in v1.2.x) Asterisk sip compactheaders = yes|no : Indicates Asterisk should send compact (i.e. abbreviated) headers in the SIP messages. Default no. (New in v1.2.x) context = : This is the default context and is used when a endpoint has no context property. The context in section of an endpoint is used to route calls from that endpoint to the wanted destination. The context body is located in extensions.conf. defaultexpiry= Number : Default duration (in seconds) of incoming/outgoing registration. Default 120 seconds. domain = domains : Comma separated list of domains which Asterisk is responsible for. (New in Asterisk 1.2.x) dtmfmode = inband|info|rfc2833 (global setting). Default rfc2833. Warning: inband very high CPU load. dumphistory = yes|no : Enable support for dumping of SIP conversation's transaction history to LOG_DEBUG. Default no. (New in v1.2.x) externip = IP_Address or a hostname : Address that we're going to put in SIP messages if we're behind a NAT. If a hostname is used as the value, then the IP address associated with the hostname is looked up only once during the reading of the sip.conf. If you want support for a hostname associated with a dynamic IP address, use Asterisk sip externhost. externhost = hostname.tld : (New in Asterisk 1.2.x) externrefresh = Number : Specify how often (in seconds) a hostname DNS lookup should be performed for the value entered in 'externhost'. Default 10 seconds. (New in Asterisk 1.2.x).
ignoreregexpire = yes|no : Indicates whether to use Contact information about a peer even if the information is stale because it has reached its expiration time. Default no. (New in v1.2.x) jbenable = yes|no : Enables the use of a jitterbuffer on the receiving side of a SIP channel. (Added in Version 1.4) jbforce = yes|no : Forces the use of a jitterbuffer on the receive side of a SIP channel. Defaults to "no". (Added in Version 1.4) jbmaxsize = Number : Max length of the jitterbuffer in milliseconds. (Added in Version 1.4) jbresyncthreshold = Number : Jump in the frame timestamps over which the jitterbuffer is resynchronized. Useful to improve the quality of the voice, with big jumps in/broken timestamps, usually sent from exotic devices and programs. Defaults to 1000. (Added in Version 1.4) jbimpl = fixed|adaptive: Jitterbuffer implementation, used on the receiving side of a SIP channel. Two implementations are currently available - "fixed" (with size always equals to jbmaxsize) and "adaptive" (with variable size, actually the new jb of IAX2). Defaults to fixed. (Added in Version 1.4) jblog = no|yes: Enables jitterbuffer frame logging. Defaults to "no". (Added in Version 1.4) language = : Default language used by any Playback()/Background(). limitonpeers = yes|no: If set to yes use only the peer call counter for both incoming and outgoing calls (ref. hints, subscriptions, BLF; added in 1.4) localnet = NetAddress/Netmask : local network and mask. fromdomain= : Sets default From: domain in SIP messages when acting as a SIP ua (client) insecure = very|yes|no|invite|port : Specifies how to handle connections with peers. Default no (authenticate all connections). (invite and port added in v1.2.x). maxexpirey = Number : Max duration (in seconds) of incoming registration we allow. Default 3600 seconds. musicclass = one of the classes specified in musiconhold.conf musdiconhold = same as musicclass nat = yes|no : Please note that as of Asterisk 1.0.x nat can now have the values: yes|no|never|route. Default no which really means to use rfc3581 techniques. notifymimetype = mediatype/subtype : Allow overriding of mime type in MWI NOTIFY used in voicemail online messages. Valid MIME types can be found here. Default application/simple-message-summary. (New in v1.2.x). notifyringing = yes|no : Notify subscription on RINGING state. Default yes. (New in v1.2.x). outboundproxy = IP_address or DNS SRV name (excluding the _sip._udp prefix) : SRV name, hostname, or IP address of the outbound SIP Proxy. (New in v1.2.x). outboundproxyport = Number : UDP port number for the Outbound SIP Proxy. (New in v1.2.x). pedantic = yes|no : Enable slow, pedantic checking of Call-ID:s, multiline SIP headers and URI-encoded headers. Default no. port = : Default SIP port of peer. (this is not the port for Asterisk to listen. See bindport). progressinband = never|no|yes : If we should generate in-band ringing always. Default never. promiscredir= yes|no : Allows support for 302 Redirects; (Note: will redirect them all to the local extension returned in Contact rather than to that extension at the destination). Default no. qualify = yes|no|milliseconds : Check if client is reachable. If yes, the checks occur every 60 seconds. Default no. realm = my realm (Change authentication realm from asterisk (default) to your own. Requires Asterisk v1.x) recordhistory = yes|no. Enable logging of SIP conversation's transaction history. Default no. (New in v1.2.x). regcontext = context : Default context to use for SIP REGISTER replies from the SIP Registrar. register => ::[authid]@/ :Register with a SIP provider registerattempts = Number : Number of SIP REGISTER messages to send to a SIP Registrar before giving up. Default 0 (no limit). (New in v1.2.x). registertimeout = Number : Number of seconds to wait for a response from a SIP Registrar before classifying the SIP REGISTER has timed out. Default 20 seconds. (New in v1.2.x). relaxdtmf = yes|no: Default no. rtautoclear = yes|no|number : Auto-Expire friends created on the fly. If yes the autoexpire will be in 120 seconds. Default yes. (New in v1.2.x). Buggy up to 1.4.19, see bug 12707 rtcachefriends = yes|no : Cache realtime friends by adding them to the internal list just like friends added from the config file. Default no. (New in v1.2.x). Buggy up to 1.4.19, see bug 12707 rtsavesysname = yes|no : If set will write the value of asterisk.conf (options) systemname to the sip peer table in the field "regserver". Useful for multi-server systems. (New in v1.?) rtpholdtimeout = Number : Max number of seconds of inactivity before terminating a call on hold. Default 0 (no limit). (New in v1.2.x). rtpkeepalive = Number : Number of seconds, when a RTP Keepalive packet will be sent if no other RTP traffic on that connection. Default 0 (no RTP Keepalive). (New in v1.2.x). rtptimeout = Number : Number of seconds, to wait for RTP traffic before classify the connection as discontinued. Default 0 (no RTP timeout). (New in v1.2.x). rtupdate = yes|no : Send registry updates to the database when using Realtime support. Default yes. (New in v1.2.x). sendrpid = yes|no : If a Remote-Party-ID SIP header should be sent. Default no. sipdebug = yes|no. Default setting for whether SIP debug is enabled upon loading of the sip.conf. Default no. (New in v1.2.x). srvlookup = yes|no : Enable DNS SRV lookups on calls. Default yes. (Default is no prior to v1.4.14) tos = : Set IP QoS parameters for outgoing media streams (numeric values are also accepted, like tos=184 ) trustrpid = yes|no : If Remote-Party-ID SIP header should be trusted. Default no. useclientcode = yes|no : If yes, then the Call Originator as stated in the CDR will be changed to whatever is specified in a X-ClientCode SIP Header. Default no. (New in v1.2.x) usereqphone = yes|no : Indicates whether to add a ";user=phone" to the URI. Default no. (New in v1.2.x) useragent = : Allow the SIP header "User-Agent" to be customized. Default asterisk. videosupport = yes|no : Turn on support for SIP video (peer specific setting added in SVN Dec 21 2005, bug 5427. Default no. vmexten = : Dialplan extension to reach mailbox. Default asterisk. (New in v1.2.x) callevents = yes|no: Set to yes to receive events on AMI when a call is put on/off hold.
These variables can be configured for each SIP peer definition:

(If not specified, the configuration variable can be used for both type=peer and type=user.)
accountcode = : Users may be associated with an accountcode. See Asterisk billing allow = : Allow codecs in order of preference (Use DISALLOW=ALL first, before allowing other codecs) disallow = all : Disallow all codecs for this peer or user definition. allowguest = yes|no : Allow or reject guest calls (default is yes, this can also be set to 'osp' if asterisk was compiled with OSP support). (New in v1.2.x). amaflags : Categorization for CDR records. Choices are default, omit, billing, documentation. See Asterisk billing astdb : Appears to insert a value in the Asterisk database. See example below. auth = : Value assigned to the Digest username= SIP header. callerid = : Caller ID information used when nothing else is available. Defaults to asterisk. busylevel = number : Number of simultaneous calls until user/peer is busy call-limit = number : Number of simultaneous calls through this user/peer. callgroup = num1,num2-num3 : Defines call groups for calls to this device. callingpres = number|descriptive_text : Set Caller-ID presentation on a call. Valid descriptive values are: allowed_not_screened, allowed_passed_screen, allowed_failed_screen, allowed, prohib_not_screened, prohib_passed_screen, prohib_failed_screen, prohib, and unavailable. See SetCallerPres for more information. Default allowed_not_screened. canreinvite = update|yes|no|nonat : If the client is able to support SIP re-invites. Default yes. context = : If type=user, the Context for the inbound call from this SIP user definition. If type=peer, the Context in the dialplan for outbound calls from this SIP peer definition. If type=friend the context used for both inbound and outbound calls through the SIP entities definition. If no type=user entry matches an inbound call, then a type=peer or type=friend will match if the hostname or IP address defined in host= matches. defaultip = Dotted.Quad.IP.Addr : Default IP address of client if host=dynamic is specified. Used if client has not registered at any other IP address. Valid only for type=peer. directrtpsetup = yes|no: Similar to canreinvite, but right away passes media to the other party like a SIP proxy dtmfmode = inband|info|rfc2833 : How the client handles DTMF signalling. Default rfc2833. Warning: inband very high CPU load. fromuser = : Specify user to put in "from" instead of $CALLERID(number) (overrides the callerid) when placing calls _to_ peer (another SIP proxy). Valid only for type=peer. fromdomain = : Sets default From: domain in SIP messages when placing calls _to_ peer. Valid only when in [general] section or type=peer. fullcontact = : SIP URI contact for realtime peer. Valid only for realtime peers. host = dynamic|hostname|IPAddr : How to find the client - IP # or host name. If you want the phone to register itself, use the keyword dynamic instead of Host IP. incominglimit and outgoinglimit = Number : Limits for number of simultaneous active calls for a SIP client. Valid only for type=peer. insecure : very|yes|no|invite|port : Specifies how to handle connections with peers. Default no (authenticate all connections). (invite and port added in v1.2.x). ipaddr : Dotted Quad IP address of the peer. Valid only for realtime peers. language : A language code defined in indications.conf - defines language for prompts mailbox = mailbox : Voicemail extension (for message waiting indications). Valid only for type=peer. Edit: also valid for type=friend (verified with 1.4.22.1). md5secret : MD5-Hash of ":==SIP_realm==:" (can be used instead of secret). Default for authenticating to an Asterisk server when SIP realm is not explicitly declared is ":asterisk:". musicclass = one of the classes specified in musiconhold.conf musiconhold = Set class of musiconhold on calls from SIP phone. Calls to the phone require SetMusicOnHold cmd of higher priority (lower numerical value of priority) than Dial cmd in dialplan in order to set this class for the call. Calls have the MusicOnHold class set on a per call basis, not on a per phone basis, and making a call through any extension specifying SetMusicOnHold will override this value for the call. subscribemwi: Instructs Asterisk to not send NOTIFY messages for message waiting indication (added in v1.4) name = : Name of the realtime peer. If the peer is an actual phone then this will generally be the extension number of that phone. On some softphones this field corresponds to the "username" field/option in the softphone's settings. Valid only for realtime peers. nat = yes|no : This variable changes the behaviour of Asterisk for clients behind a firewall. This does not solve the problem if Asterisk is behind the firewall and the client on the outside. Please note that as of Asterisk 1.0.x nat can now have the values: yes|no|never|route. Default no which really means to use rfc3581 techniques. outboundproxy = IP_address or DNS SRV name (excluding the _sip._udp prefix) : SRV name, hostname, or IP address of the outbound SIP Proxy. Valid only in [general] section and type=peer. (New in v1.2.x). permit, deny,mask : IP address and network restriction pickupgroup : Group that can pickup fellow workers' calls using *8 and the Pickup() application on the *8 extension port : SIP port of the client progressinband = never|no|yes : If we should generate in-band ringing always. Default never. promiscredir = yes|no : Allows support for 302 Redirects; (Note: will redirect them all to the local extension returned in Contact rather than to that extension at the destination). Default no. qualify = yes|no|milliseconds : Check if client is reachable. If yes, the checks occur every 60 seconds. Valid only in [general] section and type=peer. regexten = regseconds = seconds : Number of seconds between SIP REGISTER. Valid only for realtime peer entries. restrictcid : (yes/no) To have the callerid restricted -> sent as ANI; use this to hide the caller ID. This does not seem to work. This variable has been deprecated as of v1.2.x. rtpkeepalive = seconds : Number of seconds, when a RTP Keepalive packet will be sent if no other RTP traffic on that connection. Default 0 (no RTP Keepalive). Valid only in [general] section and type=peer. rtptimeout = seconds : Terminate call if x seconds of no RTP activity when we're not on hold. Valid only in [general] section and type=peer. rtpholdtimeout = seconds : Terminate call if x seconds of no RTP activity when we're on hold (must be larger than rtptimeout). Valid only in [general] section and type=peer. secret : If Asterisk is acting as a SIP Server, then this SIP client must login with this Password (A shared secret). If Asterisk is acting as a SIP client to a remote SIP server that requires SIP INVITE authentication, then this field is used to authenticate SIP INVITEs that Asterisk sends to the remote SIP server. Asterisk 1.6.2.x: Changed the secret parameter to remotesecret. sendrpid = yes|no : If a Remote-Party-ID SIP header should be sent. Default no. setvar = variable=value : Channel variable to be set for all calls from this peer/user. subscribecontext = : Set a specific context for SIP SUBSCRIBE requests trustrpid = yes|no : If Remote-Party-ID SIP header should be trusted. Default no. type = user|peer|friend : Relationship to client - outbound provider or full client? useclientcode = yes|no : If yes, then the Call Originator as stated in the CDR will be changed to whatever is specified in a X-ClientCode SIP Header. Default no. (New in v1.2.x) usereqphone = yes|no : Indicates whether to add a ";user=phone" to the URI. Default no. Valid only in [general] and type=peer. username = : If Asterisk is accepting SIP INVITE requests from a remote SIP client, this field specifies the user name for authentication. (Contrast with fromuser.) Also, for peers that register with Asterisk, this username is used in INVITEs until we have a registration. vmexten = : Dialplan extension to reach mailbox. Default asterisk. Valid only in [general] or type=peer. Asterisk does not yet support SIP over TCP. It only supports SIP over UDP. For Grandstream phones: set dtmfmode=info Asterisk uses the incoming RTP Stream as a timing source for sending its outgoing Stream. If the incoming stream is interrupted due to silence suppression then musiconhold will be choppy. So in conclusion, you cannot use silence suppression. Make sure ALL SIP phones have disabled silence suppression. There is a solution for the silence suppression problem, see bug 5374 for details. Each SIP client that connects to Asterisk needs a definition in SIP.CONF. Here is a few samples:

[grandstream1]

type=friend                   ; either "friend" (peer+user), "peer" or "user"
context=from-sip
username=grandstream1         ; usually matches the section title
fromuser=grandstream1         ; overrides the callerid, e.g. required by FWD
callerid=John Doe <1234>
host=192.168.0.23             ; we have a static but private IP address
nat=no                        ; there is not NAT between phone and Asterisk
canreinvite=yes               ; allow RTP voice traffic to bypass Asterisk
dtmfmode=info                 ; either RFC2833 or INFO for the BudgeTone
mailbox=1234@default  ; mailbox 1234 in voicemail context "default"
disallow=all                  ; need to disallow=all before we can use allow=
allow=ulaw                    ; Note: In user sections the order of codecs
                              ; listed with allow= does NOT matter!
;allow=alaw
;allow=g723.1                  ; Asterisk only supports g723.1 pass-thru!
;allow=g729                    ; Pass-thru only unless g729 license obtained
astdb=chan2ext/SIP/grandstream1=1234   ; ensures an astDB entry exists

[xlite1]
;Turn off silence suppression in X-Lite ("Transmit Silence"=YES)!
;Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed
type=friend
username=xlite1
callerid="Jane Smith" <5678>
host=dynamic
nat=yes                       ; X-Lite is behind a NAT router
canreinvite=no                ; Typically set to NO if behind NAT
disallow=all
allow=gsm                     ; GSM consumes far less bandwidth than G711-u (ulaw)
allow=ulaw
allow=alaw

[user1_snomsip]
type=friend
secret=blah
host=dynamic
dtmfmode=inband                ; Choices are inband, rfc2833, or info
defaultip=192.168.0.59
mailbox=1234,2345              ; Mailbox for message waiting indicator
disallow=all
allow=ulaw                     ; since we chose 'inband' for dtmf we must use g.711

allow=alaw

[user2_pingtel]
type=friend
username=user2_pingtel
secret=blah
host=dynamic
qualify=1000                  ; Consider it down if it's 1 second to reply
callgroup=1,3-4               ; we are member of the call groups 1, 3 and 4
pickupgroup=1,3-4             ; we can do call pick-up with *8 for the callgroups 1, 3 and 4
defaultip=192.168.0.60
disallow=all
allow=ulaw
allow=alaw
allow=g729

[user3_cisco]

type=friend
username=user3_cisco
secret=blah
nat=yes                        ; This phone may be natted
host=dynamic
canreinvite=no                 ; Cisco poops on reinvite sometimes
qualify=200                    ; Qualify peer is no more than 200ms away
defaultip=192.168.0.4
disallow=all
allow=ulaw
allow=alaw
allow=g729

[user4_cisco1]
type=friend

username=user4_cisco
fromuser=markster              ; Specify user to put in "from" instead of callerid
secret=blah
defaultip=192.168.0.4          ; use either host=dynamic or defaultip=...
amaflags=default               ; Choices are default, omit, billing, documentation
accountcode=markster           ; Users may be associated with an accountcode to ease billing
disallow=all
allow=ulaw
allow=alaw
allow=g729
allow=g723.1

These definitions are documented in the Digium Asterisk handbook.

After you defined these SIP client accounts in SIP.conf you are able to login to the asterisk server from clients and place calls. To receive calls, you need to configure extensions in extensions.conf. Example:

 exten => 1010,1, Dial(SIP/user3_cisco,10,t)

If someone calls extension 1010, the sip client logged in as user3_cisco is dialled in order to receive the call.

the variable ${VXML_URL} can be used to add additional items to the To: header. The value is appended, after a semicolon, to the SIP To: header. Note that previous documentation on this site was incorrect; this variable has nothing to do with pushing pages to a Cisco 7960 phone (something that is currently impossible in the Cisco SIP firmware). the variable ${ALERT_INFO} can be used to create a new header called Alert-Info: which can be used to create distinctive ringing on the Cisco SIP-enabled phone devices with firmware version 6.0 onward. For Cisco 7940/60, ALERT_INFO can have the value of any of the following built-in ringtones:   - Bellcore-BusyVerify
  - Bellcore-Stutter
  - Bellcore-MsgWaiting
  - Bellcore-dr1
  - Bellcore-dr2
  - Bellcore-dr3
  - Bellcore-dr4
  - Bellcore-dr5

It is not currently possible to specify a custom ring tone, only a cadence on the default ringtone. You will have to listen quite carefully to tell that the ringing is different. Cisco bug ID CSCec42938 tracks the request for it to work on custom ring tones.

[general]disallow=allallow=gsmallow=ulawallow=alawcontext=from-sipmaxexpirey=180defaultexpirey=160tos=reliabilityregister => :@fwd.pulver.com/CONTACT[fwd.pulver.com]type=friendsecret=username=host=fwd.pulver.cominsecure=very ; required for incoming FWD calls

Now go to Asterisk config extensions.conf to view how to setup [from-sip] and [fwd-out] contexts in extensions.conf

[general]context=OUTGOINGautocreatepeer=yes[Provider]type=friendusername=XXXXXsecret=XXXXXhost=xxxxx.FakeProvider.com

So when Asterisk receives a call from SER it will "autocreatepeer" and give access to the OUTGOING context.

[general]context=OUTGOINGautocreatepeer=yes[Provider]type=friendusername=__what_so_ever__secret=__what_so_ever__host=xyz.FakeProvider.com

Asterisk will create peer when receives a call from OpenSER and gives access to the OUTGOING context.
To use Asterisk and OpenSER together in realtime, see Realtime Integration Of Asterisk With OpenSER.


This section will document things that may break as you upgrade a version. New features generally don't break old configuration files.
1.2: Channel configuration keyword restrictcid has been deprecated. 1.2.10: The general keyword "port" has changed to "bindport". "port" in channel configurations remains as a reference to the remote server. 1.4.x: Realtime cached friends are buggy up to 1.4.19: bug 12707 Back to Asterisk config files, Asterisk

Tuesday, October 19, 2010

Asterisk cmd ConfBridge


ConfBridge conferencing bridge  ConfBridge([confno][,options]): Enters the user into a specified ConfBridge conference
ConfBridge is an application for Asterisk starting with the 1.6.2.* series. ConfBridge is very similar in features to MeetMe, but unlike MeetMe, ConfBridge does not perform audio mixing using DAHDI. Instead, audio mixing is performed within the internals of Asterisk.

To get an up2date description of ConfBridge for your used Asterisk version execute "core show application ConfBridge" on the Asterisk CLI.

The option string may contain zero or more of the following characters:
'a' — Set admin mode 'A' — Set marked mode 'c' — Announce user(s) count on joining a conference. 'm' — Set initially muted. 'M' — Enable music on hold when the conference has a single caller. Optionally, specify a musiconhold class to use. If one is not provided, it will use the channel's currently set music class, or 'default' '1' — Do not play message when first person enters 's' — Present menu (user or admin) when '*' is received (send to menu) 'w' — Wait until the marked user enters the conference 'q' — Quiet mode (don't play enter/leave sounds).
The join sound can be set using the 'CONFBRIDGE_JOIN_SOUND' variable and
the leave sound can be set using the 'CONFBRIDGE_LEAVE_SOUND' variable.
These can be unique to the caller.

NOTE: This application will not automatically answer the channel.

When a participant is "muted" this means that the participant's audio is ignored. Nevertheless the muted participant still receives the mixed audio stream. ConfBridge() uses Asterisk's bridging framework which was introduced in Asterisk 1.6.2. There is a common bridging framework in main/bridging.c. The bridging implemenations itself are modules located in bridges/bridge_*.c. There are several implementations with different kind of features. When an application requests a new bridge (e.g. ConfBridge), it has to specify the needed features and the bridging framework will choose the best fitting bridging implementation. Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ

Saturday, October 16, 2010

Asterisk Sip Configuration Guide

Asterisk Technical Guide

Generic asterisk sip configuration guide page 1 of 2 valcom session initiation protocol (sip) vip devices are compatible with asterisk sip pbx systems. Asterisk pbx - ronald lewis laptops guide smartphones guide windows hardware software asterisk is not for the feint of heart and does take skill and featured tech content - inside techspot. Installing asterisk on unraid broadvoice can not provide full technical support for these devices if your device is not customers to connect their own sip devices, including ip phones, softphones, and asterisk. Generic asterisk sip configuration guide guide new examples new netborder call analyzer wanpipe case studies troubleshooting tech support to install the required packages for compiling on asterisk now. Digium asterisk business edition - telephony depot sft and/or nerve these pages are marked by an asterisk information is divided up into five parts, as listed below getting started: guide to using this website tech toolbox.

Asterisk technical guide xpantivirus removal guide fast xp clean-up how to xp install a sound webtechgeek.com - web tech support more software downloads asterisk key: asterisk key shows passwords hidden. Asterisk technical guide asterisk business edition includes a supported rpath linux distribution with an enhanced installer, an asterisk technical manual and a quick-start guide, making asterisk even. Sample asterisk configuration guide - inphonex asterisk: the future of telephony--new from o'reilly: the definitive guide to telecom's cultural and technical revolution sebastopol, ca--the telephony revolution is underway--a. Zds paintball - marker tech - shocker nxt device configuration guides note: inphonex does not provide phone technical support for asterisk we only provide limited email.

Asterisk sip phone, broadvoice installation guide newbie's guide to asterisk home 2 7: unabridged installation and with this update, you get version 1 2 5 of asterisk as tech topics. Asterisk key free software download asterisk key software review cnet's 2009 ultimate holiday tech guide required fields are marked with an asterisk( ). Product review: asterisk brings open source voip to the enterprise digium's technical support team offers professional assistance with installation community tutorials and guides asterisk: a bare-bones voip example asterisk on redhat linux. Asterisk business edition license upgrade for 40 additional calls (up posted in gadgets & tech by ronald lewis on twitter for the latest updates to this guide, cloud for expressing such a great interest in my upcoming asterisk guide. Asterisk support asterisk tech papers courses fundamentals webinars events asterisk voip pbx guide here's a roundup of articles on the open source asterisk voip.

Friday, October 15, 2010

Asterisk fax


In short:

Across the Internet even a G.711 codec fax transmission is unpredictable. An excellent discussion of why faxing and modems don't work well over VoIP can be found here. However, people often get perfectly good results on lightly loaded LANs. It still isn't perfect, as a burst of data on the LAN can still upset things, but some people get results they can live with.


Fax-over-Internet T.38 pass-thru functionality within Asterisk has arrived in 1.4, CallWeaver has reliable support for both T38 passthrough and T38 termination; CallWeaver is a fork of Asterisk 1.2. You should also consider Hylafax+ (or HylaFax) which runs outside of Asterisk but can be bridged using IAXModem to Asterisk; this is a robust solution when receving calls via PRI and forwarding to iaxmodem and hylafax on localhost. Details are explained at the SpanDSP web site.
A commercial alternative is Noojee Fax (aka AsterFax) which allows you to use Asterisk to send and recieve faxes normally then converts them to an email message or the other way around (email-to-fax). Another alternative is the web-based fax server from VBS.


In detail:
There are two conceptual methods of carrying virtually real-time fax-machine-to-fax-machine communication across packet networks:

Fax relay, in which the T.30 fax from the PSTN is demodulated at the sending gateway. The demodulated fax content is enveloped into packets, sent over the network, and remodulated into T.30 fax at the receiving end.
Fax pass-through, in which modulated fax information from the PSTN is passed in-band end-to-end over a voice speech path in an IP network. The following two pass-through techniques are possible:
The configured voice codec is used for the fax transmission. This technique works only when the configured codec is G.711 with no voice activity detection (VAD) and no echo cancellation (EC), or when the configured codec is a clear-channel codec or G.726/32. Low bit-rate codecs cannot be used for fax transmissions.
The gateway dynamically changes the codec from the codec configured for voice to G.711 with no VAD and no EC for the duration of the fax session. This method is specifically referred to as codec upspeed or fax pass-through with upspeed.
In addition to the methods for real-time fax transmission, a method called store-and-forward fax breaks the fax process into distinct sending and receiving processes and allows fax messages to be stored between those processes. store-and-forward fax is based on the ITU-T T.37 standard, and it also enables fax transmissions to be received from or delivered to computers rather than fax machines.

Yet another Fax-over-IP method is to use IAXmodem and Hylafax on different, distanced machines: You could run IAXmodem on the Asterisk server communicating on the loopback adapter, and HylaFAX would communicate with IAXmodem remotely using a "remote tty" service such as termpkg's termnetd and ttyd programs.


The Noojee Fax (aka AsterFax) method applies a bit of lateral thinking. It allows you to use an Asterisk server which is connected to the PSTN to act as a fax gateway to the IP network. Noojee Fax sits on the Asterisk server and operates as a translater converting the faxes to and from email messages. The fax is then sent over the IP network as an email message which eliminates all the standard problems of Fax-over-IP.
User then can send a fax from their favorite email client and receive it into their in-box. While perhaps not suitable for all usage scenarios this method covers a good percentage of the common use cases and completly eliminates the vagaries of Fax-over-IP.


T.38 relay:
In fax relay mode, gateways terminate T.30 fax signaling by spoofing a virtual fax machine to the locally attached fax machine. Unlike in-band faxing or fax pass-through, fax relay breaks down the T.30 fax tones into their specific HDLC frames (demodulation), sends the information across the voice network using the fax relay protocol (T.38), and then converts the bits back into tones at the far side (modulation). The fax machines on either end are sending and receiving tones and are not aware that a demodulation/modulation fax relay process is occurring.


Summary:
Fax pass-through is the simplest technique for sending fax over IP networks, but it is not the default, nor is it the most desirable method of supporting fax over IP. T.38 fax relay provides a more reliable and error-free method of sending faxes over an IP network

Can I fax over a call with GSM codec compression? What about G.729? Other complex codecs?

Note: G.726 is the only lowish bit rate in common use that can handle FAX at all. It is, however, limited to 9600bps. The V.17 rates higher than 9600bps (14,400 and 12,000), and 33,600bps V.34 FAXing will not work. Even 9600bps FAX performance suffers in reliability, as it will only function if the signal coming in from the analogue sections of the call path is clean.