Migrating to PJSIP - endpoint was not found

We’re migrating from Asterisk 16.x (using chan_sip) to 22.x (using pjsip). It’s a brand new server, but I’ve copied sip.conf over and used the migration script to convert sip.conf to pjsip.conf.

Now, when trying to create a channel (using ARI) to the address:

PJSIP/900010@192.168.1.142

I’m getting the error

ERROR[162658]: chan_pjsip.c:2690 request: Unable to create PJSIP channel - endpoint '192.168.1.142' was not found

the config in pjsip.conf looks like:


[registrar]
type = aor
contact = sip:192.168.1.142:5060

[registrar]
type = identify
endpoint = registrar
match = 192.168.1.142

[registrar]
type = endpoint
context = default
disallow = all
allow = alaw
rtp_symmetric = yes
force_rport = yes
rewrite_contact = yes
direct_media = yes
aors = registrar

and the output of pjsip show endpoint registrar is:

Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
    I/OAuth:  <AuthId/UserName...........................................................>
        Aor:  <Aor............................................>  <MaxContact>
      Contact:  <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
  Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress..................>
   Identify:  <Identify/Endpoint.........................................................>
        Match:  <criteria.........................>
    Channel:  <ChannelId......................................>  <State.....>  <Time.....>
        Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......>
==========================================================================================

 Endpoint:  registrar                                            Not in use    0 of inf
        Aor:  registrar                                          0
      Contact:  registrar/sip:*@192.168.1.142:5060         924e56658e NonQual         nan
  Transport:  transport-udp             udp      0      0  0.0.0.0:5060
   Identify:  registrar/registrar
        Match: 192.168.1.142/32

What am I missing?

Le 13/02/2025 à 09:36, KenD via Asterisk Community a écrit :

[KenD] KenD https://community.asterisk.org/u/kend
February 13

We’re migrating from Asterisk 16.x (using chan_sip) to 22.x (using
pjsip). It’s a brand new server, but I’ve copied sip.conf over and
used the migration script to convert sip.conf to pjsip.conf.

Now, when trying to create a channel (using ARI) to the address:

|PJSIP/900010@192.168.1.142|

|You have to call PJSIP/900010@registrar|

I’m getting the error

|ERROR[162658]: chan_pjsip.c:2690 request: Unable to create PJSIP
channel - endpoint ‘192.168.1.142’ was not found|

the config in pjsip.conf looks like:

|[registrar] type = aor contact = sip:192.168.1.142:5060 [registrar]
type = identify endpoint = registrar match = 192.168.1.142 [registrar]
type = endpoint context = default disallow = all allow = alaw
rtp_symmetric = yes force_rport = yes rewrite_contact = yes
direct_media = yes aors = registrar |

and the output of |pjsip show endpoint registrar| is:

|Endpoint: <Endpoint/CID…>
<State…> <Channels.> I/OAuth:
<AuthId/UserName…>
Aor: <Aor…>
Contact: <Aor/ContactUri…> <Hash…>
<RTT(ms)…> Transport: <TransportId…>
<BindAddress…> Identify:
<Identify/Endpoint…>
Match: <criteria…> Channel:
<ChannelId…> <State…>
<Time…> Exten: <DialedExten…> CLCID:
<ConnectedLineCID…>

Endpoint: registrar Not in use 0 of inf Aor: registrar 0 Contact:
registrar/sip:*@192.168.1.142:5060 924e56658e NonQual nan Transport:
transport-udp udp 0 0 0.0.0.0:5060 Identify: registrar/registrar
Match: 192.168.1.142/32 |

What am I missing?


Visit Topic
https://community.asterisk.org/t/migrating-to-pjsip-endpoint-was-not-found/106924/1
or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, click here
<>.


Daniel

Well now I feel like an idiot - thank you, that works. However, I’m wondering - calling @192.168.1.142 works using chan_sip - is this because it’s chan_sip will “look up” an endpoint by IP address and PJSip doesn’t, or is it something that hasn’t migrated over in the config?

Le 13/02/2025 à 10:25, KenD via Asterisk Community a écrit :

[KenD] KenD https://community.asterisk.org/u/kend
February 13

Well now I feel like an idiot - thank you, that works. However, I’m
wondering - calling @192.168.1.142 works using chan_sip - is this
because it’s chan_sip will “look up” an endpoint by IP address and
PJSip doesn’t, or is it something that hasn’t migrated over in the config?


Visit Topic
https://community.asterisk.org/t/migrating-to-pjsip-endpoint-was-not-found/106924/3
or reply to this email to respond.


    In Reply To

[tootai] tootai https://community.asterisk.org/u/tootai
February 13

Le 13/02/2025 à 09:36, KenD via Asterisk Community a écrit : [KenD]
KenD Profile - KenD - Asterisk Community February 13 We’re migrating
from Asterisk 16.x (using chan_sip) to 22.x (using pjsip). It’s a
brand new server, but I’ve copied sip.conf over and used the migration
script to convert…

Visit Topic
https://community.asterisk.org/t/migrating-to-pjsip-endpoint-was-not-found/106924/3
or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, click here
<>.


Daniel

1 Like

To be more specific with an answer - chan_sip allows you to specify global configuration details which are then used when calling an IP address. In chan_pjsip there is no such thing, you must always specify an endpoint. If you want to dial an IP address you would use the URI method[1] which still requires an endpoint.

[1] Dialing PJSIP Channels - Asterisk Documentation

1 Like

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