Intermittent One Way Calls

Our Asterisk system has an automated voice attendant that calls vendors upon them receiving an order through our application. The automated voice attendant is a simple menu that expect the vendor to key in a tone. This system was previously working fine, yet now experiences an issue where only one-way communication is reach, where the vendor receives and hears the phone call, yet the server does not listen to either key strokes pressed or hangups, and continues playing the messages in a loop long after the vendor has hung up the phone.

Analyzing the Asterisk console debugging information, I’ve noticed for a successful 2-way call the following line appears, where for a bad one-way call it does not.

This line is:

0x7fc4a4013b70 – Probation passed - setting RTP source address to 74.120.95.55:18070

Why is this line missing for some calls? Is there a way I can configure Asterisk to bypass the probation check, or fix this issue?

Because it is not receiving any media. I think that line is a symptom, not the cause.

Where would I look for the cause? VOIP provider? I’ve opened up iptables to allow unobstructed communication with them…

rtp debug ( rtp set debug on), watch to see whether or not audio is coming/leaving

Make sure sip.conf is correctly configured if Asterisk is behind NAT

Unsuccessful 1-way call

-- Attempting call on SIP/flowroute/16045687434 for s@trusted:1 (Retry 1) == Using SIP RTP CoS mark 5 > Channel SIP/flowroute-00000055 was answered -- Executing [s@trusted:1] Wait("SIP/flowroute-00000055", "1") in new stack -- Executing [s@trusted:2] Answer("SIP/flowroute-00000055", "") in new stack -- Executing [s@trusted:3] BackGround("SIP/flowroute-00000055", "lz_ro") in new stack Sent RTP packet to 74.120.95.196:15760 (type 00, seq 029260, ts 000160, len 000160) -- <SIP/flowroute-00000055> Playing 'lz_ro.gsm' (language 'en') Sent RTP packet to 74.120.95.196:15760 (type 00, seq 029261, ts 000320, len 000160) Sent RTP packet to 74.120.95.196:15760 (type 00, seq 029262, ts 000480, len 000160) Sent RTP packet to 74.120.95.196:15760 (type 00, seq 029263, ts 000640, len 000160) Sent RTP packet to 74.120.95.196:15760 (type 00, seq 029264, ts 000800, len 000160) Sent RTP packet to 74.120.95.196:15760 (type 00, seq 029265, ts 000960, len 000160) Sent RTP packet to 74.120.95.196:15760 (type 00, seq 029266, ts 001120, len 000160)

Successful 2-way call

-- Attempting call on SIP/flowroute/16043535006 for s@trusted:1 (Retry 1) == Using SIP RTP CoS mark 5 > Channel SIP/flowroute-00000056 was answered -- Executing [s@trusted:1] Wait("SIP/flowroute-00000056", "1") in new stack -- Executing [s@trusted:2] Answer("SIP/flowroute-00000056", "") in new stack -- Executing [s@trusted:3] BackGround("SIP/flowroute-00000056", "lz_ro") in new stack Sent RTP packet to 74.120.95.55:14078 (type 00, seq 021361, ts 000160, len 000160) -- <SIP/flowroute-00000056> Playing 'lz_ro.gsm' (language 'en') Sent RTP packet to 74.120.95.55:14078 (type 00, seq 021362, ts 000320, len 000160) Sent RTP packet to 74.120.95.55:14078 (type 00, seq 021363, ts 000480, len 000160) > 0x7ff8200263c0 -- Probation passed - setting RTP source address to 74.120.95.55:14078 Got RTP packet from 74.120.95.55:14078 (type 00, seq 055368, ts 069440, len 000160) Sent RTP packet to 74.120.95.55:14078 (type 00, seq 021364, ts 000640, len 000160) Got RTP packet from 74.120.95.55:14078 (type 00, seq 055369, ts 069600, len 000160) Sent RTP packet to 74.120.95.55:14078 (type 00, seq 021365, ts 000800, len 000160) Got RTP packet from 74.120.95.55:14078 (type 00, seq 055370, ts 069760, len 000160)

You’ll notice that the successful call has the line where the probation is passed and it begins receiving RTP packets… any advice or help is appreciated :smile:

This is the cli output for a successful audio call, using the Playback app on my system. If you analyze the ouput you will understand why the Probation passed - setting RTP source address to xx.xx.xx.xx line.

