Asterisk cuts audio to the internal extension

Hi,

I have a problem with one call scenario on my Asterisk server.
The call is coming from an external SIP proxy to my server. Asterisk sends the call to one internal extension.
Extension rings and then answers.
The user at extension hears audio for 0.5 seconds. Then audio in that direction is cut. (no RTP is sent)
Audio in other direction continues.

I got network traces for this call scenario. Everything seems normal in SIP messaging and as RTP.
Just before the audio is cut, Asterisk sends an OPTIONS message to the extension.

Some calls with same scenario don’t have this problem. When I investigate SIP messaging for these successful calls, I don’t see the OPTIONS message.

That’s why I suspect the OPTIONS message.
Now , my questions :
1- How can I disable the options message ?
2- Why these options messages occur in some calls and why not in others ?

I can send the successful and unsuccessfull network traces to people who are interested in investigating them.

Thanks.

Hi

Is your box behind a nat firewall ?

is it is do you have nat = no set on the trunk ?

Ian

Hi Ian,

Thanks for your reply.
My box is not behind but on a firewall. The box has 2 interfaces (ppp0 to WAN, and br0 to LAN)
So internal clients reach the Asterisk on br0 interface and Asterisk reaches the external proxy through ppp0.

Should I set nat=no or nat=yes on the trunk ?

Btw, I don’t believe this is a nat or firewall issue, because when I take network traces on Asterisk, I see both way RTP for 0.5 seconds.
Then it is cut in one way.
Could it still be related to NAT ?

Additionally, I discovered that the problem is not related to OPTIONS message, because I have unsuccessful-audio calls without OPTIONS message in them.

Thanks.

if your box has a real external ip address and sip is bound to it , ie bindaddr=0.0.0.0 and you have the localnet = xxxx/xxxx set correctly as well as the extenip then your should be good to go.

try running rtp debug on a problem call it will show your where the media is going

Ian

I don’t have “bindaddr” in the sip.conf file but 5060 is bound to 0.0.0.0 according to netstat:

netstat -an | grep 5060

udp 0 0 0.0.0.0:5060 0.0.0.0:*

localnet is set correctly:

sip_nat.conf:localnet=192.168.254.0/255.255.255.0

So, should I put “nat=yes” or “nat=no” to the trunk ?

Now I got the RTP debug as you suggested.
It shows that in first second , we have RTP both to the external and internal party.
But then RTP to intenal party is cut.
There is no clue why it is cut.

