I have an issue, my trunks have the 'OK' status but do not appear in the Asterisk SIP registration

Asterisk 18.12.1
Hello, I have a small issue with Asterisk. My peers appear as ‘OK (5ms)’ but I have 0 SIP registrations. What should I do?
Uploading: image.png…
Uploading: Capture d’écran 2023-04-05 134856.png…

sip.conf

[test1]
type=friend
host=dynamic
transport=udp
user=test1
username=test1
fromuser=test1
authname=test
secret=password
context=sortants-test
insecure=port,invite
qualify=yes
nat=force_rport,comedia
disallow=all
allow=alaw
allow=ulaw
register => test1:password@IP:5060

[general]
transport=udp
defaultexpiry=1800
context=Route_In
bindport=5060
bindaddr=0.0.0.0
register=>C307-T001-0001:password@IP:5060

[test2]
transport=udp
disallow=all
username=C307-T001-0001
type=friend
secret=password
qualify=yes
insecure=port,invite
host=IP
fromuser=C307-T001-0001
dtmfmode=rfc2833
context=Route_In
allow=alaw

its not real conf i change ip and name

Could you please provide an explanation?

Hi

register is not on the peer level. You should also avoid chan_sip and switch to chan_pjsip

ok ok and do you have an idea why it is not registered ?

I told you, you put the register stanza on peer definition, that’s not gona work. Please read the sip.conf.sample to understand how register work.

1 Like

you could help me to define the line save because I am trying to do but it does not pass?

You are using an obsolete channel driver, which is not in the current GITHub master version so will not be in this year’s release of Asterisk. If this is a new configuration, you should abandon chan_sip and immediately move to chan_pjsip. If you are stuck with a legacy system, you should be making urgent plans to upgrade.

I don’t believe register is allowed outside the general section.

Your configuration looks like it has been copied without reference to the documentation as it contains deprecated and non-existent option names, options that won’t do anything, and options values that commonly introduce unnecessary security issues, although are sometimes needed.

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