No audio on both inbound or outbound calls

Hello I’ve installed 12.0.76.2 and Asterisk 13 on my centos 6.7 machine, and everything seemed to be in order as I followed the official install guide, with some small issues here and there.

This is how my dashboard looks like now, all seems to be in order:

I’ve setup my sip trunk, inbound/outbound routes, installed system admin, and updated whatever I needed to update.
Don’t have a physical ip phone yet (it’s on the way from amazon), but I have a application called Zoiper installed on my samsung galaxy S5 android device. Connecting to the server without issues, and this is a photo of audio codec configuration from my phone.

I’ve went through the article on the wiki pages/viewpage.action?pageId=24051965

And made trough each steps to make sure that I didn’t forgot something, and I’m pretty sure I m not missing anything at the moment.

I thought debugging would give me more useful info so I started with the flags asterisk -vvvvvr and I made one outbound call. I m going to replace the phones for privacy, before I paste the log here, I will replace calling number to 727111222 and the receiving number to 727222111, also replaced public ip of my server with x.x.x.x

Here is the log output :

-- Executing [[email protected]:1] Macro("PJSIP/505-00000005", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [[email protected]:1] Set("PJSIP/505-00000005", "TOUCH_MONITOR=1449519566.58") in new stack
    -- Executing [[email protected]:2] Set("PJSIP/505-00000005", "AMPUSER=505") in new stack
    -- Executing [[email protected]:3] GotoIf("PJSIP/505-00000005", "0?report") in new stack
    -- Executing [[email protected]:4] ExecIf("PJSIP/505-00000005", "1?Set(REALCALLERIDNUM=505)") in new stack
    -- Executing [[email protected]:5] Set("PJSIP/505-00000005", "AMPUSER=505") in new stack
    -- Executing [[email protected]:6] GotoIf("PJSIP/505-00000005", "0?limit") in new stack
    -- Executing [[email protected]:7] Set("PJSIP/505-00000005", "AMPUSERCIDNAME=Bob") in new stack
    -- Executing [[email protected]:8] GotoIf("PJSIP/505-00000005", "0?report") in new stack
    -- Executing [[email protected]:9] Set("PJSIP/505-00000005", "AMPUSERCID=505") in new stack
    -- Executing [[email protected]:10] Set("PJSIP/505-00000005", "__DIAL_OPTIONS=Ttr") in new stack
    -- Executing [[email protected]:11] Set("PJSIP/505-00000005", "CALLERID(all)="Bob" <505>") in new stack
    -- Executing [[email protected]:12] GotoIf("PJSIP/505-00000005", "0?limit") in new stack
    -- Executing [[email protected]:13] ExecIf("PJSIP/505-00000005", "1?Set(GROUP(concurrency_limit)=505)") in new stack
    -- Executing [[email protected]:14] GosubIf("PJSIP/505-00000005", "7?sub-ccss,s,1(from-internal,)") in new stack
    -- Executing [[email protected]:1] ExecIf("PJSIP/505-00000005", "0?Return()") in new stack
    -- Executing [[email protected]:2] Set("PJSIP/505-00000005", "CCSS_SETUP=TRUE") in new stack
    -- Executing [[email protected]:3] GosubIf("PJSIP/505-00000005", "0?monitor_config,1(from-internal,):monitor_default,1(from-internal,)") in new stack
    -- Executing [[email protected]:1] GotoIf("PJSIP/505-00000005", "0?is_exten") in new stack
    -- Executing [[email protected]:2] StackPop("PJSIP/505-00000005", "") in new stack
    -- Executing [[email protected]:3] Return("PJSIP/505-00000005", "FALSE") in new stack
    -- Executing [[email protected]:15] GotoIf("PJSIP/505-00000005", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,28)
    -- Executing [[email protected]:28] Set("PJSIP/505-00000005", "CALLERID(number)=505") in new stack
    -- Executing [[email protected]:29] Set("PJSIP/505-00000005", "CALLERID(name)=Bob") in new stack
    -- Executing [[email protected]:30] Set("PJSIP/505-00000005", "CDR(cnum)=505") in new stack
    -- Executing [[email protected]:31] Set("PJSIP/505-00000005", "CDR(cnam)=Bob") in new stack
    -- Executing [[email protected]:32] Set("PJSIP/505-00000005", "CHANNEL(language)=en") in new stack
    -- Executing [[email protected]:2] Gosub("PJSIP/505-00000005", "sub-record-check,s,1(out,+1727222111,dontcare)") in new stack
    -- Executing [[email protected]:1] GotoIf("PJSIP/505-00000005", "0?initialized") in new stack
    -- Executing [[email protected]:2] Set("PJSIP/505-00000005", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [[email protected]:3] Set("PJSIP/505-00000005", "NOW=1449519566") in new stack
    -- Executing [[email protected]:4] Set("PJSIP/505-00000005", "__DAY=07") in new stack
    -- Executing [[email protected]:5] Set("PJSIP/505-00000005", "__MONTH=12") in new stack
    -- Executing [[email protected]:6] Set("PJSIP/505-00000005", "__YEAR=2015") in new stack
    -- Executing [[email protected]:7] Set("PJSIP/505-00000005", "__TIMESTR=20151207-201926") in new stack
    -- Executing [[email protected]:8] Set("PJSIP/505-00000005", "__FROMEXTEN=505") in new stack
    -- Executing [[email protected]:9] Set("PJSIP/505-00000005", "__MON_FMT=wav") in new stack
    -- Executing [[email protected]:10] NoOp("PJSIP/505-00000005", "Recordings initialized") in new stack
    -- Executing [[email protected]:11] ExecIf("PJSIP/505-00000005", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [[email protected]:12] Set("PJSIP/505-00000005", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [[email protected]:13] ExecIf("PJSIP/505-00000005", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [[email protected]:14] GotoIf("PJSIP/505-00000005", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [[email protected]:17] GotoIf("PJSIP/505-00000005", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [[email protected]:1] NoOp("PJSIP/505-00000005", "Outbound Recording Check from 505 to +1727222111") in new stack
    -- Executing [[email protected]:2] Set("PJSIP/505-00000005", "RECMODE=dontcare") in new stack
    -- Executing [[email protected]:3] ExecIf("PJSIP/505-00000005", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [[email protected]:7] Gosub("PJSIP/505-00000005", "recordcheck,1(dontcare,out,+1727222111)") in new stack
    -- Executing [[email protected]:1] NoOp("PJSIP/505-00000005", "Starting recording check against dontcare") in new stack
    -- Executing [[email protected]:2] Goto("PJSIP/505-00000005", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [[email protected]:3] Return("PJSIP/505-00000005", "") in new stack
    -- Executing [[email protected]:8] Return("PJSIP/505-00000005", "") in new stack
    -- Executing [[email protected]:3] Set("PJSIP/505-00000005", "MOHCLASS=default") in new stack
    -- Executing [[email protected]:4] ExecIf("PJSIP/505-00000005", "1?Set(TRUNKCIDOVERRIDE="Boss" <727111222>)") in new stack
    -- Executing [[email protected]:5] Set("PJSIP/505-00000005", "_NODEST=") in new stack
    -- Executing [[email protected]:6] Macro("PJSIP/505-00000005", "dialout-trunk,2,+1727222111,,off") in new stack
    -- Executing [[email protected]:1] Set("PJSIP/505-00000005", "DIAL_TRUNK=2") in new stack
    -- Executing [[email protected]:2] GosubIf("PJSIP/505-00000005", "0?sub-pincheck,s,1()") in new stack
    -- Executing [[email protected]:3] GotoIf("PJSIP/505-00000005", "0?disabletrunk,1") in new stack
    -- Executing [[email protected]:4] Set("PJSIP/505-00000005", "DIAL_NUMBER=+1727222111") in new stack
    -- Executing [[email protected]:5] Set("PJSIP/505-00000005", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [[email protected]:6] Set("PJSIP/505-00000005", "OUTBOUND_GROUP=OUT_2") in new stack
    -- Executing [[email protected]:7] GotoIf("PJSIP/505-00000005", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [[email protected]:9] GotoIf("PJSIP/505-00000005", "0?skipoutcid") in new stack
    -- Executing [[email protected]:10] Set("PJSIP/505-00000005", "DIAL_TRUNK_OPTIONS=Tt") in new stack
    -- Executing [[email protected]:11] Macro("PJSIP/505-00000005", "outbound-callerid,2") in new stack
    -- Executing [[email protected]:1] ExecIf("PJSIP/505-00000005", "0?Set(CALLERPRES()=)") in new stack
    -- Executing [[email protected]:2] ExecIf("PJSIP/505-00000005", "0?Set(REALCALLERIDNUM=505)") in new stack
    -- Executing [[email protected]:3] GotoIf("PJSIP/505-00000005", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [[email protected]:6] Set("PJSIP/505-00000005", "USEROUTCID=") in new stack
    -- Executing [[email protected]:7] Set("PJSIP/505-00000005", "EMERGENCYCID=") in new stack
    -- Executing [[email protected]:8] Set("PJSIP/505-00000005", "TRUNKOUTCID=<727111222>") in new stack
    -- Executing [[email protected]:9] GotoIf("PJSIP/505-00000005", "1?trunkcid") in new stack
    -- Executing [[email protected]:1] GotoIf("PJSIP/505-00000005", "0?is_exten") in new stack
    -- Goto (macro-outbound-callerid,s,14)
    -- Executing [[email protected]:14] ExecIf("PJSIP/505-00000005", "1?Set(CALLERID(all)=<727111222>)") in new stack
    -- Executing [[email protected]:15] ExecIf("PJSIP/505-00000005", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [[email protected]:16] ExecIf("PJSIP/505-00000005", "1?Set(CALLERID(all)=Boss <727111222>)") in new stack
    -- Executing [[email protected]:17] ExecIf("PJSIP/505-00000005", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [[email protected]:18] Set("PJSIP/505-00000005", "CDR(outbound_cnum)=727111222") in new stack
    -- Executing [[email protected]:19] Set("PJSIP/505-00000005", "CDR(outbound_cnam)=Boss") in new stack
    -- Executing [[email protected]:12] GosubIf("PJSIP/505-00000005", "0?sub-flp-2,s,1()") in new stack
    -- Executing [[email protected]:13] Set("PJSIP/505-00000005", "OUTNUM=+1727222111") in new stack
    -- Executing [[email protected]:14] Set("PJSIP/505-00000005", "custom=SIP/flowroute-1") in new stack
    -- Executing [[email protected]:15] ExecIf("PJSIP/505-00000005", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)") in new stack
    -- Executing [[email protected]:16] ExecIf("PJSIP/505-00000005", "0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))") in new stack
    -- Executing [[email protected]:17] Macro("PJSIP/505-00000005", "dialout-trunk-predial-hook,") in new stack
    -- Executing [[email protected]:1] MacroExit("PJSIP/505-00000005", "") in new stack
    -- Executing [[email protected]:18] GotoIf("PJSIP/505-00000005", "0?bypass,1") in new stack
    -- Executing [[email protected]:19] ExecIf("PJSIP/505-00000005", "1?Set(CONNECTEDLINE(num,i)=+1727222111)") in new stack
    -- Executing [[email protected]:20] ExecIf("PJSIP/505-00000005", "1?Set(CONNECTEDLINE(name,i)=CID:727111222)") in new stack
    -- Executing [[email protected]:21] GotoIf("PJSIP/505-00000005", "0?customtrunk") in new stack
    -- Executing [[email protected]:22] Dial("PJSIP/505-00000005", "SIP/flowroute-1/+1727222111,300,Tt") in new stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Called SIP/flowroute-1/+1727222111
    -- SIP/flowroute-1-00000003 is making progress passing it to PJSIP/505-00000005
    -- SIP/flowroute-1-00000003 is making progress passing it to PJSIP/505-00000005
       > 0x7fb19c1cfef0 -- Probation passed - setting RTP source address to 65.98.237.158:17800
    -- SIP/flowroute-1-00000003 answered PJSIP/505-00000005
    -- Channel SIP/flowroute-1-00000003 joined 'simple_bridge' basic-bridge <b0bee2d8-97c1-4fee-8a6f-09fd5e3020fa>
    -- Channel PJSIP/505-00000005 joined 'simple_bridge' basic-bridge <b0bee2d8-97c1-4fee-8a6f-09fd5e3020fa>
    -- Channel SIP/flowroute-1-00000003 left 'simple_bridge' basic-bridge <b0bee2d8-97c1-4fee-8a6f-09fd5e3020fa>
    -- Channel PJSIP/505-00000005 left 'simple_bridge' basic-bridge <b0bee2d8-97c1-4fee-8a6f-09fd5e3020fa>
  == Spawn extension (macro-dialout-trunk, s, 22) exited non-zero on 'PJSIP/505-00000005' in macro 'dialout-trunk'
  == Spawn extension (from-internal, +1727222111, 6) exited non-zero on 'PJSIP/505-00000005'
    -- Executing [[email protected]:1] Hangup("PJSIP/505-00000005", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/505-00000005'
[2015-12-07 20:19:45] NOTICE[5659]: res_pjsip/pjsip_distributor.c:347 log_unidentified_request: Request from '"2000000" <sip:[email protected]>' failed for '188.227.170.13:5070' (c
allid: 081cdd5968135dbba063537d457363cf) - No matching endpoint found
[2015-12-07 20:27:07] NOTICE[5659]: res_pjsip/pjsip_distributor.c:347 log_unidentified_request: Request from '"1111111111" <sip:[email protected]>' failed for '188.227.170.13:50
74' (callid: 95a7dfb25d1b16d4aaa339f8596fce83) - No matching endpoint found
[2015-12-07 20:34:23] NOTICE[5659]: res_pjsip/pjsip_distributor.c:347 log_unidentified_request: Request from '"1111111111" <sip:[email protected]>' failed for '188.227.170.13:50
71' (callid: 9a4a61462e75dbd8dc11717ada84cde7) - No matching endpoint found
[2015-12-07 20:41:35] NOTICE[5659]: res_pjsip/pjsip_distributor.c:347 log_unidentified_request: Request from '"1111111111" <sip:[email protected]>' failed for '188.227.170.13:50
71' (callid: 03093b679cb794a3a48edeec581dbd88) - No matching endpoint found
[2015-12-07 20:48:50] NOTICE[5659]: res_pjsip/pjsip_distributor.c:347 log_unidentified_request: Request from '"1111111111" <sip:[email protected]>' failed for '188.227.170.13:50
71' (callid: d1e8ed1f3711a4571a5be4748cdfaf6c) - No matching endpoint found
[2015-12-07 20:54:03] NOTICE[5659]: res_pjsip/pjsip_distributor.c:347 log_unidentified_request: Request from '"sipvicious" <sip:[email protected]>' failed for '85.25.217.22:5064' (callid: 57
5308615527759096086487) - No matching endpoint found
[2015-12-07 20:56:09] NOTICE[5659]: res_pjsip/pjsip_distributor.c:347 log_unidentified_request: Request from '"5550000" <sip:[email protected]>' failed for '188.227.170.13:5071' (c
allid: cbf47ce563894706ff15523c957480b1) - No matching endpoint found
[2015-12-07 21:03:24] NOTICE[5659]: res_pjsip/pjsip_distributor.c:347 log_unidentified_request: Request from '"5550000" <sip:[email protected]>' failed for '188.227.170.13:5070' (c
allid: 079f7093e7683960f9bcbad5330a0b36) - No matching endpoint found

I think all necessary ports are opened, and selinux is disabled :

netstat -tuplen

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       User       Inode      PID/Program name   
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      27         10437      1734/mysqld         
tcp        0      0 0.0.0.0:5038                0.0.0.0:*                   LISTEN      501        168403     5631/asterisk       
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      0          9709       1535/sshd           
tcp        0      0 0.0.0.0:8088                0.0.0.0:*                   LISTEN      501        168391     5631/asterisk       
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      0          10498      1771/sendmail       
tcp        0      0 :::80                       :::*                        LISTEN      0          169645     5821/httpd          
tcp        0      0 :::22                       :::*                        LISTEN      0          9711       1535/sshd           
udp        0      0 0.0.0.0:42750               0.0.0.0:*                               501        168416     5631/asterisk       
udp        0      0 0.0.0.0:5060                0.0.0.0:*                               501        168418     5631/asterisk       
udp        0      0 0.0.0.0:68                  0.0.0.0:*                               0          8504       1142/dhclient       
udp        0      0 0.0.0.0:5061                0.0.0.0:*                               501        168427     5631/asterisk       
udp        0      0 0.0.0.0:4569                0.0.0.0:*                               501        168434     5631/asterisk       
udp        0      0 0.0.0.0:18398               0.0.0.0:*                               501        172770     5631/asterisk       
udp        0      0 0.0.0.0:18399               0.0.0.0:*                               501        172773     5631/asterisk       
udp        0      0 10.240.0.2:123              0.0.0.0:*                               0          9850       1585/ntpd           
udp        0      0 127.0.0.1:123               0.0.0.0:*                               0          9847       1585/ntpd           
udp        0      0 0.0.0.0:123                 0.0.0.0:*                               0          9840       1585/ntpd           
udp        0      0 fe80::4001:aff:fef0:2:123   :::*                                    0          9852       1585/ntpd           
udp        0      0 ::1:123                     :::*                                    0          9851       1585/ntpd           
udp        0      0 :::123                      :::*                                    0          9841       1585/ntpd     

Based on some other answers I saw from this forum I tried turning asterisk with single r and then turning typing this rtp set debug on, and I called myself from skype :

Got  RTP packet from    216.221.154.14:19392 (type 00, seq 000000, ts 000000, len 000160)
Sent RTP packet to      192.0.0.4:39642 (type 00, seq 043444, ts 000000, len 000160)
Got  RTP packet from    216.221.154.14:19392 (type 00, seq 000001, ts 000160, len 000160)
Sent RTP packet to      192.0.0.4:39642 (type 00, seq 043445, ts 000160, len 000160)
Got  RTP packet from    216.221.154.14:19392 (type 00, seq 000002, ts 000320, len 000160)
Sent RTP packet to      192.0.0.4:39642 (type 00, seq 043446, ts 000320, len 000160)
Got  RTP packet from    216.221.154.14:19392 (type 00, seq 000003, ts 000480, len 000160)
Sent RTP packet to      192.0.0.4:39642 (type 00, seq 043447, ts 000480, len 000160)
Got  RTP packet from    216.221.154.14:19392 (type 00, seq 000004, ts 000640, len 000160)
Sent RTP packet to      192.0.0.4:39642 (type 00, seq 043448, ts 000640, len 000160)
Got  RTP packet from    216.221.154.14:19392 (type 00, seq 000005, ts 000800, len 000160)
Sent RTP packet to      192.0.0.4:39642 (type 00, seq 043449, ts 000800, len 000160)
Got  RTP packet from    216.221.154.14:19392 (type 00, seq 000006, ts 000960, len 000160

Looks like the packets are coming through, I see my one IP in the log being 192.0.0.4 is that my local IP? I’ve put this address in my local networks 10.240.0.0 and 255.255.255.0 in the Local Networks part of the Asterisk SIP settings. Should I add this one too 192.0.0.4?

Also on the sidenote is someone trying to hack my server? if you look at those couple of last entries? But my main question is what do I do next to try to fix the sound, or better say no sound problem? I don’t know what to do next, I appreciate any suggestions, thanks!

For anyone having the same issue here is the solution to get back sound if you’re calling the same server extension:

http://kb.digium.com/articles/Configuration/Why-do-SIP-extensions-configured-in-FreePBX-have-no-audio-during-calls

However I still get no sound when I call a phone number from my sip phone.

Final solution that worked for me is that I enabled IP to make an outbound call. I use a flowroute so you have to do that explicitly in order for your sound to go trough. You can call but there is no sound.

In case you were wondering how :

To answer your side note question, yes someone is trying to register on accounts that shouldn’t be. Sipvicious is a known hack/virus that tries to take over IP phones.

I would use something like IPTables to block those IP addresses. I would suggest getting Fail2Ban running as well to help protect against users like this.