Good morning,
I am new to the world of Asterisk and I have a problem with call exit, I put the problem in context:
-I have a trunk for call outgoing and another trunk for my platform configured in my pjsip.config in “avail” state
;##################################
;######## Trunk platform Go-Contact #############
;##################################
[TRK-GO-CONTACT]
type=endpoint
context=from-GO-CONTACT-TO-PSTN
disallow=all
allow=ulaw
allow=alaw
aors=TRK-GO-CONTACT
dtmf_mode=rfc4733
direct_media=yes
[TRK-GO-CONTACT]
type = aor
contact=sip:206.15.128.209:5060
qualify_frequency = 2
[TRK-GO-CONTACT]
type=identify
endpoint=TRK-GO-CONTACT
match=206.15.128.209
;##################################
;########Trunk CHANNELS ITELVOXGO#############
;##################################
[TRK-ITELVOXGO]
type=endpoint
transport=siptrk
context=from-ITELVOXGO-TO-PSTN
disallow=all
allow=ulaw
;allow=alaw
aors=TRK-ITELVOXGO
dtmf_mode=rfc4733
direct_media=yes
[TRK-ITELVOXGO]
type = aor
contact=sip:185.32.76.134:5060
qualify_frequency = 2
[TRK-ITELVOXGO]
type=identify
endpoint=TRK-ITELVOXGO
match=185.32.76.134
-For outgoing calls, the prefix 101 and the country number must be prefixed (+51 in my case)
-I have my dialplan configured as follows:
[from-GO-CONTACT-TO-PSTN]
exten => _X.,n,GosubIf($[“${CALLERID(num)}” = “888”]?from-ITELVOXGO-TO-PSTN-888,${EXTEN},1:from-ITELVOXGO-TO- PSTN,${EXTEN},1)
exten => _X.,n,Hangup()
include => from-ITELVOXGO-TO-PSTN-101
include => from-GO-CONTACT-TO-PSTN
;##########################
;#DIALPLAN ITELVOXGO###
;##########################
[from-GO-CONTACT-TO-PSTN]
exten => _X.,1,NoOp(“ITELVOX OUTBOUND Calls - Go-Contact”- ${CONTEXT},“DNIS:${EXTEN},ANI:${CALLERID(num)}”)
exten => _X.,n,Gosub(Set-CALLERID-ITVX,s,1)
exten => _X.,n,Set(CALLERID(all)=${PRIMARY_CALLERID})
exten => _X.,n,Set(TRK-TYPE=PJSIP)
exten => _X.,n,Set(DNIS=${EXTEN})
exten => _X.,n,Dial(PJSIP/10151${DNIS}@TRK-ITELVOXGO,80,gr)
exten => _X.,n,Hangup()
I get this error when following up on the test call:
[root@asterisk]# asterisk -rvvvvv | grep 981989304
– Executing [10151981989304@from-GO-CONTACT-TO-PSTN:1] NoOp(“PJSIP/TRK-GO-CONTACT-002366a3”, "“OUTBOUND ITELVOX Calls - GO-CONTACT”- from-GO-CONTACT-TO -PSTN,“DNIS:10151981989304,ANI:21513"”) in new stack
– Executing [10151981989304@from-GO-CONTACT-TO-PSTN:2] Gosub(“PJSIP/TRK-GO-CONTACT-002366a3”, “Set-CALLERID-ITVX,s,1”) in new stack
– Executing [10151981989304@from-GO-CONTACT-TO-PSTN:3] Set(“PJSIP/TRK-GO-CONTACT-002366a3”, “CALLERID(all)=5117017602”) in new stack
– Executing [10151981989304@from-GO-CONTACT-TO-PSTN:4] Set(“PJSIP/TRK-GO-CONTACT-002366a3”, “TRK-TYPE=PJSIP”) in new stack
– Executing [10151981989304@from-GO-CONTACT-TO-PSTN:5] Set(“PJSIP/TRK-GO-CONTACT-002366a3”, “DNIS=10151981989304”) in new stack
– Executing [10151981989304@from-GO-CONTACT-TO-PSTN:6] Dial(“PJSIP/TRK-GO-CONTACT-002366a3”, “PJSIP/1015110151981989304@TRK-ITELVOXGO,80,gr”) in new stack
– Called PJSIP/1015110151981989304@TRK-ITELVOXGO
– Executing [10151981989304@from-GO-CONTACT-TO-PSTN:7] Hangup(“PJSIP/TRK-GO-CONTACT-002366a3”, “”) in new stack
== Spawn extension (from-GO-CONTACT-TO-PSTN, 10151981989304, 7) exited non-zero on ‘PJSIP/TRK-GO-CONTACT-002366a3’
Grateful that you can help me what I am missing so that the calls go out.