Outbound call problem with freepbx14 + patton sn4171

Hello to all,
I have a problem that blocking the project of putting into operation a new pbx for a company.
My configuration is freepbx FreePBX 14.0.1.20 + patton SN4171

The situation is simple, incoming calls works regularl, direct calls via pass-through and IVR, the problem is the outgoing calls, from the dialplan the instructions are routed correctly only that the error is the following, the classic 503

Error in Diaplan
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/gatewaypri1/01875295100
– Got SIP response 503 “Service Unavailable” back from 192.168.10.132:5060
– SIP/gatewaypri1-0000009b is circuit-busy

This my configuration

Patton:
#----------------------------------------------------------------

Patton Electronics Company

Wizard generated config file

Name:

Trinity SN4170 / SN4970 / SN4971 Basic Setup

Description:

This sets up your Trinity SN4170 or SN4970/71 with either an IPPBX or an ITSP SIP Trunk.

#----------------------------------------------------------------
cli version 4.0

clock local default-offset +01:00

profile aaa DEFAULT
method 1 local rule required
method 2 none rule required

console
use profile aaa DEFAULT

telnet-server
use profile aaa DEFAULT
no shutdown

ssh-server
use profile aaa DEFAULT
no shutdown

snmp-server
shutdown

web-server http
use profile aaa DEFAULT
no shutdown

system
clock-source 1 e1t1 0 0

ntp
server 0.patton.pool.ntp.org
server 1.patton.pool.ntp.org
server 2.patton.pool.ntp.org
server 3.patton.pool.ntp.org
no shutdown

dns-client
name-server 192.168.10.10

profile tls DEFAULT
no authentication incoming
no authentication outgoing
private-key pki:private-key/DEFAULT
own-certificate 1 pki:own-certificate/DEFAULT

profile call-progress-tone IT_Dialtone
play 200 425 -12
pause 200
play 600 425 -12
pause 1000

profile call-progress-tone IT_Alertingtone
play 1000 425 -12
pause 4000

profile call-progress-tone IT_Busytone
play 500 425 -12
pause 500

profile tone-set default

profile tone-set IT
map call-progress-tone dial-tone IT_Dialtone
map call-progress-tone ringback-tone IT_Alertingtone
map call-progress-tone busy-tone IT_Busytone
map call-progress-tone release-tone IT_Busytone
map call-progress-tone congestion-tone IT_Busytone

profile voip DEFAULT
codec 1 g711alaw64k rx-length 20 tx-length 20
codec 2 g711ulaw64k rx-length 20 tx-length 20
fax transmission 1 relay t38-udp
fax transmission 2 bypass g711alaw64k rx-length 20 tx-length 20
fax transmission 3 bypass g711ulaw64k rx-length 20 tx-length 20
fax bypass-method signaling
modem transmission 1 bypass g711alaw64k rx-length 20 tx-length 20
modem transmission 2 bypass g711ulaw64k rx-length 20 tx-length 20
modem bypass-method signaling

profile pstn DEFAULT

profile sip DEFAULT

context ip ROUTER

interface WAN
ipaddress WAN 192.168.10.132 255.255.255.0

routing-table DEFAULT
route 0.0.0.0/0 gateway 192.168.10.85 metric 0

profile ppp DEFAULT

context bridge

context cs SWITCH
no shutdown

routing-table called-e164 RT_ISDN_TO_SIP
route T2 dest-interface IF_SIP

interface isdn IF_ISDN_00
route call dest-table RT_ISDN_TO_SIP
call-reroute emit
diversion emit
user-side-ringback-tone
caller-name

interface sip IF_SIP
bind context sip-gateway GW_SIP
route call dest-interface IF_ISDN_00
remote 192.168.10.130
trust remote

authentication-service AUTH_SRV
username gatewaypri1 password tEtEnewairlTY7j/OmBBeg== encrypted

location-service SER_LOC
domain 1 192.168.10.130
match-any-domain

identity-group DEFAULT

authentication inbound
authenticate 1 authentication-service AUTH_SRV username gatewaypri1

registration inbound

identity gatewaypri1 inherits DEFAULT

