IAX & One Way Audio

I currently have an issue with one way audio, which is really beating me at the moment.

I used to run the same hardware on Asterisk 1.2, but since upgrading to 1.4 recently, this rather bad issue has come along.

I have an IAX trunk to VoIPtalk, and SIP phones (Grandstream 2000) connected to Asterisk. When inbound calls are made, they are received ok, two way audio and all the good stuff. However, when we make an outbound call, we can hear the called party, but they cannot hear us!

Here’s the thing. If I use X-Lite to make outbound calls, everything is good - it seems to only be when making outbound calls with the GXP2000 phones.

Also, when the call is connected, if we briefly put the call on hold, upon taking the call off hold, the called party can hear us.

Below is a SIP debug when using the Grandstream. Please help.



asteriskPBX-alix01*CLI> <--- SIP read from 192.168.1.105:48630 --->
INVITE sip:xxxxxx@192.168.1.145;user=phone SIP/2.0Via: SIP/2.0/UDP 192.168.1.105:48630;branch=z9hG4bK9420090fd84f54a7From: "Living Room" <sip:11@192.168.1.145;user=phone>;tag=9e9ea50096203549To: <sip:xxxxxx@192.168.1.145;user=phone>Contact: <sip:11@192.168.1.105:48630;transport=udp;user=phone>Supported: replaces, timer, pathCall-ID: 52fb16dedf218831@192.168.1.105CSeq: 59103 INVITEUser-Agent: Grandstream GXP2000 1.1.6.44Max-Forwards: 70Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGEContent-Type: application/sdpContent-Length: 259v=0o=11 8000 8000 IN IP4 192.168.1.105s=SIP Callc=IN IP4 192.168.1.105t=0 0m=audio 16100 RTP/AVP 3 8 0 101a=sendrecva=rtpmap:3 GSM/8000a=rtpmap:8 PCMA/8000a=rtpmap:0 PCMU/8000a=ptime:20a=rtpmap:101 telephone-event/8000a=fmtp:101 0-11
<------------->
--- (13 headers 13 lines) ---
Sending to 192.168.1.105 : 48630 (NAT)
Using INVITE request as basis request - 52fb16dedf218831@192.168.1.105

<--- Reliably Transmitting (NAT) to 192.168.1.105:48630 --->
SIP/2.0 407 Proxy Authentication RequiredVia: SIP/2.0/UDP 192.168.1.105:48630;branch=z9hG4bK9420090fd84f54a7;received=192.168.1.105From: "Living Room" <sip:11@192.168.1.145;user=phone>;tag=9e9ea50096203549To: <sip:xxxxxx@192.168.1.145;user=phone>;tag=as31047b10Call-ID: 52fb16dedf218831@192.168.1.105CSeq: 59103 INVITEUser-Agent: Asterisk PBXAllow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFOSupported: replacesProxy-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="7456d76d"Content-Length: 0
<------------>
Scheduling destruction of SIP dialog '52fb16dedf218831@192.168.1.105' in 32000 ms (Method: INVITE)
Found user '11'

asteriskPBX-alix01*CLI> <--- SIP read from 192.168.1.105:48630 --->
ACK sip:xxxxxx@192.168.1.145;user=phone SIP/2.0Via: SIP/2.0/UDP 192.168.1.105:48630;branch=z9hG4bK9420090fd84f54a7From: "Living Room" <sip:11@192.168.1.145;user=phone>;tag=9e9ea50096203549To: <sip:xxxxxx@192.168.1.145;user=phone>;tag=as31047b10Contact: <sip:11@192.168.1.105:48630;transport=udp;user=phone>Supported: pathCall-ID: 52fb16dedf218831@192.168.1.105CSeq: 59103 ACKUser-Agent: Grandstream GXP2000 1.1.6.44Max-Forwards: 70Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGEContent-Length: 0
<------------->
--- (12 headers 0 lines) ---

