Asterisk autocall

I’m try outbound.

pk.call fille
channel:sip/9001
MaxRetries:1
RetryTime:60
WaitTime:30
context:ivr-parkgolf
Extension:s

outgiong folder copy…

[Aug 7 16:48:13] WARNING[961]: pbx_spool.c:353 safe_append: Unable to set utime on /var/spool/asterisk/outgoing/pk.call: Operation not permitted
– Attempting call on sip/9001 for s@ivr-parkgolf:1 (Retry 1)
[Aug 7 16:48:13] WARNING[87315]: channel.c:6332 request_channel: No channel type registered for ‘sip’
[Aug 7 16:48:13] NOTICE[87315]: pbx_spool.c:450 attempt_thread: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)
[Aug 7 16:48:13] WARNING[87315]: pbx_spool.c:353 safe_append: Unable to set utime on /var/spool/asterisk/outgoing/pk.call: Operation not permitted

Outbound is not running, where should I look?

I want to create an autodial program, please give me some documentation or advice.

Which version of Asterisk are you using? chan_sip source code has been removed from the latest version, and it is not loaded by default in other supported versions. You should not be using it except as a legacy option with an upgrade plan in place.

What file system type is being used for the spool directory?. This suggests to me that it is not a normal Linux file system, with full Posix support. I’m not sure if this is critical or not.

I’m useing asterisk 18.

Can I change channel:sip/9001 to pjsip?

I can call with soft-phone, but when I call with a regular phone, an error occurs.

channel:pjsip/9001

success

channel:pjsip/carrierip/callerphonenumber

failure

chan_pjsip always requires an endpoint. You cannot use an IP address literally, without specifying an endpoint.

https://docs.asterisk.org/Configuration/Channel-Drivers/SIP/Configuring-res_pjsip/Dialing-PJSIP-Channels/

I am using asterisk 18 version. I am trying to configure outbound to make calls to my mobile phone.
The contents of pjsip.conf are as follows.

Telecom ip: 200.200.200.2
Phone number: 070-1000-2000
asterisk server ip: 170.30.1.21
nat ip: 175.200.200.2