context sip-gateway GW_SIP
bind location-service SER_LOC

interface SIP
transport-protocol udp+tcp 5060
no transport-protocol tls

bind ipaddress ROUTER WAN WAN

context sip-gateway GW_SIP
no shutdown

port ethernet 0 0
bind interface ROUTER WAN
no shutdown

port e1t1 0 0
port-type e1
clock auto
framing crc
encapsulation q921

q921
permanent-layer2
uni-side auto
encapsulation q931

q931
protocol dss1
uni-side user
encapsulation cc-isdn
bind interface SWITCH IF_ISDN_00

port e1t1 0 0
no shutdown

Sip User:
[gatewaypri1]
disallow=all
context=from-trunk
type=friend
insecure=port,invite
qualify=yes
sendrpid=yes
trustrpid=yes
dtmfmode=rfc2833
username=gatewaypri1
secret=gatewaypri1
host=192.168.10.132
nat=force_rport,comedia
allow=alaw
allow=ulaw

Trunksip:
context=from-trunk
type=friend
insecure=port,invite
qualify=yes
sendrpid=yes
trustrpid=yes
dtmfmode=rfc2833
username=gatewaypri1
secret=gatewaypri1
host=192.168.10.132
nat=yes
disallow=all
allow=alaw&ulaw

In the final analysis I debugged on patton but I do not see any outgoing calls so the error is not given by carrier but just by patton.

Thanks in advance

Who is this (x.x.x.132)? Is it your phone, or your FreePBX system?

This doesn’t look like the full log from /var/log/asterisk/full - it looks like the status info from the CLI. We need the log information to be able to give you more help.

Also, I’m not convinced the problem is with the Patton, and if it is, it’s something that the ‘full’ log should be able to pinpoint for you.

Hello,
the x.x.x.132 is Patton’s IP and yes that ouptut is from CLI.

Tomorrow i’ll be to the customer and i’ll perform new test, i’ll still have problem i’ll use the full log in attach.
Thanks in advance

From the server side: you should see the phone trying to connect to the server. The error message from that interaction should help a lot. If you aren’t seeing traffic on the server, check the server firewall to see if the phone has gotten blocked, especially if you are using the Adaptive Firewall.
Double check the server’s whitelist and blacklist in the System Admin module as well.

I’m going to guess that the firewall isn’t the cause of the problems, since you are seeing traffic from the phone on the CLI.

Also, important thing to remember: Asterisk isn’t a telephone switch - it’s a back to back user agent, so the phone will NEVER connect to the outside world through the server. The phone connects EXCLUSIVELY to Asterisk and Asterisk connects to the outside world.

The logs will tell you a lot about where the disconnect is.

The patton is registerd correctly and i can receice calls from external, ive already buill the ivr ant it works. I only problem with outbound call. The calls between internals works fine

Your problem is definitely in the outbound route or trunk configuration. If you can place calls to other devices on the PBX, your phone is connecting fine.

Hello,
this si the output of /var/log/asterisk/full

