Pjsip help registration

Hi,

I have new phone numbers for my asterisk system.

In zoiper free, if I use

Domain: 5.xxx.x.xx
Username: 8yyyyyy
Password: Mxxxxxxxx
CallerIdName: 00123456789

I can emit a call

But, if on PJSIP I use:

[Username]
type=registration
outbound_auth=Username
server_uri=sip:Domain
client_uri=sip:Username@Domain
retry_interval=5
fatal_retry_interval=5
forbidden_retry_interval=20

[Username]
type=auth
auth_type=userpass
password=Password
username=Username

[Username]
type=aor
contact=sip:Domain
max_contacts=20
qualify_frequency=20
qualify_timeout=5

;NUM 1
[00123456789]
type=endpoint
context=router
disallow=all
allow=alaw,ulaw;,slin,gsm,g729,g723
outbound_auth=Username
aors=Username

[00123456789]
type=identify
endpoint=00123456789
match=Domain

;NUM 2
[00123456788]
type=endpoint
context=router
disallow=all
allow=alaw,ulaw;,slin,gsm,g729,g723
outbound_auth=Username
aors=Username

[00123456788]
type=identify
endpoint=00123456788
match=Domain

I can’t emit a call using my asterisk…
by using pjsip set logger on

I receive:

<--- Transmitting SIP request (419 bytes) to UDP:Domain:5060 --->
OPTIONS sip:Domain SIP/2.0
Via: SIP/2.0/UDP ASTERISK_IP:5060;rport;branch=z9...
From: <sip:00123456789@ASTERISK_IP>;tag=f3...
To: <sip:DOMAIN>
Contact: <sip:00123456789@ASTERISK_IP:5060>
Call-ID: 8c...
CSeq: 46675 OPTIONS
Max-Forwards: 70
User-Agent: Asterisk PBX 20.4.0
Content-Length:  0


<--- Received SIP response (417 bytes) from UDP:Domain:5060 --->
SIP/2.0 501 Method Not Supported Here
Via: SIP/2.0/UDP ASTERISK_IP:5060;rport=5060;branch=z9...
From: <sip:00123456789@ASTERISK_IP>;tag=f3...
To: <sip:Domain>;tag=535....
Call-ID: 8c...
CSeq: 46675 OPTIONS
Server: OpenSer (....)
Content-Length: 0

Any ID to use this 2 numbers with asterisk? I use ARI Nodejs ORIGINATE PJSIP/number@00123456789

Thanks

PS:

pjsip show registrations

 <Registration/ServerURI..............................>  <Auth....................>  <Status.......>
==========================================================================================

 Username/sip:Domain                                  Username                     Registered        (exp. 1998s)

This was successful. Any well formed response will do.

Your log extract doesn’t show a call attempt, but there doesn’t seem to be any reason why Asterisk would not attempt a call.

We need to see the operation that requests a call, and the responses to that.

Whether the call or registration is going to be acceptable to the provide depends on the provider, but you have obfuscated the identity of the provider. Someone requiring you to set the caller ID name, but not the number is strange and you have not reflected that in the parts of the Asterisk configuration that you have provided.

Hi

Thanks for your answers.
It finally worked by adding from_user in the endpoint block…
I don’t understand why it always worked without this line and now I need to add it.

Thanks !