Adding Multiple sections with same name in a conf file via AMI update config

Hi,

I am trying to create a PJSIP account using AMI update config. I have created the endpoint, auth and aor sections but still facing issue in registration.

Config
---------------------

[basic_sip_endpoint](!)
type = endpoint
context = dial_master
ice_support = yes
disallow = all
allow = ulaw
aors = basic_sip_aor
force_rport = yes

[risecorp5](basic_sip_endpoint)
auth = risecorp5_auth
aors = risecorp5_user

[risecorp5_auth]
auth_type = userpass
username = risecorp5_user
password = risecorp5
type = auth

[risecorp5_user]
type=aor
max_contacts=10

------------------------------------------
PJSIP logs
-------------
<--- Received SIP request (989 bytes) from UDP:117.215.70.194:28008 --->
REGISTER sip:3.231.212.193 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.107:5060;branch=z9hG4bK-524287-1---74b8a46da65ec42a;rport
Max-Forwards: 70
Contact: <sip:risecorp5_user@117.215.70.194:28008;rinstance=8534b00dd5411870>;+sip.instance="<urn:uuid:F73BDAFC-9C9E-4937-829B-D716DB5D024C>"
To: "risecorp5_user"<sip:risecorp5_user@3.231.212.193>
From: "risecorp5_user"<sip:risecorp5_user@3.231.212.193>;tag=53f6c551
Call-ID: O5BwEGcuDs9O8jU8c9GWEQ..
CSeq: 1 REGISTER
Expires: 90
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, REGISTER, SUBSCRIBE, INFO, PUBLISH
Supported: replaces, answermode, eventlist, outbound, path
User-Agent: PortSIP UC Client iOS - v16.0.001
Allow-Events: hold, talk, conference, dialog
x-p-push: device-os=ios;device-uid=2aac24166c657831e9796605237ab608ae629504c643e1ca42df38ae32565361|8a4acf96fa68029fdd5ec469777eeb9b302581fd4b220ecfe59ee15c6afa0f46;allow-call-push=true;allow-message-push=true;app-id=com.portsip.portgo
Content-Length: 0


<--- Transmitting SIP response (426 bytes) to UDP:117.215.70.194:28008 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 192.168.0.107:5060;rport=28008;received=117.215.70.194;branch=z9hG4bK-524287-1---74b8a46da65ec42a
Call-ID: O5BwEGcuDs9O8jU8c9GWEQ..
From: "risecorp5_user" <sip:risecorp5_user@3.231.212.193>;tag=53f6c551
To: "risecorp5_user" <sip:risecorp5_user@3.231.212.193>;tag=z9hG4bK-524287-1---74b8a46da65ec42a
CSeq: 1 REGISTER
Server: Asterisk PBX certified/16.8-cert8
Content-Length:  0


[May 15 05:21:17] WARNING[5002]: res_pjsip_registrar.c:1098 registrar_on_rx_request: Endpoint 'anonymous' has no configured AORs


-----------------

It works if I change the block name for endpoint to [risecorp5_user] to match the block name of AOR.
While calling update config manager action, I can’t figure out how can I keep the names of two blocks same, not sure even if it is possible.

Please edit your posting to mark up the configuration and logs as pre-formatted text. Otherwise relevant content gets interpreted as mark up.

If possible, change your subject to reflect the issue of multiple sections with the same name when using AMI update config, as the original error message is quite correct.

chan_pjsip’s use of multiple sections of the same name is novel. They’ve always been possible, but normally only the last one is used. AMI may not have been updated to allow for this, and you are quite possibly the first person to try. Most people either write the whole configuration file, and reload that (FreePBX), or bypass the configuration files, using Asterisk Realtime Architecture.

Thanks. I have done the changes as per your suggestions.

So shouldn’t it work in case I set different name of AOR section than the endpoint section. ?

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