Calls where both parties talk but can't hear each other

Hi,

I’m looking for some help with a problem in Asterisk (possibly), and I’m confused as heck what is going on. I’ve updated to the latest Asterisk version and the problem is still occur. My setup is as follows:

I’ve got Asterisk running on a high end Pentium-IV box running Linux serving 5 calls, it is located in Canada. The calls come in via analog lines through TDM400P cards to Asterisk box, which then converts it to G729 channels to a call center in India over the Internet. Connection between the Asterisk Server and the India call center is done via two Cisco PIX501 devices, The call center in India is running 5 agents using PolyCom phones, and we’re using G729 to save bandwith. And yes, we purchused 5 licenses of G729 codec.

We’re using SIP and a ring all strategy, with the first agent that picks up getting the call. The problem we’re having is that about 5-10% calls are not connecting properly. In that both sides can talk but do not hear each other. Since we have recording in step s,5 (in the configuration below), I can verify that it is happening. In these problematic calls, both sides of the call talk but they cannot hear the other side at all.

I’ve gone through most of the documentation and spend hours on Google search, does anyone have any idea what could be the problem? I’m willing to provide more information if asked.

My extensions configuration is roughly the following:

[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)

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…

are you sure you’re not running out of codec licences ? if you’re recording, is Asterisk trying to use 2 licences for each call, one inbound, 1 outbound, and so call 3 is missing a licence. check with a “show g729” at the CLI while on a call.

maybe NAT/Firewall issue