Voice doesnt pass from x-lite to linksys PAP2

I am a newbie in asterisk and i wanted to test my asterisk configuration by created sample dial plans.

Here is my sip.conf

[general]
port = 5060
bindaddr = 0.0.0.0
context = others

[2000]
type=friend
context=my-phones
secret=1234
host=dynamic
disallow=all
allow=ulaw
allow=alaw

[2001]
type=friend
context=my-phones
secret=1234
host=dynamic
disallow=all
allow=ulaw
allow=ulaw

and my extensions.conf
[others]

[my-phones]
exten => 2000,1,Dial(SIP/2000)
exten => 2001,1,Dial(SIP,2001)

I registered x-lite v5 softphone for 2000 account and i registered 2001 account on linksys PAP2 , i allowed alaw and ulaw codecs on both x-lite and linksys, call is connected when i dial extension number but no voice is passing. when i checked x-lite settings , it showed codec mismatch as a possible reason for no voice , but i double checked codecs. Please help

You have two ulaw’s for SIP/2001 and there is a syntax error for extension 2001.

Are you sure you want allowguest to default to yes?

As to the actual problem, it is much easier if you provide SIP traces and associated codec negotiation debug output, as requested for a couple of other recent postings.

I corrected sip.conf and extensions.conf , and then i dialed extension number, this is the output i got.

== Using SIP RTP CoS mark 5
– Executing [2000@my-phones:1] Dial(“SIP/2001-0000000e”, “SIP/2000”) in new stack
== Using SIP RTP CoS mark 5
– Called SIP/2000
– SIP/2000-0000000f is ringing
– SIP/2000-0000000f answered SIP/2001-0000000e
– Remotely bridging SIP/2001-0000000e and SIP/2000-0000000f
== Spawn extension (my-phones, 2000, 1) exited non-zero on ‘SIP/2001-0000000e’

But still no voice is there.i did set g711 alaw and g711 ulaw at x-lite softphone and g711 alaw at linksys pap2. i “enabled accept first codec” setting on both x-lite and linksys pap2

Can you pls tell how can i check debug codec or is there any way to find out any codec mismatch. Also , is there any way to check that which codec is being used during the conversation?