[2018-01-11 14:39:22] VERBOSE[9734][C-0000008f] netsock2.c: Using SIP RTP TOS bits 184
[2018-01-11 14:39:22] VERBOSE[9734][C-0000008f] netsock2.c: Using SIP RTP CoS mark 5
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:1] Macro("SIP/317-000000c9", "user-callerid,LIMIT,EXTERNAL,") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:1] Set("SIP/317-000000c9", "TOUCH_MONITOR=1515681562.267") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:2] Set("SIP/317-000000c9", "AMPUSER=317") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:3] GotoIf("SIP/317-000000c9", "0?report") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:4] ExecIf("SIP/317-000000c9", "1?Set(REALCALLERIDNUM=317)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:5] Set("SIP/317-000000c9", "AMPUSER=317") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:6] GotoIf("SIP/317-000000c9", "0?limit") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:7] Set("SIP/317-000000c9", "AMPUSERCIDNAME=Cabano") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:8] ExecIf("SIP/317-000000c9", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:9] GotoIf("SIP/317-000000c9", "0?report") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:10] Set("SIP/317-000000c9", "AMPUSERCID=317") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:11] Set("SIP/317-000000c9", "__DIAL_OPTIONS=Ttr") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:12] Set("SIP/317-000000c9", "CALLERID(all)="Cabano" <317>") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:13] GotoIf("SIP/317-000000c9", "0?limit") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:14] ExecIf("SIP/317-000000c9", "1?Set(GROUP(concurrency_limit)=317)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:15] ExecIf("SIP/317-000000c9", "0?Set(CHANNEL(language)=)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:16] NoOp("SIP/317-000000c9", "Macro Depth is 1") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:17] GotoIf("SIP/317-000000c9", "1?report2:macroerror") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx_builtins.c: Goto (macro-user-callerid,s,19)
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:19] GotoIf("SIP/317-000000c9", "1?continue") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx_builtins.c: Goto (macro-user-callerid,s,37)
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:37] Set("SIP/317-000000c9", "CALLERID(number)=317") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:38] Set("SIP/317-000000c9", "CALLERID(name)=Cabano") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:39] GotoIf("SIP/317-000000c9", "0?cnum") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:40] Set("SIP/317-000000c9", "CDR(cnam)=Cabano") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:41] Set("SIP/317-000000c9", "CDR(cnum)=317") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:42] Set("SIP/317-000000c9", "CHANNEL(language)=en") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:2] Gosub("SIP/317-000000c9", "sub-record-check,s,1(out,03463829714,dontcare)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:1] GotoIf("SIP/317-000000c9", "0?initialized") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:2] Set("SIP/317-000000c9", "__REC_STATUS=INITIALIZED") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:3] Set("SIP/317-000000c9", "NOW=1515681562") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:4] Set("SIP/317-000000c9", "__DAY=11") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:5] Set("SIP/317-000000c9", "__MONTH=01") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:6] Set("SIP/317-000000c9", "__YEAR=2018") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:7] Set("SIP/317-000000c9", "__TIMESTR=20180111-143922") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:8] Set("SIP/317-000000c9", "__FROMEXTEN=317") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:9] Set("SIP/317-000000c9", "__MON_FMT=wav") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:10] NoOp("SIP/317-000000c9", "Recordings initialized") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:11] ExecIf("SIP/317-000000c9", "0?Set(ARG3=dontcare)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:12] Set("SIP/317-000000c9", "REC_POLICY_MODE_SAVE=") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:13] ExecIf("SIP/317-000000c9", "0?Set(REC_STATUS=NO)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:14] GotoIf("SIP/317-000000c9", "3?checkaction") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx_builtins.c: Goto (sub-record-check,s,17)
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:17] GotoIf("SIP/317-000000c9", "1?sub-record-check,out,1") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx_builtins.c: Goto (sub-record-check,out,1)
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:1] NoOp("SIP/317-000000c9", "Outbound Recording Check from 317 to 03463829714") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:2] Set("SIP/317-000000c9", "RECMODE=dontcare") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:3] ExecIf("SIP/317-000000c9", "1?Goto(routewins)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx_builtins.c: Goto (sub-record-check,out,7)
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:7] Gosub("SIP/317-000000c9", "recordcheck,1(dontcare,out,03463829714)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:1] NoOp("SIP/317-000000c9", "Starting recording check against dontcare") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:2] Goto("SIP/317-000000c9", "dontcare") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx_builtins.c: Goto (sub-record-check,recordcheck,3)
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:3] Return("SIP/317-000000c9", "") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:8] Return("SIP/317-000000c9", "") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:3] ExecIf("SIP/317-000000c9", "0 ?Set(CDR(accountcode)=)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:4] Set("SIP/317-000000c9", "ROUTE_CIDSAVE="Cabano" <317>") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:5] Set("SIP/317-000000c9", "MOHCLASS=default") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:6] Set("SIP/317-000000c9", "_NODEST=") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:7] Macro("SIP/317-000000c9", "dialout-trunk,2,03463829714,,off") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:1] Set("SIP/317-000000c9", "DIAL_TRUNK=2") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:2] GosubIf("SIP/317-000000c9", "0?sub-pincheck,s,1()") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:3] ExecIf("SIP/317-000000c9", "0?Set(CALLERID(num)=317)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:4] GotoIf("SIP/317-000000c9", "0?disabletrunk,1") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:5] Set("SIP/317-000000c9", "DIAL_NUMBER=03463829714") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:6] Set("SIP/317-000000c9", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:7] Set("SIP/317-000000c9", "OUTBOUND_GROUP=OUT_2") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:8] Set("SIP/317-000000c9", "DIAL_TRUNK_OPTIONS=tT") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:9] GotoIf("SIP/317-000000c9", "1?nomax") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx_builtins.c: Goto (macro-dialout-trunk,s,11)
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:11] GotoIf("SIP/317-000000c9", "0?skipoutcid") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:12] Macro("SIP/317-000000c9", "outbound-callerid,2") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:1] NoOp("SIP/317-000000c9", "317") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:2] NoOp("SIP/317-000000c9", "") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:3] NoOp("SIP/317-000000c9", "off") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:4] ExecIf("SIP/317-000000c9", "0?Set(CALLERPRES(name-pres)=)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:5] ExecIf("SIP/317-000000c9", "0?Set(CALLERPRES(num-pres)=)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:6] ExecIf("SIP/317-000000c9", "0?Set(REALCALLERIDNUM=317)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:7] GotoIf("SIP/317-000000c9", "1?normcid") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx_builtins.c: Goto (macro-outbound-callerid,s,11)
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:11] Set("SIP/317-000000c9", "USEROUTCID=317") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:12] Set("SIP/317-000000c9", "EMERGENCYCID=") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:13] Set("SIP/317-000000c9", "TRUNKOUTCID=") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:14] GotoIf("SIP/317-000000c9", "1?trunkcid") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx_builtins.c: Goto (macro-outbound-callerid,s,19)
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:19] ExecIf("SIP/317-000000c9", "0?Set(CALLERID(all)=)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:20] ExecIf("SIP/317-000000c9", "1?Set(CALLERID(all)=317)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:21] ExecIf("SIP/317-000000c9", "0?Set(CALLERID(all)=)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:22] ExecIf("SIP/317-000000c9", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:23] ExecIf("SIP/317-000000c9", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:24] Set("SIP/317-000000c9", "CDR(outbound_cnum)=317") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:25] Set("SIP/317-000000c9", "CDR(outbound_cnam)=") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:13] GosubIf("SIP/317-000000c9", "1?sub-flp-2,s,1()") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:1] ExecIf("SIP/317-000000c9", "1?Set(TARGET_FLP_2=3463829714)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:2] GotoIf("SIP/317-000000c9", "1?match") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx_builtins.c: Goto (sub-flp-2,s,4)
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:4] Set("SIP/317-000000c9", "DIAL_NUMBER=3463829714") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:5] Return("SIP/317-000000c9", "") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:14] Set("SIP/317-000000c9", "OUTNUM=3463829714") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:15] Set("SIP/317-000000c9", "custom=SIP/gatewaypri1") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:16] ExecIf("SIP/317-000000c9", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)tT)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:17] ExecIf("SIP/317-000000c9", "0?Set(DIAL_TRUNK_OPTIONS=tTM(confirm))") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:18] Macro("SIP/317-000000c9", "dialout-trunk-predial-hook,") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:1] MacroExit("SIP/317-000000c9", "") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:19] GotoIf("SIP/317-000000c9", "0?skipcrm") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:20] Set("SIP/317-000000c9", "__CRM_DIRECTION=OUTBOUND") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:21] Set("SIP/317-000000c9", "__CRM_DESTINATION=3463829714") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:22] Set("SIP/317-000000c9", "__CRM_SOURCE=317") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:23] AGI("SIP/317-000000c9", "sangomacrm.agi") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] res_agi.c: <SIP/317-000000c9>AGI Script sangomacrm.agi completed, returning 0
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:24] Set("SIP/317-000000c9", "CHANNEL(hangup_handler_push)=crm-hangup,s,1") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:25] NoOp("SIP/317-000000c9", "CRM Finished") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:26] GotoIf("SIP/317-000000c9", "0?bypass,1") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:27] ExecIf("SIP/317-000000c9", "1?Set(CONNECTEDLINE(num,i)=3463829714)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:28] ExecIf("SIP/317-000000c9", "1?Set(CONNECTEDLINE(name,i)=CID:317)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:29] ExecIf("SIP/317-000000c9", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)317)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:30] GotoIf("SIP/317-000000c9", "0?customtrunk") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:31] Dial("SIP/317-000000c9", "SIP/gatewaypri1/3463829714,300,tT") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] netsock2.c: Using SIP RTP TOS bits 184
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] netsock2.c: Using SIP RTP CoS mark 5
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] app_dial.c: Called SIP/gatewaypri1/3463829714
[2018-01-11 14:39:22] VERBOSE[9734][C-0000008f] chan_sip.c: Got SIP response 503 "Service Unavailable" back from 192.168.10.132:5060
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] app_dial.c: SIP/gatewaypri1-000000ca is circuit-busy
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] app_dial.c: Everyone is busy/congested at this time (1:0/1/0)
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:32] NoOp("SIP/317-000000c9", "Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 34") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:33] GotoIf("SIP/317-000000c9", "0?continue,1:s-CONGESTION,1") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx_builtins.c: Goto (macro-dialout-trunk,s-CONGESTION,1)
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:1] Set("SIP/317-000000c9", "RC=34") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:2] Goto("SIP/317-000000c9", "34,1") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx_builtins.c: Goto (macro-dialout-trunk,34,1)
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:1] Goto("SIP/317-000000c9", "continue,1") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx_builtins.c: Goto (macro-dialout-trunk,continue,1)
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:1] NoOp("SIP/317-000000c9", "TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 34 - failing through to other trunks") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:2] ExecIf("SIP/317-000000c9", "1?Set(CALLERID(number)=317)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:8] Set("SIP/317-000000c9", "CALLERID(all)="Cabano" <317>") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:9] Set("SIP/317-000000c9", "_KEEPCID=TRUE") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:10] Goto("SIP/317-000000c9", "app-blackhole,hangup,1") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx_builtins.c: Goto (app-blackhole,hangup,1)
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:1] NoOp("SIP/317-000000c9", "Blackhole Dest: Hangup") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:2] Hangup("SIP/317-000000c9", "") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Spawn extension (app-blackhole, hangup, 2) exited non-zero on 'SIP/317-000000c9'
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] app_stack.c: SIP/317-000000c9 Internal Gosub(crm-hangup,s,1) start
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:1] NoOp("SIP/317-000000c9", "Sending Hangup to CRM") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:2] NoOp("SIP/317-000000c9", "HANGUP CAUSE: 34") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:3] ExecIf("SIP/317-000000c9", "0?Set(__CRM_VOICEMAIL=)") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:4] NoOp("SIP/317-000000c9", "MASTER CHANNEL: 1515681562.267 = 1515681562.267") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:5] GotoIf("SIP/317-000000c9", "0?return") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:6] Set("SIP/317-000000c9", "__CRM_HANGUP=1") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:7] AGI("SIP/317-000000c9", "sangomacrm.agi") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] res_agi.c: <SIP/317-000000c9>AGI Script sangomacrm.agi completed, returning 0
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] pbx.c: Executing [[email protected]:8] Return("SIP/317-000000c9", "") in new stack
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] app_stack.c: Spawn extension (app-blackhole, hangup, 2) exited non-zero on 'SIP/317-000000c9'
[2018-01-11 14:39:22] VERBOSE[18889][C-0000008f] app_stack.c: SIP/317-000000c9 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

