Asterisk - One way audio with PJSIP over PRI - asterisk
I'm having a problem using PJSIP, callee hears me but I got absolute silence on my side..
Few pointers:
1) Chan_SIP works perfectly.
2) PBX and phones are on the same network (no NAT).
3) The problem occurs only on outgoing calls over PRI (no problem when using IAX2 trunk).
4) The issue does not occur when I originate the call via AMI.
5) Asterisk Version - 13.4.0 Freepbx Version - 6.12.65-26 PJSIP version - 2.2 DAHDI version - 2.10.0.1
I know PJSIP is experimental but I have been able to use PJSIP over PRI before.
What could be the problem?
Update(13/07/2015):
I had to delete the previous update and a lot of lines from this log due to characters limit, but it should not matter because the the issue occurs right after dialing (no dial tone).
Called my self from extension 800 (replaced my number and the outbound cid). Here is the asterisk verbose and rtp debug log:
-- Executing [MyNumber#from-internal:1] Macro("PJSIP/800-00000023", "user-callerid,LIMIT,EXTERNAL,") in new stack
-- Executing [s#macro-user-callerid:1] Set("PJSIP/800-00000023", "TOUCH_MONITOR=1436762959.1096921") in new stack
-- Executing [s#macro-user-callerid:2] Set("PJSIP/800-00000023", "AMPUSER=800") in new stack
-- Executing [s#macro-user-callerid:3] GotoIf("PJSIP/800-00000023", "0?report") in new stack
-- Executing [s#macro-user-callerid:4] ExecIf("PJSIP/800-00000023", "1?Set(REALCALLERIDNUM=800)") in new stack
-- Executing [s#macro-user-callerid:5] Set("PJSIP/800-00000023", "AMPUSER=800") in new stack
-- Executing [s#macro-user-callerid:6] GotoIf("PJSIP/800-00000023", "0?limit") in new stack
-- Executing [s#macro-user-callerid:7] Set("PJSIP/800-00000023", "AMPUSERCIDNAME=800") in new stack
-- Executing [s#macro-user-callerid:8] GotoIf("PJSIP/800-00000023", "0?report") in new stack
-- Executing [s#macro-user-callerid:9] Set("PJSIP/800-00000023", "AMPUSERCID=800") in new stack
-- Executing [s#macro-user-callerid:10] Set("PJSIP/800-00000023", "__DIAL_OPTIONS=Ttr") in new stack
-- Executing [s#macro-user-callerid:11] Set("PJSIP/800-00000023", "CALLERID(all)="800" <800>") in new stack
-- Executing [s#macro-user-callerid:12] GotoIf("PJSIP/800-00000023", "0?limit") in new stack
-- Executing [s#macro-user-callerid:13] ExecIf("PJSIP/800-00000023", "1?Set(GROUP(concurrency_limit)=800)") in new stack
-- Executing [s#macro-user-callerid:14] GosubIf("PJSIP/800-00000023", "7?sub-ccss,s,1(from-internal,)") in new stack
-- Executing [s#sub-ccss:1] ExecIf("PJSIP/800-00000023", "0?Return()") in new stack
-- Executing [s#sub-ccss:2] Set("PJSIP/800-00000023", "CCSS_SETUP=TRUE") in new stack
-- Executing [s#sub-ccss:3] GosubIf("PJSIP/800-00000023", "0?monitor_config,1(from-internal,):monitor_default,1(from-internal,)") in new stack
-- Executing [monitor_default#sub-ccss:1] GotoIf("PJSIP/800-00000023", "0?is_exten") in new stack
-- Executing [monitor_default#sub-ccss:2] StackPop("PJSIP/800-00000023", "") in new stack
-- Executing [monitor_default#sub-ccss:3] Return("PJSIP/800-00000023", "FALSE") in new stack
-- Executing [s#macro-user-callerid:15] ExecIf("PJSIP/800-00000023", "0?Set(CHANNEL(language)=)") in new stack
-- Executing [s#macro-user-callerid:16] GotoIf("PJSIP/800-00000023", "1?continue") in new stack
-- Goto (macro-user-callerid,s,30)
-- Executing [s#macro-user-callerid:30] Set("PJSIP/800-00000023", "CALLERID(number)=800") in new stack
-- Executing [s#macro-user-callerid:31] Set("PJSIP/800-00000023", "CALLERID(name)=800") in new stack
-- Executing [s#macro-user-callerid:32] Set("PJSIP/800-00000023", "CDR(cnum)=800") in new stack
-- Executing [s#macro-user-callerid:33] Set("PJSIP/800-00000023", "CDR(cnam)=800") in new stack
-- Executing [s#macro-user-callerid:34] Set("PJSIP/800-00000023", "CHANNEL(language)=en") in new stack
-- Executing [MyNumber#from-internal:2] Gosub("PJSIP/800-00000023", "sub-record-check,s,1(out,MyNumber,dontcare)") in new stack
-- Executing [s#sub-record-check:1] GotoIf("PJSIP/800-00000023", "0?initialized") in new stack
-- Executing [s#sub-record-check:2] Set("PJSIP/800-00000023", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [s#sub-record-check:3] Set("PJSIP/800-00000023", "NOW=1436762959") in new stack
-- Executing [s#sub-record-check:4] Set("PJSIP/800-00000023", "__DAY=13") in new stack
-- Executing [s#sub-record-check:5] Set("PJSIP/800-00000023", "__MONTH=07") in new stack
-- Executing [s#sub-record-check:6] Set("PJSIP/800-00000023", "__YEAR=2015") in new stack
-- Executing [s#sub-record-check:7] Set("PJSIP/800-00000023", "__TIMESTR=20150713-074919") in new stack
-- Executing [s#sub-record-check:8] Set("PJSIP/800-00000023", "__FROMEXTEN=800") in new stack
-- Executing [s#sub-record-check:9] Set("PJSIP/800-00000023", "__MON_FMT=wav") in new stack
-- Executing [s#sub-record-check:10] NoOp("PJSIP/800-00000023", "Recordings initialized") in new stack
-- Executing [s#sub-record-check:11] ExecIf("PJSIP/800-00000023", "0?Set(ARG3=dontcare)") in new stack
-- Executing [s#sub-record-check:12] Set("PJSIP/800-00000023", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s#sub-record-check:13] ExecIf("PJSIP/800-00000023", "0?Set(REC_STATUS=NO)") in new stack
-- Executing [s#sub-record-check:14] GotoIf("PJSIP/800-00000023", "3?checkaction") in new stack
-- Goto (sub-record-check,s,17)
-- Executing [s#sub-record-check:17] GotoIf("PJSIP/800-00000023", "1?sub-record-check,out,1") in new stack
-- Goto (sub-record-check,out,1)
-- Executing [out#sub-record-check:1] NoOp("PJSIP/800-00000023", "Outbound Recording Check from 800 to MyNumber") in new stack
-- Executing [out#sub-record-check:2] Set("PJSIP/800-00000023", "RECMODE=dontcare") in new stack
-- Executing [out#sub-record-check:3] ExecIf("PJSIP/800-00000023", "1?Goto(routewins)") in new stack
-- Goto (sub-record-check,out,7)
-- Executing [out#sub-record-check:7] Gosub("PJSIP/800-00000023", "recordcheck,1(dontcare,out,MyNumber)") in new stack
-- Executing [recordcheck#sub-record-check:1] NoOp("PJSIP/800-00000023", "Starting recording check against dontcare") in new stack
-- Executing [recordcheck#sub-record-check:2] Goto("PJSIP/800-00000023", "dontcare") in new stack
-- Goto (sub-record-check,recordcheck,3)
-- Executing [recordcheck#sub-record-check:3] Return("PJSIP/800-00000023", "") in new stack
-- Executing [out#sub-record-check:8] Return("PJSIP/800-00000023", "") in new stack
-- Executing [MyNumber#from-internal:3] ExecIf("PJSIP/800-00000023", "0 ?Set(CDR(accountcode)=)") in new stack
-- Executing [MyNumber#from-internal:4] Set("PJSIP/800-00000023", "ROUTE_CIDSAVE="800" <800>") in new stack
-- Executing [MyNumber#from-internal:5] Set("PJSIP/800-00000023", "MOHCLASS=default") in new stack
-- Executing [MyNumber#from-internal:6] Set("PJSIP/800-00000023", "_NODEST=") in new stack
-- Executing [MyNumber#from-internal:7] Macro("PJSIP/800-00000023", "dialout-trunk,2,MyNumber,,off") in new stack
-- Executing [s#macro-dialout-trunk:1] Set("PJSIP/800-00000023", "DIAL_TRUNK=2") in new stack
-- Executing [s#macro-dialout-trunk:2] GosubIf("PJSIP/800-00000023", "0?sub-pincheck,s,1()") in new stack
-- Executing [s#macro-dialout-trunk:3] GotoIf("PJSIP/800-00000023", "0?disabletrunk,1") in new stack
-- Executing [s#macro-dialout-trunk:4] Set("PJSIP/800-00000023", "DIAL_NUMBER=MyNumber") in new stack
-- Executing [s#macro-dialout-trunk:5] Set("PJSIP/800-00000023", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
-- Executing [s#macro-dialout-trunk:6] Set("PJSIP/800-00000023", "OUTBOUND_GROUP=OUT_2") in new stack
-- Executing [s#macro-dialout-trunk:7] GotoIf("PJSIP/800-00000023", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,9)
-- Executing [s#macro-dialout-trunk:9] GotoIf("PJSIP/800-00000023", "0?skipoutcid") in new stack
-- Executing [s#macro-dialout-trunk:10] Set("PJSIP/800-00000023", "DIAL_TRUNK_OPTIONS=Tt") in new stack
-- Executing [s#macro-dialout-trunk:11] Macro("PJSIP/800-00000023", "outbound-callerid,2") in new stack
-- Executing [s#macro-outbound-callerid:1] ExecIf("PJSIP/800-00000023", "0?Set(CALLERPRES()=)") in new stack
-- Executing [s#macro-outbound-callerid:2] ExecIf("PJSIP/800-00000023", "0?Set(REALCALLERIDNUM=800)") in new stack
-- Executing [s#macro-outbound-callerid:3] GotoIf("PJSIP/800-00000023", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,6)
-- Executing [s#macro-outbound-callerid:6] Set("PJSIP/800-00000023", "USEROUTCID=OutboundCID") in new stack
-- Executing [s#macro-outbound-callerid:7] Set("PJSIP/800-00000023", "EMERGENCYCID=") in new stack
-- Executing [s#macro-outbound-callerid:8] Set("PJSIP/800-00000023", "TRUNKOUTCID=") in new stack
-- Executing [s#macro-outbound-callerid:9] GotoIf("PJSIP/800-00000023", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,14)
-- Executing [s#macro-outbound-callerid:14] ExecIf("PJSIP/800-00000023", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s#macro-outbound-callerid:15] ExecIf("PJSIP/800-00000023", "1?Set(CALLERID(all)=OutboundCID)") in new stack
-- Executing [s#macro-outbound-callerid:16] ExecIf("PJSIP/800-00000023", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s#macro-outbound-callerid:17] ExecIf("PJSIP/800-00000023", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
-- Executing [s#macro-outbound-callerid:18] Set("PJSIP/800-00000023", "CDR(outbound_cnum)=OutboundCID") in new stack
-- Executing [s#macro-outbound-callerid:19] Set("PJSIP/800-00000023", "CDR(outbound_cnam)=") in new stack
[2015-07-13 07:49:19] WARNING[28882]: func_cdr.c:351 cdr_write_callback: CDR requires a value (CDR(variable)=value)
-- Executing [s#macro-dialout-trunk:12] GosubIf("PJSIP/800-00000023", "0?sub-flp-2,s,1()") in new stack
-- Executing [s#macro-dialout-trunk:13] Set("PJSIP/800-00000023", "OUTNUM=MyNumber") in new stack
-- Executing [s#macro-dialout-trunk:14] Set("PJSIP/800-00000023", "custom=DAHDI/r0") in new stack
-- Executing [s#macro-dialout-trunk:15] ExecIf("PJSIP/800-00000023", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)") in new stack
-- Executing [s#macro-dialout-trunk:16] ExecIf("PJSIP/800-00000023", "0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))") in new stack
-- Executing [s#macro-dialout-trunk:17] Macro("PJSIP/800-00000023", "dialout-trunk-predial-hook,") in new stack
-- Executing [s#macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/800-00000023", "") in new stack
-- Executing [s#macro-dialout-trunk:18] GotoIf("PJSIP/800-00000023", "0?bypass,1") in new stack
-- Executing [s#macro-dialout-trunk:19] ExecIf("PJSIP/800-00000023", "1?Set(CONNECTEDLINE(name,i)=CID:OutboundCID)") in new stack
-- Executing [s#macro-dialout-trunk:20] GotoIf("PJSIP/800-00000023", "0?customtrunk") in new stack
-- Executing [s#macro-dialout-trunk:21] Dial("PJSIP/800-00000023", "DAHDI/r0/MyNumber,300,Tt") in new stack
-- Requested transfer capability: 0x00 - SPEECH
-- Called DAHDI/r0/MyNumber
-- Moving call (DAHDI/i1/MyNumber-2d9d) from channel 27 to 25.
-- DAHDI/i1/MyNumber-2d9d is proceeding passing it to PJSIP/800-00000023
-- DAHDI/i1/MyNumber-2d9d is ringing
-- DAHDI/i1/MyNumber-2d9d is making progress passing it to PJSIP/800-00000023
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039504, ts 000160, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039505, ts 000320, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039506, ts 000480, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039507, ts 000640, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039508, ts 000800, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039509, ts 000960, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039510, ts 001120, len 000160)
> 0x7522dd98 -- Probation passed - setting RTP source address to 100.100.100.215:11794
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000000, ts 2527472030, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039511, ts 001280, len 000160)
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000001, ts 2527472190, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039512, ts 001440, len 000160)
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000002, ts 2527472350, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039513, ts 001600, len 000160)
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000003, ts 2527472510, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039514, ts 001760, len 000160)
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000004, ts 2527472670, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039515, ts 001920, len 000160)
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000005, ts 2527472830, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039516, ts 002080, len 000160)
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000006, ts 2527472990, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039517, ts 002240, len 000160)
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000007, ts 2527473150, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039518, ts 002400, len 000160)
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000008, ts 2527473310, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039519, ts 002560, len 000160)
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000009, ts 2527473470, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039520, ts 002720, len 000160)
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000010, ts 2527473630, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039521, ts 002880, len 000160)
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000011, ts 2527473790, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039522, ts 003040, len 000160)
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000012, ts 2527473950, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039523, ts 003200, len 000160)
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000013, ts 2527474110, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039524, ts 003360, len 000160)
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000014, ts 2527474270, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039525, ts 003520, len 000160)
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000015, ts 2527474430, len 000160)
-- DAHDI/i1/MyNumber-2d9d answered PJSIP/800-00000023
-- Channel PJSIP/800-00000023 joined 'simple_bridge' basic-bridge <cf7c4ae4-19b8-45a1-92ac-13de2d1fcd7b>
-- Channel DAHDI/i1/MyNumber-2d9d joined 'simple_bridge' basic-bridge <cf7c4ae4-19b8-45a1-92ac-13de2d1fcd7b>
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000286, ts 2527517790, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039797, ts 047040, len 000160)
Got RTP packet from 100.100.100.215:11794 (type 00, seq 000287, ts 2527517950, len 000160)
Sent RTP packet to 100.100.100.215:11794 (type 08, seq 039798, ts 047200, len 000160)
-- Channel PJSIP/800-00000023 left 'simple_bridge' basic-bridge <cf7c4ae4-19b8-45a1-92ac-13de2d1fcd7b>
-- Channel DAHDI/i1/MyNumber-2d9d left 'simple_bridge' basic-bridge <cf7c4ae4-19b8-45a1-92ac-13de2d1fcd7b>
== Spawn extension (macro-dialout-trunk, s, 21) exited non-zero on 'PJSIP/800-00000023' in macro 'dialout-trunk'
-- Hungup 'DAHDI/i1/MyNumber-2d9d'
== Spawn extension (from-internal, MyNumber, 7) exited non-zero on 'PJSIP/800-00000023'
-- Executing [h#from-internal:1] Hangup("PJSIP/800-00000023", "") in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/800-00000023'
Thanks for all the help!
You need nat=yes in chan_dahdi.conf under [channels].
Related
ERROR[12799] netsock2.c: getaddrinfo("ims.ntc.net.np", "(null)", ...): Name or service not known, How can i resolve this issue?
I am trying to configure NTC SIP Line Trunk configuration but " ERROR[12799] netsock2.c: getaddrinfo("ims.ntc.net.np", "(null)", ...): Name or service not known" error occur. Telecom said that our sip request not reaching there, How can i resolve this issue ? [2020-07-24 07:59:05] ERROR[12799] netsock2.c: getaddrinfo("ims.ntc.net.np", "(null)", ...): Name or service not known [2020-07-24 07:59:05] WARNING[12799] acl.c: Unable to lookup 'ims.ntc.net.np' [2020-07-24 07:59:05] WARNING[12799] acl.c: Cannot connect to (null): Invalid argument [2020-07-24 07:59:05] WARNING[12799] chan_sip.c: sip_xmit of 0x7f93981e0960 (len 433) to (null) returned -1: Invalid argument [2020-07-24 07:59:05] NOTICE[12799] chan_sip.c: -- Registration for '+97723597002#ims.ntc.net.np' timed out, trying again (Attempt #14) [2020-07-24 07:59:05] WARNING[12799] chan_sip.c: Retransmission timeout reached on transmission 63c184f060c6ddd85c43e1b75b3aec3f#127.0.0.1 for seqno 114 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions Packet timed out after 60031ms with no response [2020-07-24 07:59:06] WARNING[12799] chan_sip.c: sip_xmit of 0x7f93981e0960 (len 433) to (null) returned -1: Invalid argument [2020-07-24 07:59:07] WARNING[12799] chan_sip.c: sip_xmit of 0x7f93981e0960 (len 433) to (null) returned -1: Invalid argument [2020-07-24 07:59:09] WARNING[12799] chan_sip.c: sip_xmit of 0x7f93981e0960 (len 433) to (null) returned -1: Invalid argument [2020-07-24 07:59:13] WARNING[12799] chan_sip.c: sip_xmit of 0x7f93981e0960 (len 433) to (null) returned -1: Invalid argument [2020-07-24 07:59:17] WARNING[12799] chan_sip.c: sip_xmit of 0x7f93981e0960 (len 433) to (null) returned -1: Invalid argument [2020-07-24 07:59:21] WARNING[12799] chan_sip.c: sip_xmit of 0x7f93981e0960 (len 433) to (null) returned -1: Invalid argument [2020-07-24 07:59:25] WARNING[12799] chan_sip.c: sip_xmit of 0x7f93981e0960 (len 433) to (null) returned -1: Invalid argument [2020-07-24 08:00:05] ERROR[12799] netsock2.c: getaddrinfo("ims.ntc.net.np", "(null)", ...): Name or service not known
This is a DNS Looukup error. If you are using this DNS in any trunk configuration this is the source of the problem, map using and IP directly and you will have no more errors. But if the trunk is using an IP I suggest you to map this domain. The provider can use an internal domain in the request and this can trow an error. Check too if there's no firewall blocking the communication.
You are using somewhere trunk host name "ims.ntc.net.np" and that dns name is invalid. Check name or ensure dns works okay.
Asterisk error: Failed to authenticate on INVITE to - can't call
I've installed Asterisk from the ViciBox iso (ViciBox_v.7.x86_64-7.0.4). I'm using a softphone (BRIA by CounterPath) and I set it up on asterisk by vicidial. I can correctly receive calls on the Bria soft phone calling the voip number. The problem is that I can't make calls. When I try to call in the asterisk console I have: [May 31 14:19:56] Connected to Asterisk 11.25.1-vici currently running on vicibox7 (pid = 1476) [May 31 14:20:01] == Manager 'sendcron' logged on from 127.0.0.1 [May 31 14:20:01] == Manager 'sendcron' logged off from 127.0.0.1 [May 31 14:20:01] == Manager 'sendcron' logged on from 127.0.0.1 [May 31 14:20:01] == Manager 'sendcron' logged off from 127.0.0.1 [May 31 14:20:06] == Manager 'sendcron' logged on from 127.0.0.1 [May 31 14:20:06] == Manager 'sendcron' logged off from 127.0.0.1 [May 31 14:20:28] == Using SIP RTP CoS mark 5 [May 31 14:20:28] -- Executing [0039**********#default:1] Goto("SIP/001-00000000", "to-Gloobobusiness,s,1") in new stack [May 31 14:20:28] -- Goto (to-Gloobobusiness,s,1) [May 31 14:20:28] -- Executing [s#to-Gloobobusiness:1] NoOp("SIP/001-00000000", "Chiamata in uscita sul trunk di gloonobusiness") in new stack [May 31 14:20:28] -- Executing [s#to-Gloobobusiness:2] Dial("SIP/001-00000000", "SIP/s#Trunk_Gloobobusiness") in new stack [May 31 14:20:28] == Using SIP RTP CoS mark 5 [May 31 14:20:28] -- Called SIP/s#Trunk_Gloobobusiness [May 31 14:20:28] NOTICE[1558][C-00000000]: chan_sip.c:23309 handle_response_invite: Failed to authenticate on INVITE to '"cccenter" <sip:001#79.47.20.72>;tag=as6d2f2341' [May 31 14:20:28] -- SIP/Trunk_Gloobobusiness-00000001 is circuit-busy [May 31 14:20:28] == Everyone is busy/congested at this time (1:0/1/0) [May 31 14:20:28] -- Auto fallthrough, channel 'SIP/001-00000000' status is 'CONGESTION' My dialplan: exten => _+39.,1,Goto(to-Gloobobusiness,s,1) exten => _39.,1,Goto(to-Gloobobusiness,s,1) exten => _0039.,1,Goto(to-Gloobobusiness,s,1) [to-Gloobobusiness] exten => s,1,NoOp(Chiamata in uscita sul trunk di gloonobusiness) same => n,Dial(SIP/${EXTEN}#Trunk_Gloobobusiness) [from-Gloobobusiness] exten => s,1,NoOp(Chiamata in ingresso mando al 001) same => n,Dial(SIP/001)
What is not clear for you in your debug output? You are trying to call ti s#Trunk_Gloobobusiness Not think any trunk happy with number s.
Asterisk cannot hear sound on Wifi network only
I've installed Asterisk + FreePBX on CentOS 6.5. Case 1 Asterisk + FreePBX + CentOS 6.5 Phone A - Android 4G newtork (Linphone, PCMA codec) Phone B - Android Wifi network (Linphone, PCMA codec) If I can make a call to Phone B from Phone A, it works and answers the phone. However, I can only hear sound from Phone A when I speak on Phone B. I thought it is NAT problem, and checked all firewalls for Asterisk. There is no problem with Wifi network either. Is there a way to change NAT settings correctly? Thank you. Here is the Asterisk CLI logs when I make a call and talk on the phone. == Using SIP RTP TOS bits 184 == Using SIP RTP CoS mark 5 -- Executing [1004#from-internal:1] Set("SIP/1003-0000005e", "__RINGTIMER=15") in new stack -- Executing [1004#from-internal:2] Macro("SIP/1003-0000005e", "exten-vm,novm,1004,0,0,0") in new stack -- Executing [s#macro-exten-vm:1] Macro("SIP/1003-0000005e", "user-callerid,") in new stack -- Executing [s#macro-user-callerid:1] Set("SIP/1003-0000005e", "TOUCH_MONITOR=1395938841.94") in new stack -- Executing [s#macro-user-callerid:2] Set("SIP/1003-0000005e", "AMPUSER=1003") in new stack -- Executing [s#macro-user-callerid:3] GotoIf("SIP/1003-0000005e", "0?report") in new stack -- Executing [s#macro-user-callerid:4] ExecIf("SIP/1003-0000005e", "1?Set(REALCALLERIDNUM=1003)") in new stack -- Executing [s#macro-user-callerid:5] Set("SIP/1003-0000005e", "AMPUSER=1003") in new stack -- Executing [s#macro-user-callerid:6] GotoIf("SIP/1003-0000005e", "0?limit") in new stack -- Executing [s#macro-user-callerid:7] Set("SIP/1003-0000005e", "AMPUSERCIDNAME=Third") in new stack -- Executing [s#macro-user-callerid:8] GotoIf("SIP/1003-0000005e", "0?report") in new stack -- Executing [s#macro-user-callerid:9] Set("SIP/1003-0000005e", "AMPUSERCID=1003") in new stack -- Executing [s#macro-user-callerid:10] Set("SIP/1003-0000005e", "__DIAL_OPTIONS=Ttr") in new stack -- Executing [s#macro-user-callerid:11] Set("SIP/1003-0000005e", "CALLERID(all)="Third" <1003>") in new stack -- Executing [s#macro-user-callerid:12] GotoIf("SIP/1003-0000005e", "0?limit") in new stack -- Executing [s#macro-user-callerid:13] ExecIf("SIP/1003-0000005e", "0?Set(GROUP(concurrency_limit)=1003)") in new stack -- Executing [s#macro-user-callerid:14] GosubIf("SIP/1003-0000005e", "7?sub-ccss,s,1(macro-exten-vm,1004)") in new stack -- Executing [s#sub-ccss:1] ExecIf("SIP/1003-0000005e", "0?Return()") in new stack -- Executing [s#sub-ccss:2] Set("SIP/1003-0000005e", "CCSS_SETUP=TRUE") in new stack -- Executing [s#sub-ccss:3] GosubIf("SIP/1003-0000005e", "0?monitor_config,1(macro-exten-vm,1004):monitor_default,1(macro-exten-vm,1004)") in new stack -- Executing [monitor_default#sub-ccss:1] GotoIf("SIP/1003-0000005e", "1?is_exten") in new stack -- Goto (sub-ccss,monitor_default,4) -- Executing [monitor_default#sub-ccss:4] Set("SIP/1003-0000005e", "CALLCOMPLETION(cc_monitor_policy)=generic") in new stack -- Executing [monitor_default#sub-ccss:5] Set("SIP/1003-0000005e", "CALLCOMPLETION(cc_max_monitors)=5") in new stack -- Executing [monitor_default#sub-ccss:6] Return("SIP/1003-0000005e", "TRUE") in new stack -- Executing [s#sub-ccss:4] GosubIf("SIP/1003-0000005e", "7?agent_config,1():agent_default,1()") in new stack -- Executing [agent_config#sub-ccss:1] Set("SIP/1003-0000005e", "CALLCOMPLETION(cc_agent_policy)=generic") in new stack -- Executing [agent_config#sub-ccss:2] Set("SIP/1003-0000005e", "CALLCOMPLETION(cc_offer_timer)=30") in new stack -- Executing [agent_config#sub-ccss:3] Set("SIP/1003-0000005e", "CALLCOMPLETION(ccbs_available_timer)=") in new stack -- Executing [agent_config#sub-ccss:4] Set("SIP/1003-0000005e", "CALLCOMPLETION(ccnr_available_timer)=") in new stack -- Executing [agent_config#sub-ccss:5] Set("SIP/1003-0000005e", "CALLCOMPLETION(cc_callback_macro)=ccss-default") in new stack -- Executing [agent_config#sub-ccss:6] ExecIf("SIP/1003-0000005e", "1?Set(CALLCOMPLETION(cc_recall_timer)=)") in new stack -- Executing [agent_config#sub-ccss:7] ExecIf("SIP/1003-0000005e", "1?Set(CALLCOMPLETION(cc_max_agents)=)") in new stack -- Executing [agent_config#sub-ccss:8] ExecIf("SIP/1003-0000005e", "0?Set(CALLCOMPLETION(cc_agent_dialstring)=Local/1003_1004#from-ccss-)") in new stack -- Executing [agent_config#sub-ccss:9] Set("SIP/1003-0000005e", "CALLCOMPLETION(cc_callback_macro)=ccss-default") in new stack -- Executing [agent_config#sub-ccss:10] Return("SIP/1003-0000005e", "") in new stack -- Executing [s#sub-ccss:5] Set("SIP/1003-0000005e", "DB(AMPUSER/1003/ccss/last_number)=1004") in new stack -- Executing [s#sub-ccss:6] Return("SIP/1003-0000005e", "") in new stack -- Executing [s#macro-user-callerid:15] ExecIf("SIP/1003-0000005e", "0?Set(CHANNEL(language)=)") in new stack -- Executing [s#macro-user-callerid:16] GotoIf("SIP/1003-0000005e", "0?continue") in new stack -- Executing [s#macro-user-callerid:17] ExecIf("SIP/1003-0000005e", "1?Set(__CALLEE_ACCOUNCODE=)") in new stack -- Executing [s#macro-user-callerid:18] Set("SIP/1003-0000005e", "__TTL=64") in new stack -- Executing [s#macro-user-callerid:19] GotoIf("SIP/1003-0000005e", "1?continue") in new stack -- Goto (macro-user-callerid,s,30) -- Executing [s#macro-user-callerid:30] Set("SIP/1003-0000005e", "CALLERID(number)=1003") in new stack -- Executing [s#macro-user-callerid:31] Set("SIP/1003-0000005e", "CALLERID(name)=Third") in new stack -- Executing [s#macro-user-callerid:32] Set("SIP/1003-0000005e", "CDR(cnum)=1003") in new stack -- Executing [s#macro-user-callerid:33] Set("SIP/1003-0000005e", "CDR(cnam)=Third") in new stack -- Executing [s#macro-user-callerid:34] Set("SIP/1003-0000005e", "CHANNEL(language)=en") in new stack -- Executing [s#macro-exten-vm:2] Set("SIP/1003-0000005e", "RingGroupMethod=none") in new stack -- Executing [s#macro-exten-vm:3] Set("SIP/1003-0000005e", "__EXTTOCALL=1004") in new stack -- Executing [s#macro-exten-vm:4] Set("SIP/1003-0000005e", "__PICKUPMARK=1004") in new stack -- Executing [s#macro-exten-vm:5] Set("SIP/1003-0000005e", "RT=") in new stack -- Executing [s#macro-exten-vm:6] ExecIf("SIP/1003-0000005e", "0?Macro(vm,novm,DIRECTDIAL,)") in new stack -- Executing [s#macro-exten-vm:7] ExecIf("SIP/1003-0000005e", "0?MacroExit()") in new stack -- Executing [s#macro-exten-vm:8] Gosub("SIP/1003-0000005e", "sub-record-check,s,1(exten,1004,)") in new stack -- Executing [s#sub-record-check:1] Set("SIP/1003-0000005e", "REC_POLICY_MODE_SAVE=") in new stack -- Executing [s#sub-record-check:2] GotoIf("SIP/1003-0000005e", "1?check") in new stack -- Goto (sub-record-check,s,7) -- Executing [s#sub-record-check:7] Set("SIP/1003-0000005e", "__MON_FMT=wav") in new stack -- Executing [s#sub-record-check:8] GotoIf("SIP/1003-0000005e", "1?next") in new stack -- Goto (sub-record-check,s,11) -- Executing [s#sub-record-check:11] ExecIf("SIP/1003-0000005e", "0?Return()") in new stack -- Executing [s#sub-record-check:12] ExecIf("SIP/1003-0000005e", "0?Set(__REC_POLICY_MODE=)") in new stack -- Executing [s#sub-record-check:13] GotoIf("SIP/1003-0000005e", "0?exten,1") in new stack -- Executing [s#sub-record-check:14] Set("SIP/1003-0000005e", "__REC_STATUS=INITIALIZED") in new stack -- Executing [s#sub-record-check:15] Set("SIP/1003-0000005e", "NOW=1395938841") in new stack -- Executing [s#sub-record-check:16] Set("SIP/1003-0000005e", "__DAY=28") in new stack -- Executing [s#sub-record-check:17] Set("SIP/1003-0000005e", "__MONTH=03") in new stack -- Executing [s#sub-record-check:18] Set("SIP/1003-0000005e", "__YEAR=2014") in new stack -- Executing [s#sub-record-check:19] Set("SIP/1003-0000005e", "__TIMESTR=20140328-014721") in new stack -- Executing [s#sub-record-check:20] Set("SIP/1003-0000005e", "__FROMEXTEN=1003") in new stack -- Executing [s#sub-record-check:21] Set("SIP/1003-0000005e", "__CALLFILENAME=exten-1004-1003-20140328-014721-1395938841.94") in new stack -- Executing [s#sub-record-check:22] Goto("SIP/1003-0000005e", "exten,1") in new stack -- Goto (sub-record-check,exten,1) -- Executing [exten#sub-record-check:1] GotoIf("SIP/1003-0000005e", "0?callee") in new stack -- Executing [exten#sub-record-check:2] Set("SIP/1003-0000005e", "__REC_POLICY_MODE=dontcare") in new stack -- Executing [exten#sub-record-check:3] GotoIf("SIP/1003-0000005e", "1?caller") in new stack -- Goto (sub-record-check,exten,10) -- Executing [exten#sub-record-check:10] Set("SIP/1003-0000005e", "__REC_POLICY_MODE=dontcare") in new stack -- Executing [exten#sub-record-check:11] GosubIf("SIP/1003-0000005e", "0?record,1(exten,1004,1003)") in new stack -- Executing [exten#sub-record-check:12] Return("SIP/1003-0000005e", "") in new stack -- Executing [s#macro-exten-vm:9] GotoIf("SIP/1003-0000005e", "1?macrodial") in new stack -- Goto (macro-exten-vm,s,15) -- Executing [s#macro-exten-vm:15] GosubIf("SIP/1003-0000005e", "0?clrheader,1()") in new stack -- Executing [s#macro-exten-vm:16] Macro("SIP/1003-0000005e", "dial-one,,Ttr,1004") in new stack -- Executing [s#macro-dial-one:1] Set("SIP/1003-0000005e", "DEXTEN=1004") in new stack -- Executing [s#macro-dial-one:2] Set("SIP/1003-0000005e", "DIALSTATUS_CW=") in new stack -- Executing [s#macro-dial-one:3] GosubIf("SIP/1003-0000005e", "0?screen,1()") in new stack -- Executing [s#macro-dial-one:4] GosubIf("SIP/1003-0000005e", "0?cf,1()") in new stack -- Executing [s#macro-dial-one:5] GotoIf("SIP/1003-0000005e", "1?skip1") in new stack -- Goto (macro-dial-one,s,8) -- Executing [s#macro-dial-one:8] GotoIf("SIP/1003-0000005e", "0?nodial") in new stack -- Executing [s#macro-dial-one:9] GotoIf("SIP/1003-0000005e", "0?continue") in new stack -- Executing [s#macro-dial-one:10] Set("SIP/1003-0000005e", "EXTHASCW=ENABLED") in new stack -- Executing [s#macro-dial-one:11] GotoIf("SIP/1003-0000005e", "0?next1:cwinusebusy") in new stack -- Goto (macro-dial-one,s,23) -- Executing [s#macro-dial-one:23] GotoIf("SIP/1003-0000005e", "1?next3:continue") in new stack -- Goto (macro-dial-one,s,24) -- Executing [s#macro-dial-one:24] ExecIf("SIP/1003-0000005e", "0?Set(DIALSTATUS_CW=BUSY)") in new stack -- Executing [s#macro-dial-one:25] GotoIf("SIP/1003-0000005e", "0?nodial") in new stack -- Executing [s#macro-dial-one:26] GosubIf("SIP/1003-0000005e", "1?dstring,1():dlocal,1()") in new stack -- Executing [dstring#macro-dial-one:1] Set("SIP/1003-0000005e", "DSTRING=") in new stack -- Executing [dstring#macro-dial-one:2] Set("SIP/1003-0000005e", "DEVICES=1004") in new stack -- Executing [dstring#macro-dial-one:3] ExecIf("SIP/1003-0000005e", "0?Return()") in new stack -- Executing [dstring#macro-dial-one:4] ExecIf("SIP/1003-0000005e", "0?Set(DEVICES=004)") in new stack -- Executing [dstring#macro-dial-one:5] Set("SIP/1003-0000005e", "LOOPCNT=1") in new stack -- Executing [dstring#macro-dial-one:6] Set("SIP/1003-0000005e", "ITER=1") in new stack -- Executing [dstring#macro-dial-one:7] Set("SIP/1003-0000005e", "THISDIAL=SIP/1004") in new stack -- Executing [dstring#macro-dial-one:8] GosubIf("SIP/1003-0000005e", "1?zap2dahdi,1()") in new stack -- Executing [zap2dahdi#macro-dial-one:1] ExecIf("SIP/1003-0000005e", "0?Return()") in new stack -- Executing [zap2dahdi#macro-dial-one:2] Set("SIP/1003-0000005e", "NEWDIAL=") in new stack -- Executing [zap2dahdi#macro-dial-one:3] Set("SIP/1003-0000005e", "LOOPCNT2=1") in new stack -- Executing [zap2dahdi#macro-dial-one:4] Set("SIP/1003-0000005e", "ITER2=1") in new stack -- Executing [zap2dahdi#macro-dial-one:5] Set("SIP/1003-0000005e", "THISPART2=SIP/1004") in new stack -- Executing [zap2dahdi#macro-dial-one:6] ExecIf("SIP/1003-0000005e", "0?Set(THISPART2=DAHDI/1004)") in new stack -- Executing [zap2dahdi#macro-dial-one:7] Set("SIP/1003-0000005e", "NEWDIAL=SIP/1004&") in new stack -- Executing [zap2dahdi#macro-dial-one:8] Set("SIP/1003-0000005e", "ITER2=2") in new stack -- Executing [zap2dahdi#macro-dial-one:9] GotoIf("SIP/1003-0000005e", "0?begin2") in new stack -- Executing [zap2dahdi#macro-dial-one:10] Set("SIP/1003-0000005e", "THISDIAL=SIP/1004") in new stack -- Executing [zap2dahdi#macro-dial-one:11] Return("SIP/1003-0000005e", "") in new stack -- Executing [dstring#macro-dial-one:9] Set("SIP/1003-0000005e", "DSTRING=SIP/1004&") in new stack -- Executing [dstring#macro-dial-one:10] Set("SIP/1003-0000005e", "ITER=2") in new stack -- Executing [dstring#macro-dial-one:11] GotoIf("SIP/1003-0000005e", "0?begin") in new stack -- Executing [dstring#macro-dial-one:12] Set("SIP/1003-0000005e", "DSTRING=SIP/1004") in new stack -- Executing [dstring#macro-dial-one:13] Return("SIP/1003-0000005e", "") in new stack -- Executing [s#macro-dial-one:27] GotoIf("SIP/1003-0000005e", "0?nodial") in new stack -- Executing [s#macro-dial-one:28] GotoIf("SIP/1003-0000005e", "0?skiptrace") in new stack -- Executing [s#macro-dial-one:29] GosubIf("SIP/1003-0000005e", "1?ctset,1():ctclear,1()") in new stack -- Executing [ctset#macro-dial-one:1] Set("SIP/1003-0000005e", "DB(CALLTRACE/1004)=1003") in new stack -- Executing [ctset#macro-dial-one:2] Return("SIP/1003-0000005e", "") in new stack -- Executing [s#macro-dial-one:30] Set("SIP/1003-0000005e", "D_OPTIONS=Ttr") in new stack -- Executing [s#macro-dial-one:31] ExecIf("SIP/1003-0000005e", "0?SIPAddHeader(Alert-Info: )") in new stack -- Executing [s#macro-dial-one:32] ExecIf("SIP/1003-0000005e", "0?SIPAddHeader()") in new stack -- Executing [s#macro-dial-one:33] ExecIf("SIP/1003-0000005e", "0?Set(CHANNEL(musicclass)=)") in new stack -- Executing [s#macro-dial-one:34] GosubIf("SIP/1003-0000005e", "0?qwait,1()") in new stack -- Executing [s#macro-dial-one:35] Set("SIP/1003-0000005e", "__CWIGNORE=") in new stack -- Executing [s#macro-dial-one:36] Set("SIP/1003-0000005e", "__KEEPCID=TRUE") in new stack -- Executing [s#macro-dial-one:37] GotoIf("SIP/1003-0000005e", "0?usegoto,1") in new stack -- Executing [s#macro-dial-one:38] GotoIf("SIP/1003-0000005e", "0?godial") in new stack -- Executing [s#macro-dial-one:39] Gosub("SIP/1003-0000005e", "sub-presencestate-display,s,1(1004)") in new stack -- Executing [s#sub-presencestate-display:1] Goto("SIP/1003-0000005e", "state-,1") in new stack -- Goto (sub-presencestate-display,state-,1) -- Executing [state-#sub-presencestate-display:1] Set("SIP/1003-0000005e", "PRESENCESTATE_DISPLAY=") in new stack -- Executing [state-#sub-presencestate-display:2] Return("SIP/1003-0000005e", "") in new stack -- Executing [s#macro-dial-one:40] Set("SIP/1003-0000005e", "CONNECTEDLINE(name,i)=fourth") in new stack -- Executing [s#macro-dial-one:41] Set("SIP/1003-0000005e", "CONNECTEDLINE(num)=1004") in new stack -- Executing [s#macro-dial-one:42] Set("SIP/1003-0000005e", "D_OPTIONS=TtrI") in new stack -- Executing [s#macro-dial-one:43] Dial("SIP/1003-0000005e", "SIP/1004,,TtrI") in new stack == Using SIP RTP TOS bits 184 == Using SIP RTP CoS mark 5 -- Called SIP/1004 -- Connected line update to SIP/1003-0000005e prevented. -- SIP/1004-0000005f is ringing -- SIP/1004-0000005f is ringing -- Connected line update to SIP/1003-0000005e prevented. -- SIP/1004-0000005f answered SIP/1003-0000005e ============================================================================= SIP contact Android on Wifi Addr->IP : 14.63.12.134:5060 Reg. Contact : sip:1000#14.63.12.134 Android on 4G LTE Addr->IP : 223.62.202.25:58184 Reg. Contact : sip:1002#223.62.202.25:58184 It looks like Android on Wifi failed to get right address. It doesn't show specific port to send voice.
That's why I love plain-clean Asterisk, your console doesn't get flooded like this for a single call. :) If you're absolutely sure the codecs are fine, then the audio RTP is not reaching the phone. Check where it's being sent inspecting the SIP INVITE messages (assuming 1003 is the phone not working): > sip show peer 1003 Look for the Codecs information. If they're good, look into NAT. Set > sip set debug on Or for a specific peer: > sip set debug on peer 1003 Then check your headers, specifically the Contact: header which states 'hey contact me back here'. If the call is created, meaning the control signaling goes through (you can CALL and HANGUP in either phone) then I'm pretty sure it's a codec issue. If the control is not 100% fine (for example you HANGUP in one phone and the other doesn't know) then it's probably a network issue. Hope it helps!
Detect multiple keys in confbridge asterisk 11
How can I detect multiple keys in a conference in confbridge application. Right now I can only detect a single key number digit. How can I detect a 2 digit or 3 digit number for example 45 or 454. Please help me. Thanks
You can detect 4, record that detection, detect next digit(5), record it again. Do that as many times as you need.
Yup, it's completely possible to have DTMF menus that are triggered based on multiple DTMF keys presses. Example: [general] [user_profile] type = user admin = no pin = 1111 marked = yes startmuted = no announce_user_count = yes announce_user_count_all = 1 announce_join_leave = yes [user_menu] type = menu 1 = toggle_mute 201 = leave_conference [default_bridge] type = bridge [default_user] type = user In this log snippet, you can see the user press '201' to leave the conference: [Feb 21 22:28:16] VERBOSE[18929][C-00000001] pbx.c: -- Executing [user_profile#confbridge:1] NoOp("SIP/ast2_g722-00000001", "") in new stack [Feb 21 22:28:16] VERBOSE[18929][C-00000001] pbx.c: -- Executing [user_profile#confbridge:2] ConfBridge("SIP/ast2_g722-00000001", "1,,user_profile,user_menu") in new stack [Feb 21 22:28:26] VERBOSE[18929][C-00000001] file.c: -- <SIP/ast2_g722-00000001> Playing 'conf-onlyone.gsm' (language 'en') [Feb 21 22:28:47] VERBOSE[18929][C-00000001] file.c: -- <SIP/ast2_g722-00000001> Playing 'confbridge-join.gsm' (language 'en') [Feb 21 22:28:48] VERBOSE[18929][C-00000001] file.c: -- <Bridge/0x7fb3bc004528-input> Playing 'confbridge-join.gsm' (language 'en') [Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin '2' received on SIP/ast2_g722-00000001 [Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin passthrough '2' on SIP/ast2_g722-00000001 [Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end '2' received on SIP/ast2_g722-00000001, duration 100 ms [Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end accepted with begin '2' on SIP/ast2_g722-00000001 [Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end passthrough '2' on SIP/ast2_g722-00000001 [Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin '0' received on SIP/ast2_g722-00000001 [Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin ignored '0' on SIP/ast2_g722-00000001 [Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end '0' received on SIP/ast2_g722-00000001, duration 100 ms [Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end passthrough '0' on SIP/ast2_g722-00000001 [Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin '1' received on SIP/ast2_g722-00000001 [Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF begin ignored '1' on SIP/ast2_g722-00000001 [Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end '1' received on SIP/ast2_g722-00000001, duration 100 ms [Feb 21 22:28:53] DTMF[18929][C-00000001] channel.c: DTMF end passthrough '1' on SIP/ast2_g722-00000001 [Feb 21 22:28:55] VERBOSE[18929][C-00000001] file.c: -- <Bridge/0x7fb3bc004528-input> Playing 'conf-hasleft.gsm' (language 'en') [Feb 21 22:28:57] VERBOSE[18929][C-00000001] file.c: -- <Bridge/0x7fb3bc004528-input> Playing 'confbridge-leave.gsm' (language 'en') [Feb 21 22:28:58] VERBOSE[18929][C-00000001] pbx.c: -- Executing [user_profile#confbridge:3] Hangup("SIP/ast2_g722-00000001", "") in new stack
URL monitor produces multiple ESTABLISHED (connection) entries in netstat
I wrote a URL monitor program in Go, but after a period of time I found many ESTABLISHED entries in netstat -nao|grep 80. The getHttpStatusCode func: HttpClient = &http.Client{ Transport: &http.Transport{ Dial: func(netw, addr string) (net.Conn, error) { deadline := time.Now().Add(30 * time.Second) c, err := net.DialTimeout(netw, addr, 20*time.Second) if err != nil { return nil, err } c.SetDeadline(deadline) c.SetReadDeadline(deadline) c.SetWriteDeadline(deadline) return c, nil }, }, } // ... func getHttpStatusCode(url string) int { if url == "" { return 200 } req, err := http.NewRequest("GET", url, nil) if err != nil { return 0 } req.Close = true req.Header.Add("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17") resp, err := HttpClient.Do(req) if err != nil { return 0 } defer resp.Body.Close() return resp.StatusCode } I checked the Go manual and don't find something like req.Close() and just defer resp.Body.Close(). Here is the output of netstat -nao | grep 80: tcp 1343352 0 192.168.2.33:29581 220.181.155.19:80 ESTABLISHED off (0.00/0/0) And the output of tcpdump tcp port 80: 14:32:54.085095 IP 113.12.80.13.http > wk_0_mysql.KIDC90805.zw.39174: Flags [.], seq 17376:18824, ack 1, win 42, options [nop,nop,TS val 4236145017 ecr 204896351], length 1448 14:32:54.109206 IP wk_0_mysql.KIDC90805.zw.25834 > 220.181.90.8.http: Flags [S], seq 714805337, win 14600, options [mss 1460,sackOK,TS val 204896416 ecr 0,nop,wscale 9], length 0 14:32:54.223349 IP 220.181.155.22.http > wk_0_mysql.KIDC90805.zw.19262: Flags [.], seq 864939135:864940583, ack 1630899997, win 42, options [nop,nop,TS val 1570834172 ecr 204896529], length 1448 14:32:54.223352 IP wk_0_mysql.KIDC90805.zw.19262 > 220.181.155.22.http: Flags [.], ack 1448, win 1301, options [nop,nop,TS val 204896530 ecr 1570834172], length 0 14:32:54.223432 IP 220.181.155.10.http > wk_0_mysql.KIDC90805.zw.27376: Flags [.], seq 3889371684:3889373132, ack 1106685068, win 42, options [nop,nop,TS val 3866364254 ecr 204896529], length 1448 14:32:54.223436 IP wk_0_mysql.KIDC90805.zw.27376 > 220.181.155.10.http: Flags [.], ack 1448, win 594, options [nop,nop,TS val 204896530 ecr 3866364254], length 0 14:32:54.275774 IP 121.12.101.130.http > wk_0_mysql.KIDC90805.zw.63329: Flags [.], seq 1314475629:1314477089, ack 642951590, win 54, length 1460
The HTTP client will by default use keep-alive connections, you can close them by calling transport.CloseIdleConnections (from the docs). I'm not sure req.Close does anything on client requests, it might only be for the server.