Got  RTP packet from    193.243.202.124:32342 (type 18, seq 004242, ts 15562620, len 000002)
Got  RTP packet from    193.243.202.124:32342 (type 18, seq 004243, ts 15563420, len 000060)
Got  RTP packet from    193.243.202.124:32342 (type 18, seq 004244, ts 15563900, len 000060)
Got  RTP packet from    193.243.202.124:32342 (type 18, seq 004245, ts 15564380, len 000060)
Got  RTP packet from    193.243.202.124:32342 (type 18, seq 004246, ts 15564860, len 000060)
    -- SIP/aktuna-istanbul-084e2a78 is making progress passing it to SIP/995-b5a02c18
    -- SIP/aktuna-istanbul-084e2a78 answered SIP/995-b5a02c18
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007413, ts 225501716, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019811, ts 225501712, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007414, ts 225501876, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019812, ts 225501872, len 000020)
Got  RTP packet from    193.243.202.124:32344 (type 18, seq 004247, ts 15565340, len 000060)
Sent RTP packet to      192.168.254.5:16454 (type 18, seq 015798, ts 000432, len 000020)
Sent RTP packet to      192.168.254.5:16454 (type 18, seq 015799, ts 000592, len 000020)
Sent RTP packet to      192.168.254.5:16454 (type 18, seq 015800, ts 000752, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007415, ts 225502036, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019813, ts 225502032, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007416, ts 225502196, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019814, ts 225502192, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007417, ts 225502356, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019815, ts 225502352, len 000020)
Got  RTP packet from    193.243.202.124:32344 (type 18, seq 004248, ts 15565820, len 000060)
Sent RTP packet to      192.168.254.5:16454 (type 18, seq 015801, ts 000912, len 000020)
Sent RTP packet to      192.168.254.5:16454 (type 18, seq 015802, ts 001072, len 000020)
Sent RTP packet to      192.168.254.5:16454 (type 18, seq 015803, ts 001232, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007418, ts 225502516, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019816, ts 225502512, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007419, ts 225502676, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019817, ts 225502672, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007420, ts 225502836, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019818, ts 225502832, len 000020)
Got  RTP packet from    193.243.202.124:32344 (type 18, seq 004249, ts 15566300, len 000060)
Sent RTP packet to      192.168.254.5:16454 (type 18, seq 015804, ts 001392, len 000020)
Sent RTP packet to      192.168.254.5:16454 (type 18, seq 015805, ts 001552, len 000020)
Sent RTP packet to      192.168.254.5:16454 (type 18, seq 015806, ts 001712, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007421, ts 225502996, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019819, ts 225502992, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007422, ts 225503156, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019820, ts 225503152, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007423, ts 225503316, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019821, ts 225503312, len 000020)
Got  RTP packet from    193.243.202.124:32344 (type 18, seq 004250, ts 15566780, len 000060)
Sent RTP packet to      192.168.254.5:16454 (type 18, seq 015807, ts 001872, len 000020)
Sent RTP packet to      192.168.254.5:16454 (type 18, seq 015808, ts 002032, len 000020)
Sent RTP packet to      192.168.254.5:16454 (type 18, seq 015809, ts 002192, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007424, ts 225503476, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019822, ts 225503472, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007425, ts 225503636, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019823, ts 225503632, len 000020)
Got  RTP packet from    193.243.202.124:32344 (type 18, seq 004251, ts 15567260, len 000042)
Sent RTP packet to      192.168.254.5:16454 (type 18, seq 015810, ts 002352, len 000020)
Sent RTP packet to      192.168.254.5:16454 (type 18, seq 015811, ts 002512, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007426, ts 225503796, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019824, ts 225503792, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007427, ts 225503956, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019825, ts 225503952, len 000020)
Got  RTP packet from    193.243.202.124:32344 (type 18, seq 004252, ts 15567820, len 000002)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007428, ts 225504116, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019826, ts 225504112, len 000020)
Got  RTP packet from    193.243.202.124:32344 (type 18, seq 004253, ts 15568060, len 000002)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007429, ts 225504276, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019827, ts 225504272, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007430, ts 225504436, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019828, ts 225504432, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007431, ts 225504596, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019829, ts 225504592, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007432, ts 225504756, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019830, ts 225504752, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007433, ts 225504916, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019831, ts 225504912, len 000020)
Got  RTP packet from    193.243.202.124:32344 (type 18, seq 004254, ts 15568780, len 000002)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007434, ts 225505076, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019832, ts 225505072, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007435, ts 225505236, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019833, ts 225505232, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007436, ts 225505396, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019834, ts 225505392, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007437, ts 225505556, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019835, ts 225505552, len 000020)
Got  RTP packet from    193.243.202.124:32344 (type 18, seq 004255, ts 15569500, len 000002)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007438, ts 225505716, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019836, ts 225505712, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007439, ts 225505876, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019837, ts 225505872, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007440, ts 225506036, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019838, ts 225506032, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007441, ts 225506196, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019839, ts 225506192, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007442, ts 225506356, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019840, ts 225506352, len 000020)
Got  RTP packet from    193.243.202.124:32344 (type 18, seq 004256, ts 15570220, len 000002)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007443, ts 225506516, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019841, ts 225506512, len 000020)
Got  RTP packet from    193.243.202.124:32344 (type 18, seq 004257, ts 15570460, len 000002)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007444, ts 225506676, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019842, ts 225506672, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007445, ts 225506836, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019843, ts 225506832, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007446, ts 225506996, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019844, ts 225506992, len 000020)
Got  RTP packet from    193.243.202.124:32344 (type 18, seq 004258, ts 15570860, len 000002)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007447, ts 225507156, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019845, ts 225507152, len 000020)
Got  RTP packet from    193.243.202.124:32344 (type 18, seq 004259, ts 15571100, len 000002)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007448, ts 225507316, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019846, ts 225507312, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007449, ts 225507476, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019847, ts 225507472, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007450, ts 225507636, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019848, ts 225507632, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007451, ts 225507796, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019849, ts 225507792, len 000020)
Got  RTP packet from    193.243.202.124:32344 (type 18, seq 004260, ts 15571260, len 000060)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007452, ts 225507956, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019850, ts 225507952, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007453, ts 225508116, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019851, ts 225508112, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007454, ts 225508276, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019852, ts 225508272, len 000020)
Got  RTP packet from    193.243.202.124:32344 (type 18, seq 004261, ts 15571740, len 000060)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007455, ts 225508436, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019853, ts 225508432, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007456, ts 225508596, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019854, ts 225508592, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007457, ts 225508756, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019855, ts 225508752, len 000020)
Got  RTP packet from    193.243.202.124:32344 (type 18, seq 004262, ts 15572220, len 000060)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007458, ts 225508916, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019856, ts 225508912, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007459, ts 225509076, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019857, ts 225509072, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007460, ts 225509236, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019858, ts 225509232, len 000020)
Got  RTP packet from    193.243.202.124:32344 (type 18, seq 004263, ts 15572700, len 000060)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007461, ts 225509396, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019859, ts 225509392, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007462, ts 225509556, len 000020)
Sent RTP packet to      193.243.202.124:32344 (type 18, seq 019860, ts 225509552, len 000020)
Got  RTP packet from    192.168.254.5:16454 (type 18, seq 007463, ts 225509716, len 000020)

so ? any ideas ?