this my sip_additional.conf for patton
[gatewaypri1]
disallow=all
context=from-pstn
type=friend
insecure=port,invite
qualify=yes
sendrpid=yes
trustrpid=yes
dtmfmode=rfc2833
username=gatewaypri1
secret=gatewaypri1
host=192.168.10.132
nat=yes
allow=alaw
allow=ulaw

Do you need other info?

Thnaks

Could be a patton conf file?

hi @asyscom, if can help, this is my configuration (patton sn4970 - 1 x PRI e1/t1 port)

#----------------------------------------------------------------#

SN4970/1E30V

R6.9 2016-07-05 H323 RBS SIP

2018-01-11T21:05:04

SN/00A0BA0BF8A3

Generated configuration file

#----------------------------------------------------------------#

cli version 3.20
clock local default-offset +02:00
dns-client server 172.16.150.10
dns-client server 172.16.150.11
webserver port 80 language en
sntp-client
sntp-client server primary 172.16.150.10 port 123 version 4
sntp-client server secondary ntp1.inrim.it port 123 version 4
system hostname pattonPRI-comune

system

ic voice 0

profile r2 default

profile napt NAPT_WAN

profile ppp default

profile call-progress-tone IT_Dialtone
play 1 200 425 -12
pause 2 200
play 3 600 425 -12
pause 4 1000

