Outbound destination rings, trunk reports no answer

FreePBX 13.0.98
Inbound no problem, both iax2 and sip
Outbound calls rings at destination (sip and iax).
No audio
Outbound Peer details

host=did.voip.les.net
context=from-trunk
type=friend
insecure=very
nat=yes
canreinvite=no
username=P2590466915
secret=???

– Executing [[email protected]:1] Macro(“PJSIP/223-00000005”, “user-callerid,LIMIT”) in new stack
– Executing [[email protected]:1] Set(“PJSIP/223-00000005”, “TOUCH_MONITOR=1459678087.30”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/223-00000005”, “AMPUSER=223”) in new stack
– Executing [[email protected]:3] GotoIf(“PJSIP/223-00000005”, “0?report”) in new stack
– Executing [[email protected]:4] ExecIf(“PJSIP/223-00000005”, “1?Set(REALCALLERIDNUM=223)”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/223-00000005”, “AMPUSER=223”) in new stack
– Executing [[email protected]:6] GotoIf(“PJSIP/223-00000005”, “0?limit”) in new stack
– Executing [[email protected]:7] Set(“PJSIP/223-00000005”, “AMPUSERCIDNAME=223”) in new stack
– Executing [[email protected]:8] GotoIf(“PJSIP/223-00000005”, “0?report”) in new stack
– Executing [[email protected]:9] Set(“PJSIP/223-00000005”, “AMPUSERCID=223”) in new stack
– Executing [[email protected]:10] Set(“PJSIP/223-00000005”, “__DIAL_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:11] Set(“PJSIP/223-00000005”, “CALLERID(all)=“223” <223>”) in new stack
– Executing [[email protected]:12] GotoIf(“PJSIP/223-00000005”, “0?limit”) in new stack
– Executing [[email protected]:13] ExecIf(“PJSIP/223-00000005”, “1?Set(GROUP(concurrency_limit)=223)”) in new stack
– Executing [[email protected]:14] ExecIf(“PJSIP/223-00000005”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [[email protected]:15] GotoIf(“PJSIP/223-00000005”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,29)
– Executing [[email protected]:29] Set(“PJSIP/223-00000005”, “CALLERID(number)=223”) in new stack
– Executing [[email protected]:30] Set(“PJSIP/223-00000005”, “CALLERID(name)=223”) in new stack
– Executing [[email protected]:31] Set(“PJSIP/223-00000005”, “CDR(cnum)=223”) in new stack
– Executing [[email protected]:32] Set(“PJSIP/223-00000005”, “CDR(cnam)=223”) in new stack
– Executing [[email protected]:33] Set(“PJSIP/223-00000005”, “CHANNEL(language)=en”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/223-00000005”, “ROUTEUSER=223”) in new stack
– Executing [[email protected]:3] GotoIf(“PJSIP/223-00000005”, “1?notblind”) in new stack
– Goto (from-internal,5127626397,6)
– Executing [[email protected]:6] GotoIf(“PJSIP/223-00000005”, “1?restrictedroute-c4ca4238a0b923820dcc509a6f75849b,5127626397,2:outbound-allroutes,5127626397,2”) in new stack
– Goto (restrictedroute-c4ca4238a0b923820dcc509a6f75849b,5127626397,2)
– Executing [[email protected]:2] Gosub(“PJSIP/223-00000005”, “sub-record-check,s,1(out,5127626397,dontcare)”) in new stack
– Executing [[email protected]:1] GotoIf(“PJSIP/223-00000005”, “0?initialized”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/223-00000005”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [[email protected]:3] Set(“PJSIP/223-00000005”, “NOW=1459678087”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/223-00000005”, “__DAY=03”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/223-00000005”, “__MONTH=04”) in new stack
– Executing [[email protected]:6] Set(“PJSIP/223-00000005”, “__YEAR=2016”) in new stack
– Executing [[email protected]:7] Set(“PJSIP/223-00000005”, “__TIMESTR=20160403-050807”) in new stack
– Executing [[email protected]:8] Set(“PJSIP/223-00000005”, “__FROMEXTEN=223”) in new stack
– Executing [[email protected]:9] Set(“PJSIP/223-00000005”, “__MON_FMT=wav”) in new stack
– Executing [[email protected]:10] NoOp(“PJSIP/223-00000005”, “Recordings initialized”) in new stack
– Executing [[email protected]:11] ExecIf(“PJSIP/223-00000005”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [[email protected]:12] Set(“PJSIP/223-00000005”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [[email protected]:13] ExecIf(“PJSIP/223-00000005”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [[email protected]:14] GotoIf(“PJSIP/223-00000005”, “3?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [[email protected]:17] GotoIf(“PJSIP/223-00000005”, “1?sub-record-check,out,1”) in new stack
– Goto (sub-record-check,out,1)
– Executing [[email protected]:1] NoOp(“PJSIP/223-00000005”, “Outbound Recording Check from 223 to 5127626397”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/223-00000005”, “RECMODE=dontcare”) in new stack
– Executing [[email protected]:3] ExecIf(“PJSIP/223-00000005”, “1?Goto(routewins)”) in new stack
– Goto (sub-record-check,out,7)
– Executing [[email protected]:7] Gosub(“PJSIP/223-00000005”, “recordcheck,1(dontcare,out,5127626397)”) in new stack
– Executing [[email protected]:1] NoOp(“PJSIP/223-00000005”, “Starting recording check against dontcare”) in new stack
– Executing [[email protected]:2] Goto(“PJSIP/223-00000005”, “dontcare”) in new stack
– Goto (sub-record-check,recordcheck,3)
– Executing [[email protected]:3] Return(“PJSIP/223-00000005”, “”) in new stack
– Executing [[email protected]:8] Return(“PJSIP/223-00000005”, “”) in new stack
– Executing [[email protected]:3] ExecIf(“PJSIP/223-00000005”, “0 ?Set(CDR(accountcode)=)”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/223-00000005”, “MOHCLASS=default”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/223-00000005”, “_NODEST=”) in new stack
– Executing [[email protected]:6] Macro(“PJSIP/223-00000005”, “dialout-trunk,2,5127626397,off”) in new stack
– Executing [[email protected]:1] Set(“PJSIP/223-00000005”, “DIAL_TRUNK=2”) in new stack
– Executing [[email protected]:2] GosubIf(“PJSIP/223-00000005”, “0?sub-pincheck,s,1()”) in new stack
– Executing [[email protected]:3] GotoIf(“PJSIP/223-00000005”, “0?disabletrunk,1”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/223-00000005”, “DIAL_NUMBER=5127626397”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/223-00000005”, “DIAL_TRUNK_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:6] Set(“PJSIP/223-00000005”, “OUTBOUND_GROUP=OUT_2”) in new stack
– Executing [[email protected]:7] GotoIf(“PJSIP/223-00000005”, “0?nomax”) in new stack
– Executing [[email protected]:8] GotoIf(“PJSIP/223-00000005”, “0?chanfull”) in new stack
– Executing [[email protected]:9] GotoIf(“PJSIP/223-00000005”, “0?skipoutcid”) in new stack
– Executing [[email protected]:10] Set(“PJSIP/223-00000005”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [[email protected]:11] Macro(“PJSIP/223-00000005”, “outbound-callerid,2”) in new stack
– Executing [[email protected]:1] ExecIf(“PJSIP/223-00000005”, “0?Set(CALLERPRES(name-pres)=)”) in new stack
– Executing [[email protected]:2] ExecIf(“PJSIP/223-00000005”, “0?Set(CALLERPRES(num-pres)=)”) in new stack
– Executing [[email protected]:3] ExecIf(“PJSIP/223-00000005”, “0?Set(REALCALLERIDNUM=223)”) in new stack
– Executing [[email protected]:4] GotoIf(“PJSIP/223-00000005”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,7)
– Executing [[email protected]:7] Set(“PJSIP/223-00000005”, “USEROUTCID=”) in new stack
– Executing [[email protected]:8] Set(“PJSIP/223-00000005”, “EMERGENCYCID=”) in new stack
– Executing [[email protected]:9] Set(“PJSIP/223-00000005”, “TRUNKOUTCID=5124992121”) in new stack
– Executing [[email protected]:10] GotoIf(“PJSIP/223-00000005”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,15)
– Executing [[email protected]:15] ExecIf(“PJSIP/223-00000005”, “1?Set(CALLERID(all)=5124992121)”) in new stack
– Executing [[email protected]:16] ExecIf(“PJSIP/223-00000005”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:17] ExecIf(“PJSIP/223-00000005”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:18] ExecIf(“PJSIP/223-00000005”, “0?Set(CALLERPRES(name-pres)=prohib_passed_screen)”) in new stack
– Executing [[email protected]:19] ExecIf(“PJSIP/223-00000005”, “0?Set(CALLERPRES(num-pres)=prohib_passed_screen)”) in new stack
– Executing [[email protected]:20] Set(“PJSIP/223-00000005”, “CDR(outbound_cnum)=5124992121”) in new stack
– Executing [[email protected]:21] Set(“PJSIP/223-00000005”, “CDR(outbound_cnam)=”) in new stack
[2016-04-03 05:08:07] WARNING[1599]: func_cdr.c:352 cdr_write_callback: CDR requires a value (CDR(variable)=value)
– Executing [[email protected]:12] GosubIf(“PJSIP/223-00000005”, “0?sub-flp-2,s,1()”) in new stack
– Executing [[email protected]:13] Set(“PJSIP/223-00000005”, “OUTNUM=5127626397”) in new stack
– Executing [[email protected]:14] Set(“PJSIP/223-00000005”, “custom=SIP/P2590466915”) in new stack
– Executing [[email protected]:15] ExecIf(“PJSIP/223-00000005”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))”) in new stack
– Executing [[email protected]:16] ExecIf(“PJSIP/223-00000005”, “0?Set(DIAL_TRUNK_OPTIONS=M(confirm))”) in new stack
– Executing [[email protected]:17] Macro(“PJSIP/223-00000005”, “dialout-trunk-predial-hook,”) in new stack
– Executing [[email protected]:1] MacroExit(“PJSIP/223-00000005”, “”) in new stack
– Executing [[email protected]:18] GotoIf(“PJSIP/223-00000005”, “0?bypass,1”) in new stack
– Executing [[email protected]:19] ExecIf(“PJSIP/223-00000005”, “1?Set(CONNECTEDLINE(num,i)=5127626397)”) in new stack
– Executing [[email protected]:20] ExecIf(“PJSIP/223-00000005”, “1?Set(CONNECTEDLINE(name,i)=CID:5124992121)”) in new stack
– Executing [[email protected]:21] ExecIf(“PJSIP/223-00000005”, “0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)5124992121)”) in new stack
– Executing [[email protected]:22] GotoIf(“PJSIP/223-00000005”, “0?customtrunk”) in new stack
– Executing [[email protected]:23] Dial(“PJSIP/223-00000005”, “SIP/P2590466915/5127626397,300,”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/P2590466915/5127626397
[2016-04-03 05:08:39] WARNING[1982]: chan_sip.c:4022 retrans_pkt: Retransmission timeout reached on transmission [email protected]:5061 for seqno 102 (Critical Request) – See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32001ms with no response
[2016-04-03 05:08:39] WARNING[1982]: chan_sip.c:4051 retrans_pkt: Hanging up call [email protected]:5061 - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).
– SIP/P2590466915-00000015 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [[email protected]:24] NoOp(“PJSIP/223-00000005”, “Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 18”) in new stack
– Executing [[email protected]:25] GotoIf(“PJSIP/223-00000005”, “0?continue,1:s-CONGESTION,1”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,1)
– Executing [[email protected]:1] Set(“PJSIP/223-00000005”, “RC=18”) in new stack
– Executing [[email protected]:2] Goto(“PJSIP/223-00000005”, “18,1”) in new stack
– Goto (macro-dialout-trunk,18,1)
– Executing [[email protected]:1] Goto(“PJSIP/223-00000005”, “s-NOANSWER,1”) in new stack
– Goto (macro-dialout-trunk,s-NOANSWER,1)
– Executing [[email protected]:1] NoOp(“PJSIP/223-00000005”, “Dial failed due to trunk reporting NOANSWER - giving up”) in new stack
– Executing [[email protected]-dialout-trunk:2] Progress(“PJSIP/223-00000005”, “”) in new stack
– Executing [[email protected]:3] Playback(“PJSIP/223-00000005”, “number-not-answering,noanswer”) in new stack
– <PJSIP/223-00000005> Playing ‘number-not-answering.ulaw’ (language ‘en’)
– Executing [[email protected]:4] Congestion(“PJSIP/223-00000005”, “20”) in new stack
[2016-04-03 05:08:40] WARNING[14505][C-00000012]: channel.c:4856 ast_prod: Prodding channel ‘PJSIP/223-00000005’ failed
== Spawn extension (macro-dialout-trunk, s-NOANSWER, 4) exited non-zero on ‘PJSIP/223-00000005’ in macro ‘dialout-trunk’
== Spawn extension (restrictedroute-c4ca4238a0b923820dcc509a6f75849b, 5127626397, 6) exited non-zero on ‘PJSIP/223-00000005’
– Executing [[email protected]:1] Hangup(“PJSIP/223-00000005”, “”) in new stack
== Spawn extension (restrictedroute-c4ca4238a0b923820dcc509a6f75849b, h, 1) exited non-zero on ‘PJSIP/223-00000005’
– Remote UNIX connection
– Remote UNIX connection disconnected
– Remote UNIX connection
– Remote UNIX connection disconnected
localhost*CLI>

You are getting no reply from the next hop device on the outgoing side. If the final destination rang, it suggests that you have a firewall or NAT problem preventing responses reaching your machine.

Also, one would not normally use both the PJSIP and SIP channel drivers and, as far as I know, insecure=very is ignored on any version of chan_sip that is contemporary with PJSIP. If the sip.conf entry is truly only for outgoing calls, the insecure parameter has no effect and there is never a case where type=friend is better than type=peer.

canreinvite is deprecated and may be ignored on such versions.
The yes parameter for nat is deprecated.

If you are inside NAT, the default nat= setting is often enough, but you do need to tell Asterisk how to find your external address. The lack of an external address should not stop responses going to the right address, although it might just stop rport being set to cause the peer to ignore the port in the Via parameter.

If you are running both SIP and PJSIP on the same port only one of them will actually get it, so that might also explain why the response is being lost.

Thank you David,
I understand some of your reply.
I am reloading the iso, and going to only add 1 iax2 softphone first and see if I can get inbound and outbound working.

I believe my problem lies with trying to use the ancient aastra scripts.
To get that package’s auto discovery to work I have to use the legacy sip channel option. And then manually edit the phones sip entry and the generated tftpboot config file to use port 5061.

Once again Thank you Thank You.