[[+content_image]]
I
I
Ivan Tishchenko2016-01-11 15:12:20
Asterisk
Ivan Tishchenko, 2016-01-11 15:12:20

How to fix Asterisk configuration to work with pjsip?

When making an outgoing call through the trunk, I get:

-- Executing [[email protected]:1] Dial("PJSIP/2156-00000001", "PJSIP/[email protected]") in new stack
    -- Called PJSIP/[email protected]
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [[email protected]:2] Hangup("PJSIP/2156-00000001", "") in new stack
  == Spawn extension (default, 222400000, 2) exited non-zero on 'PJSIP/2156-00000001'
    -- Channel SIP/trunk-datagroup-00000008 left 'simple_bridge' basic-bridge <cf3776a0-30b8-4050-831c-4c646ad66559>

The configuration is the following:
;pjsip.conf
[udp-transport]
type=transport
protocol=udp
bind=0.0.0.0

[datagroup]
type=registration
transport=udp-transport
outbound_auth=datagroup_auth
server_uri=sip:sip.datagroup.com.ua
client_uri=sip:[email protected]
contact_user=0442300000
auth_rejection_permanent = no
retry_interval = 30
forbidden_retry_interval = 300
max_retries = 20
expiration=3600

[datagroup]
type = aor
contact = sip:[email protected]

[datagroup_auth]
type = auth
auth_type = userpass
password = super_secret_password
username=0442300000

[datagroup]
type=identify
endpoint=datagroup
match=80.91.169.2

[datagroup]
type=endpoint
transport=udp-transport
context=default
allow=alaw
outbound_auth=datagroup_auth
aors=datagroup

[endpoint-basic](!)
type=endpoint
transport=udp-transport
context=default
disallow=all
allow=alaw
ice_support=yes
rewrite_contact=yes

[auth-basic](!)
type=auth
auth_type=md5

[aor-basic](!)
type=aor
max_contacts=1
remove_existing=yes

[2156](endpoint-basic)
auth=2156_auth
aors=2156

[2156_auth](auth-basic)
type=auth
auth_type=userpass
password=second_secret_password
username=2156

[2156](aor-basic)

;extension.conf
[general]
autofallthrough=yes

[default]
exten => _NXXXXXX,1,Dial(PJSIP/${EXTEN}@datagroup)
    same => n,Hangup()
exten => _0442300000,1,Answer()
    same => n,Dial(PJSIP/2156)
    same => n,Hangup()

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
D
Dmitry Chervonobab, 2016-01-11
@Tihon_V

There are no particular problems in the configuration.
did you do a tcpdump? Analyze it first.

I
Ivan Tishchenko, 2016-01-11
@Tihon_V

It was necessary to explicitly designate the domain in the callerid for the peer:

[2156](endpoint-basic)
auth=2156_auth
aors=2156
callerid = "Ivan Tyshchenko" <[email protected]>

UPD: The issue was resolved with the help of those. provider support.
1. The provider authorizes us on its SBC, where it is indicated that * is behind NAT.
2. Authorize only the endpoint. Block register - delete.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question