profile call-progress-tone IT_Alertingtone
play 1 1000 425 -12
pause 2 4000

profile call-progress-tone IT_Busytone
play 1 500 425 -12
pause 2 500

profile tone-set default
profile tone-set IT
map call-progress-tone dial-tone IT_Dialtone
map call-progress-tone ringback-tone IT_Alertingtone
map call-progress-tone busy-tone IT_Busytone
map call-progress-tone release-tone IT_Busytone
map call-progress-tone congestion-tone IT_Busytone

profile voip default
codec 1 g711alaw64k rx-length 20 tx-length 20
codec 2 g711ulaw64k rx-length 20 tx-length 20
codec 3 g729 rx-length 20 tx-length 20

profile pstn default

profile sip default
no autonomous-transitioning

profile aaa default
method 1 local
method 2 none

context ip router

interface WAN
ipaddress 192.168.70.32 255.255.255.0
tcp adjust-mss rx mtu
tcp adjust-mss tx mtu

context ip router
route 0.0.0.0 0.0.0.0 192.168.70.19 0

context cs switch
national-prefix 0
international-prefix 00

routing-table called-e164 RT_OUT
route .%T3 dest-interface IF_PRI0 speech

routing-table called-e164 RT_IN
route .%T3 dest-interface IF_PBX