asteriskPBX-alix01*CLI> <--- SIP read from 192.168.1.105:48630 --->
INVITE sip:xxxxxx@192.168.1.145;user=phone SIP/2.0Via: SIP/2.0/UDP 192.168.1.105:48630;branch=z9hG4bKd45f6dde7fbecb1fFrom: "Living Room" <sip:11@192.168.1.145;user=phone>;tag=9e9ea50096203549To: <sip:xxxxxx@192.168.1.145;user=phone>Contact: <sip:11@192.168.1.105:48630;transport=udp;user=phone>Supported: replaces, timer, pathProxy-Authorization: Digest username="11", realm="asterisk", algorithm=MD5, uri="sip:xxxxxx@192.168.1.145;user=phone", nonce="7456d76d", response="dbfdda3c8f854536b473cedb10aa9a72"Call-ID: 52fb16dedf218831@192.168.1.105CSeq: 59104 INVITEUser-Agent: Grandstream GXP2000 1.1.6.44Max-Forwards: 70Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGEContent-Type: application/sdpContent-Length: 259v=0o=11 8000 8001 IN IP4 192.168.1.105s=SIP Callc=IN IP4 192.168.1.105t=0 0m=audio 16100 RTP/AVP 3 8 0 101a=sendrecva=rtpmap:3 GSM/8000a=rtpmap:8 PCMA/8000a=rtpmap:0 PCMU/8000a=ptime:20a=rtpmap:101 telephone-event/8000a=fmtp:101 0-11
<------------->
--- (14 headers 13 lines) ---
Sending to 192.168.1.105 : 48630 (NAT)
Using INVITE request as basis request - 52fb16dedf218831@192.168.1.105
Found user '11'
Found RTP audio format 3
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 101
Peer audio RTP is at port 192.168.1.105:16100
Found audio description format GSM for ID 3
Found audio description format PCMA for ID 8
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - 0xe (gsm|ulaw|alaw), peer - audio=0xe (gsm|ulaw|alaw)/video=0x0 (nothing), combined - (gsm|alaw|ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 192.168.1.105:16100
Looking for xxxxxx in all (domain 192.168.1.145)
list_route: hop: <sip:11@192.168.1.105:48630;transport=udp;user=phone>

<--- Transmitting (NAT) to 192.168.1.105:48630 --->
SIP/2.0 100 TryingVia: SIP/2.0/UDP 192.168.1.105:48630;branch=z9hG4bKd45f6dde7fbecb1f;received=192.168.1.105From: "Living Room" <sip:11@192.168.1.145;user=phone>;tag=9e9ea50096203549To: <sip:xxxxxx@192.168.1.145;user=phone>Call-ID: 52fb16dedf218831@192.168.1.105CSeq: 59104 INVITEUser-Agent: Asterisk PBXAllow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFOSupported: replacesContact: <sip:xxxxxx@192.168.1.145>Content-Length: 0
<------------>
    -- Executing [xxxxxx@all:1] Dial("SIP/11-08ce3000", "IAX2/xxxxxx@voiptalk/xxxxxx") in new stack
    -- Called xxxxxx@voiptalk/xxxxxx

asteriskPBX-alix01*CLI> 
    -- Call accepted by 217.14.138.130 (format unknown)
    -- Format for call is (gsm|ulaw|alaw)

asteriskPBX-alix01*CLI> 
    -- IAX2/voiptalk-1770 is making progress passing it to SIP/11-08ce3000
Audio is at 192.168.1.145 port 10002
Adding codec 0x2 (gsm) to SDP
Adding codec 0x8 (alaw) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Transmitting (NAT) to 192.168.1.105:48630 --->
SIP/2.0 183 Session ProgressVia: SIP/2.0/UDP 192.168.1.105:48630;branch=z9hG4bKd45f6dde7fbecb1f;received=192.168.1.105From: "Living Room" <sip:11@192.168.1.145;user=phone>;tag=9e9ea50096203549To: <sip:xxxxxx@192.168.1.145;user=phone>;tag=as57f17704Call-ID: 52fb16dedf218831@192.168.1.105CSeq: 59104 INVITEUser-Agent: Asterisk PBXAllow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFOSupported: replacesContact: <sip:xxxxxx@192.168.1.145>Content-Type: application/sdpContent-Length: 287v=0o=root 3427 3427 IN IP4 192.168.1.145s=sessionc=IN IP4 192.168.1.145t=0 0m=audio 10002 RTP/AVP 3 8 0 101a=rtpmap:3 GSM/8000a=rtpmap:8 PCMA/8000a=rtpmap:0 PCMU/8000a=rtpmap:101 telephone-event/8000a=fmtp:101 0-16a=silenceSupp:off - - - -a=ptime:20a=sendrecv
<------------>

asteriskPBX-alix01*CLI> 
    -- IAX2/voiptalk-1770 answered SIP/11-08ce3000
Audio is at 192.168.1.145 port 10002
Adding codec 0x2 (gsm) to SDP
Adding codec 0x8 (alaw) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (NAT) to 192.168.1.105:48630 --->
SIP/2.0 200 OKVia: SIP/2.0/UDP 192.168.1.105:48630;branch=z9hG4bKd45f6dde7fbecb1f;received=192.168.1.105From: "Living Room" <sip:11@192.168.1.145;user=phone>;tag=9e9ea50096203549To: <sip:xxxxxx@192.168.1.145;user=phone>;tag=as57f17704Call-ID: 52fb16dedf218831@192.168.1.105CSeq: 59104 INVITEUser-Agent: Asterisk PBXAllow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFOSupported: replacesContact: <sip:xxxxxx@192.168.1.145>Content-Type: application/sdpContent-Length: 287v=0o=root 3427 3428 IN IP4 192.168.1.145s=sessionc=IN IP4 192.168.1.145t=0 0m=audio 10002 RTP/AVP 3 8 0 101a=rtpmap:3 GSM/8000a=rtpmap:8 PCMA/8000a=rtpmap:0 PCMU/8000a=rtpmap:101 telephone-event/8000a=fmtp:101 0-16a=silenceSupp:off - - - -a=ptime:20a=sendrecv
<------------>

asteriskPBX-alix01*CLI> <--- SIP read from 192.168.1.105:48630 --->
ACK sip:xxxxxx@192.168.1.145 SIP/2.0Via: SIP/2.0/UDP 192.168.1.105:48630;branch=z9hG4bK4c6fff380e384febFrom: "Living Room" <sip:11@192.168.1.145;user=phone>;tag=9e9ea50096203549To: <sip:xxxxxx@192.168.1.145;user=phone>;tag=as57f17704Contact: <sip:11@192.168.1.105:48630;transport=udp;user=phone>Supported: pathProxy-Authorization: Digest username="11", realm="asterisk", algorithm=MD5, uri="sip:xxxxxx@192.168.1.145;user=phone", nonce="7456d76d", response="dbfdda3c8f854536b473cedb10aa9a72"Call-ID: 52fb16dedf218831@192.168.1.105CSeq: 59104 ACKUser-Agent: Grandstream GXP2000 1.1.6.44Max-Forwards: 70Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGEContent-Length: 0
<------------->
--- (13 headers 0 lines) ---

asteriskPBX-alix01*CLI> <--- SIP read from 192.168.1.105:48630 --->
BYE sip:xxxxxx@192.168.1.145 SIP/2.0Via: SIP/2.0/UDP 192.168.1.105:48630;branch=z9hG4bK141d869dc83e8dfdFrom: "Living Room" <sip:11@192.168.1.145;user=phone>;tag=9e9ea50096203549To: <sip:xxxxxx@192.168.1.145;user=phone>;tag=as57f17704Supported: pathProxy-Authorization: Digest username="11", realm="asterisk", algorithm=MD5, uri="sip:xxxxxx@192.168.1.145", nonce="7456d76d", response="258d433aadb580831ed414b720ac0b2a"Call-ID: 52fb16dedf218831@192.168.1.105CSeq: 59105 BYEUser-Agent: Grandstream GXP2000 1.1.6.44Max-Forwards: 70Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGEContent-Length: 0
<------------->
--- (12 headers 0 lines) ---
Sending to 192.168.1.105 : 48630 (NAT)

<--- Transmitting (NAT) to 192.168.1.105:48630 --->
SIP/2.0 200 OKVia: SIP/2.0/UDP 192.168.1.105:48630;branch=z9hG4bK141d869dc83e8dfd;received=192.168.1.105From: "Living Room" <sip:11@192.168.1.145;user=phone>;tag=9e9ea50096203549To: <sip:xxxxxx@192.168.1.145;user=phone>;tag=as57f17704Call-ID: 52fb16dedf218831@192.168.1.105CSeq: 59105 BYEUser-Agent: Asterisk PBXAllow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFOSupported: replacesContent-Length: 0
<------------>
    -- Hungup 'IAX2/voiptalk-1770'
  == Spawn extension (all, xxxxxx, 1) exited non-zero on 'SIP/11-08ce3000'

asteriskPBX-alix01*CLI> 
Really destroying SIP dialog '52fb16dedf218831@192.168.1.105' Method: BYE

asteriskPBX-alix01*CLI> 

Hi from what you say the problem is with the GXP setup and nothing todo with the iax trunk.

try it without the GSM code enabled also make sure that you have the localnet setup correctly

what does the sip.conf for the gxp looklike

Ian

Ian, thank you very much. I have disabled GSM on the Grandstreams and two way audio is again with us. :wink:

Honestly, thank you very very much.

This was never an issue on Asterisk 1.2. I’d prefer GSM calls if it is possible. The entry for one of the Grandstreams in sip.conf is as follows.

...
...
context=default
allowguest=yes

bindport=5060
bindaddr=0.0.0.0 

srvlookup=yes 

maxexpiry=3600
minexpiry=60

disallow=all 
allow=gsm
allow=alaw
allow=ulaw

dtmfmode = rfc2833

callevents=yes

alwaysauthreject = yes

rtptimeout=60
rtpholdtimeout=120

registertimeout=20
registerattempts=3

externhost=xxxx
externrefresh=30

localnet=192.168.1.0/255.255.0.0

nat=yes
canreinvite=no
...
...
[11]
type=friend
callerid="Living Room" <11>
host=dynamic
secret=xxxx
canreinvite=no
context=all
subscribecontext=BLF_Group_Jabronies
callgroup=1
pickupgroup=1
mailbox=11@default

No worries on the local lan always try and use the best codec possible, alar for example and then compress the outward leg

Ian