[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:5060

external_media_address =175.200.200.2
external_signaling_address =175.200.200.2
local_net = 170.30.1.21/255.255.255.0

;external_media_address = myasterisk.dyn.example.com
;external_signaling_address = myasterisk.dyn.example.com
;local_net = 170.30.1.21/255.255.255.0

customtemplate
language=en
deny=0.0.0.0/0.0.0.0
trust_id_inbound=yes
send_rpid=no
transport=transport-udp
rtcp_mux=no
call_group=
pickup_group=
disallow=all
allow=ulaw,alaw,gsm
permit=0.0.0.0/0.0.0.0
ice_support=no
use_avpf=no
dtls_cert_file=
dtls_private_key=
dtls_ca_file=
dtls_setup=actpass
dtls_verify=no
media_encryption=no
message_context=
subscribe_context=
allow_subscribe=yes
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
direct_media=no
media_use_received_transport=no

[sjtelcom]
tpe=aor
cantact=sip:200.200.200.2:5060

[sjtelcom]
type=registration
transport=transport-udp

outbound_auth=sjtelcom
server_uri=sip:200.200.200.2
client_uri=sip:07010002000@200.200.200.2
retry_interval=60
expiration=120
contact_user=07010002000

[sjtelcom]
type=auth
auth_type=userpass
password=123456789
username=07010002000

sjtelcom
type=endpoint
context=ivr-parkgolf
;disallow=all
;allow=ulaw,alaw
outbound_auth=sjtelcom
aors=sjtelcom
from_user=07010002000
;transport=transport-udp
;trust_id_outbound=yes

[sjtelcom]
type=identify
endpoint=sjtelcom
match=200.200.200.2

pjsip show endpoints

Endpoint: 9001 Not in use 0 of inf
OutAuth: 9001/9001
InAuth: 9001/9001
Aor: 9001 1
Contact: 9001/sip:9001@172.30.1.70:50575;transport= b765a73921 NonQual nan
Contact: 9001/sip:172.30.1.21 691950e923 NonQual nan
Transport: transport-udp udp 0 0 0.0.0.0:5060

Endpoint: sjtelcom Unavailable 0 of inf
OutAuth: sjtelcom/07010002000
Transport: transport-udp udp 0 0 0.0.0.0:5060
Identify: sjtelcom/sjtelcom
Match: 200.200.200.2/32

extensions.conf
[default]

exten => _010.,1,Dial(PJSIP/${EXTEN}@sjtelcom)

When making an external call from softphone 9001…

– Added contact ‘sip:9001@170.30.1.70:59861;transport=UDP;rinstance=859fc23879cb89e1’ to AOR ‘9001’ with expiration of 60 seconds
– Executing [01034563456@default:1] Dial(“PJSIP/9001-00000000”, “PJSIP/01034563456@sjtelcom”) in new stack
[Aug 9 08:31:07] ERROR[7200]: res_pjsip.c:993 ast_sip_create_dialog_uac: Endpoint ‘sjtelcom’: Could not create dialog to invalid URI ‘sjtel com’. Is endpoint registered and reachable?
[Aug 9 08:31:07] ERROR[7200]: chan_pjsip.c:2698 request: Failed to create outgoing session to endpoint ‘sjtelcom’
[Aug 9 08:31:07] NOTICE[7568][C-00000001]: app_dial.c:2766 dial_exec_full: Unable to create channel of type ‘PJSIP’ (cause 3 - No route to destination)
== Everyone is busy/congested at this time (1:0/0/1)
– Auto fallthrough, channel ‘PJSIP/9001-00000000’ status is ‘CHANUNAVAIL’
– Executing [h@default:1] NoOp(“PJSIP/9001-00000000”, “h extension …”) in new stack

Endpoint sjtelcom is unavailable.
Is this correct?

I need help figuring out what I’m doing wrong.

Invalid parameter name

Edited to contact.
Still, it’s not resolved yet.

Could not create dialog to invalid URI ‘sjtelcom’. Is endpoint registered and reachable?
[Aug 9 09:34:05] ERROR[24483]: chan_pjsip.c:2698 request: Failed to create outgoing session to endpoint ‘sjtelcom’ Endpoint: sjtelcom Unavailable 0 of inf OutAuth: sjtelcom/07044445555 Identify: sjtelcom/sjtelcom Match: 203.200.200.4/32

Another invalid parameter name.

I’m using asterisk 18 and Ubuntu.

I’ve set up inbound, but I keep getting problems with outbound.

WARNING[15510]: res_pjsip_outbound_authenticator_digest.c:507 digest_create_request_with_auth: Endpoint: ‘dcs-endpoint’: No auth objects matching realm(s) ‘asterisk’ from challenge found.
== Everyone is busy/congested at this time (1:0/0/1)
– Auto fallthrough, channel ‘PJSIP/9001-00000227’ status is ‘CHANUNAVAIL’
– Executing [h@default:1] NoOp(“PJSIP/9001-00000227”, “h extension …”) in new stack

I’ve tried changing this and that, but I keep getting errors, so I’m looking for help.

pjsip.conf contents are

[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:5060

external_media_address = router IP address
external_signaling_address = router IP address
local_net = 192.168.0.10/255.255.255.0 ; asterisk server ip

[dcs-trunk]
type = registration
outbound_auth = dcs-trunk-auth
server_uri = sip:carrier server IP address
client_uri = sip:phone number@carrier server IP address
retry_interval = 60
contact_user=phone number
expiration=3600
line=yes
endpoint = dcs-endpoint

[dcs-trunk-auth]
type = auth
auth_type = userpass
username = phone number
realm=carrier server IP address
[dcs-endpoint]
type=endpoint
context = ivr-parkgolf
allow = !all,g722,ulaw
outbound_auth = dcs-trunk-auth
aors = dcs-aor
direct_media = no
from_domain = asterisk server IP address
[dcs-aor]
type = aor
contact = sip:asterisk server ip address
[dcs-identify]
type=identify
endpoint = dcs-endpoint
srv_lookups=yes
match = carrier server IP address


I need help figuring out where I am having trouble setting up my outbound.

Thank you very much.

@yuyoungtaik Please stop creating a new thread for the same fundamental thing.

Sounds like you are being asked to authenticate yourself, but you have no means of doing that configured. This can happen if the peer fails to recognize you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.