mapping-table itc to itc speech
map default to speech

interface isdn IF_PRI0
route call dest-table RT_IN
use profile tone-set IT

interface sip IF_PBX
bind context sip-gateway GW_ASTERISK
route call dest-table RT_OUT
remote 192.168.70.30
early-disconnect

context cs switch
no shutdown

authentication-service AUTH_SVC
username pattonpri password leC1zmbW/axQwwyy88e/zw== encrypted

location-service LS_PATTON
domain 1 192.168.70.30

identity pattonpri

authentication outbound
  authenticate 1 authentication-service AUTH_SVC username pattonpri

registration outbound
  registrar 192.168.70.30
  register auto

context sip-gateway GW_ASTERISK

interface IF_ASTERISK
bind interface WAN context router port 5060

context sip-gateway GW_ASTERISK
bind location-service LS_PATTON
no shutdown

port ethernet 0 0
medium auto
encapsulation ip
bind interface WAN router
no shutdown

port e1t1 0 0
port-type e1
clock slave
framing crc4
application long-haul
encapsulation q921

q921
permanent-layer2
uni-side auto
encapsulation q931

q931
  protocol dss1
  uni-side user
  bchan-number-order ascending
  encapsulation cc-isdn
  bind interface IF_PRI0 switch

port e1t1 0 0
no shutdown

and my trunk configuration:

username=pattonpri
type=friend
secret=SECRET
qualify=yes
insecure=port,invite
host=dynamic
dtmfmode=rfc2833
defaultip=192.168.70.32
context=add-null

@asyscom davide giusto? ho realizzato ora che sei italiano… :slight_smile:

Ciao, si sono italiano :slight_smile: Per non disturbare il post possiamo sentirci in pvt? La mia mail è [email protected] oppure il mio skype è ragonesi1977

Grazie in anticipo.

P.S.
il mio dubbio nel clonare la tua conf è che la mia versione di CLI è la 4 mentre quella è 3.20. Potrebbe essere un problema?

Grazie infinite

1 Like