[quote] – Executing [0@internal:1] Playback(“SIP/100-00000014”, “demo-thanks”) in new stack
> 0x7fa760040140 – Probation passed - setting RTP source address to 186.7.239.134:20674
– <SIP/100-00000014> Playing ‘demo-thanks.gsm’ (language ‘en’)
> 0x7fa760040140 – Probation passed - setting RTP source address to 186.7.239.134:20674
[/quote]

Please Show us , your config sip.conf and let see if you are missing a relevant nat setting.

That was the one he said was successful. On the failing one, the trace simply shows he’s not receiving any RTP.

As it is intermittent, NAT seems an unlikely cause.

He might have a firwall block on one of the UDP ports allocated to Asterisk incoming RTP, or he could have port forwarding to somewhere else.

To me it seems that when sending the invite Asterisk is using an local IP rather than an external IP, so sometimes becomes unreachable on the reply. Is this the case? If so, how can I get Asterisk to use my external IP as part of the invite request?

I’ve included an example and my sip.conf below. I really appreciate the help. thank you!


I further reviewed this issue. I found the media IP address you are sending in the INVITE of the bad call differs from the media IP address you send on calls that I can see having good 2way audio.

[code]INVITE for bad call:

Summary:
Request: Invite
Request URI: sip:+16045687434@74.120.95.195
To: sip:+16045687439@fl.gg
From: sip:+16045687494@fl.gg;tag=as4776186e
Call-ID: 0b9631d437f90bc3051b8b5678cd0a9a@sip.flowroute.com
CSeq: 103 INVITE
Contact: sip:6045687434@10.252.73.138:5060;natpub=sip:50.112.103.169:5060
P-Asserted-Identity: sip:+16045687439@fl.gg
SDP IP: 10.252.73.138
SDP Port: 13496

This call you request we send to media IP 10.252.73.138.

This is an INVITE from a good call today:

Summary:

Request: Invite

Request URI: sip:+14506258854@74.120.95.195

To: sip:+14506258854@fl.gg

From: sip:+14388073151@fl.gg;tag=as393e7a8b

Contact: sip:14388073151@68.168.124.90:5999

Call-ID: 4fc05ea12a494afc242c627221f7957f@68.168.124.90:5999

CSeq: 102 INVITE

P-Asserted-Identity: “14388073151” sip:+14388073151@fl.gg

SDP IP: 68.168.124.90

SDP Port: 18468[/code]

Sip.conf

[code][general]
context=public ; Default context for incoming calls. Defaults to 'default’
allowoverlap=no ; Disable overlap dialing support. (Default is yes)

udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)

tcpenable=no ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)

transport=udp ; Set the default transports. The order determines the primary default transport.
; If tcpenable=no and the transport set is tcp, we will fallback to UDP.

srvlookup=yes ; Enable DNS SRV lookups on outbound calls

[flowroute] ;; just a name
type=friend ;; same as above
secret=xxx
username=75480471 ;; used by flowroute accounting
host=22.22.22.22 ;; Asterisk can be told a FIXED IP addr for the other end ;; consequence: Asterisk will contact flowroute
dtmfmode=rfc2833 ;; same
context=inbound ;; same as above
canreinvite=no ;; issue in sip protocol
disallow=all
allow=ulaw ;; allowed encoding (in particular, we don’t alow g729)
insecure=port,invite ;; rules for incoming calls from elsewhere
fromdomain=sip.flowroute.com ;; must put this value in SIP From: header field[/code]

I’ve updated my sip.conf for nat on amazon.com to no avail…

sip.conf

[code][general]
context=public ; Default context for incoming calls. Defaults to 'default’
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
tcpenable=no ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
transport=udp ; Set the default transports. The order determines the primary default transport.
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
externalip=22.22.22.22
localnet=10.10.10.10/255.255.255.0
nat=force_rport
canreinvite=no

[flowroute] ;; just a name
type=friend ;; same as above
secret=xxx
username=75480471 ;; used by flowroute accounting
host=sip.flowroute.com ;; Asterisk can be told a FIXED IP addr for the other end ;; consequence: Asterisk will contact flowroute
dtmfmode=rfc2833 ;; same
context=inbound ;; same as above
nat=force_rport
canreinvite=no
disallow=all
allow=ulaw ;; allowed encoding (in particular, we don’t alow g729)
insecure=port,invite ;; rules for incoming calls from elsewhere
fromdomain=sip.flowroute.com ;; must put this value in SIP From: header field
[/code]

Okay, I got it. Had to explicitly set: