Some more information:
asterisk version:
Asterisk 1.2.13 built by root @ obelix.bettersurfing.net on a i686 running Linux on 2006-11-14 16:53:46 UTC
We get about 50-60 calls a day with five agents…, on busy days maybe 100-120 days
I’m setup as a call center, people call in and their calls are routed in from analog lines through the TDM400Ps. they are connected to agents in India via VoIP. we have a secure IPSec tunnel between the Canada/India via Cisco PIX501Es…
the non connected problem only happens to about 5-10% of the calls, the others go through properly…
[root@obelix asterisk]# more sip.conf
[general]
canreinvite=no
context=default ; Default context for incoming calls
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
disallow=all ; First disallow all codecs
allow=g729
allow=ulaw ; Allow codecs in order of preference
allow=gsm
[authentication]
[101]
type=friend
secret=BLAH
context=internal
host=dynamic
callerid=<101>
[102]
type=friend
secret=BLAH
context=internal
host=dynamic
callerid=<102>
[103]
type=friend
secret=BLAH
context=internal
host=dynamic
callerid=<103>
[104]
type=friend
secret=BLAH
context=internal
host=dynamic
callerid=<104>
[105]
type=friend
secret=BLAH
context=internal
host=dynamic
callerid=<105>
[root@obelix asterisk]# more iax.conf | grep -v ‘;’
[general]
bandwidth=low
jitterbuffer=no
forcejitterbuffer=no
tos=lowdelay
autokill=yes
[guest]
type=user
context=default
callerid=“Guest IAX User”
[iaxtel]
type=user
context=default
auth=rsa
inkeys=iaxtel
[iaxfwd]
type=user
context=default
auth=rsa
inkeys=freeworlddialup
[demo]
type=peer
username=asterisk
secret=BLAH
host=216.207.245.47
[root@obelix asterisk]# cat extensions.conf | grep -v ‘;’
[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no
[globals]
[incoming]
exten => s,1,GotoIfTime(7:00-21:00|mon-fri||?opened,s,1)
exten => s,2,GotoIfTime(9:00-17:00|sat-sun||?opened,s,1)
exten => s,3,Goto(closed,s,1)
[opened]
exten => s,1,SetVar(LOOP=1)
exten => s,2,Answer
exten => s,3,Wait(1)
exten => s,4,Background(open-hiq)
exten => s,5,SetVar(MONITOR_FILENAME=/var/spool/asterisk/monitor/inbound/SUPPORT-${UNIQUEID})
exten => s,6,Queue(support||||3600)
exten => s,7,Voicemail(100|us)
exten => 1,1,Goto(opened,s,6)
exten => 500,1,Voicemail(500)
exten => i,1,GotoIf($[${LOOP} < 3]?i,2:hangup,1)
exten => i,2,Set(LOOP=$[${LOOP} + 1])
exten => i,3,Playback(invalid)
exten => i,4,Goto(opened,s,3)
exten => t,1,GotoIf($[${LOOP} < 3]?t,2:hangup,1)
exten => t,2,Set(LOOP=$[${LOOP} + 1])
exten => t,3,Goto(opened,s,3)
exten => hangup,1,Playback(goodbye)
exten => hangup,2,Hangup
[closed]
exten => s,1,SetVar(LOOP=1)
exten => s,2,Answer
exten => s,3,Wait(1)
exten => s,4,Background(closed-hiq)
exten => s,5,Voicemail(100|u)
exten => 500,1,Voicemail(500|u)
exten => i,1,GotoIf($[${LOOP} < 3]?i,2:hangup,1)
exten => i,2,Set(LOOP=$[${LOOP} + 1])
exten => i,3,Playback(invalid)
exten => i,4,Goto(closed,s,3)
exten => t,1,GotoIf($[${LOOP} < 3]?t,2:hangup,1)
exten => t,2,Set(LOOP=$[${LOOP} + 1])
exten => t,3,Goto(closed,s,3)
exten => hangup,1,Playback(goodbye)
exten => hangup,2,Hangup
[internal]
include => outgoing
exten => 101,1,Macro(extensions,Sip/101,101)
exten => 102,1,Macro(extensions,Sip/102,102)
exten => 103,1,Macro(extensions,Sip/103,103)
exten => 104,1,Macro(extensions,Sip/104,104)
exten => 105,1,Macro(extensions,Sip/105,105)
exten => 500,1,Voicemail(u500)
exten => 201,1,AddQueueMember(support|local/${CALLERIDNUM}@agents/n)
exten => 201,2,Playback(agent-loginok)
exten => 201,3,Hangup
exten => 201,102,Playback(agent-alreadyon)
exten => 201,103,Hangup
exten => 202,1,RemoveQueueMember(support|local/${CALLERIDNUM}@agents/n)
exten => 202,2,Playback(agent-loggedoff)
exten => 202,3,Hangup
exten => 800,1,VoicemailMain
[macro-extensions]
exten => s,1,Dial(${ARG1}|20)
exten => s,2,Voicemail(${ARG2}|u)
exten => s,103,Voicemail(${ARG2}|b)
[agents]
exten => _XXX,1,CheckGroup(1@${EXTEN}group)
exten => _XXX,2,SetGroup(${EXTEN}group)
exten => _XXX,3,Dial(Sip/${EXTEN})
[outgoing]
exten => _X.,1,Dial(Zap/g1/*67${EXTEN})
the Asterisk server has both an private and public IP (10.x.x.x) and the phones have private IPs (10.x.x.x), the traffic between them is tunneled via Cisco PIX501s…