Outbound getting error this number is not yet assigned

I couldn’t past the log here
so here’s the pasbin:

table of extensions:

id | context | exten | priority | app | appdata
----±---------±------------±---------±-----±----------------------
1 | internal | _NXXNXXXXXX | 1 | Dial | PJSIP/${EXTEN}@voipms

extensions.conf

[general]
static = yes
[internal]
switch => Realtime/internal
[outbound]
;switch => Realtime/internal@extensions

no clue what could be the issue, each time I try to make outbound call , i’m getting error : this number is not yet assigned … pls contact technical support

using asterisk + postgres
Thank you in advance

That’s a message from voip.ms, so you’d need to talk to them and see. Your PJSIP configuration may also not be correct.

I already talked to them, and they told me it’s from my side
I posted the table of extension with one simple dial rule

plus the extensions.conf , so what could be the issue?

You have sent them a wrong number or wrongly formatted number.

As the error has been reported as normal media, there is no information about the cause in the trace.

as you can see here’s the dialup _NXXNXXXXXX and im trying to call my cellphone

Maybe they want 1NXXNXXXXXX, although https://wiki.voip.ms/article/Dialing_Codes#Local_calls_.28USA48.2FCanada.29 suggests that isn’t the case.

In any case, you are sending a bogus caller ID, which is likely to get rejected, but not one with that message.

Can you confirm that you are expecting to authenticate by IP address and not user and password. If not the case, then you are not sending any account information.

I’m a little surprised that a VoIP provider would send an inband message, so it is possible that this is failing downstream of voip.ms.

There are spurious spaces in voip.ms in your trace. I’m not sure how much confusion that would cause.

authentification with voipms done with user and password, voipms is authenticated
here’s the log
Endpoint voipms is now Reachable
– Contact voipms/sip:username@atlanta.voip.ms is now Reachable. RTT: 77.147 msec

That doesn’t actually authenticate or prove it’s authenticating properly, just that Asterisk received a response.

so what would be the right to verify?
I tried ```
pjsip show registrations

and I got:
No objects found.
Ps: like I said I'm using postgress and asterisk

That refers to outbound registrations. If you have no outbound registration configured, then there won’t be any.

From the initial pastebin you are not authenticating to voip.ms. This is likely because of PJSIP endpoint configuration. You most likely need to have the “from_user” option set to the username to authenticate as.

pjsip show endpoints

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

Endpoint: 1001 Unavailable 0 of inf
InAuth: 1001/1001
Aor: 1001 1
Transport: transport-udp udp 0 0 0.0.0.0:5060

Endpoint: 1002 Not in use 0 of inf
InAuth: 1002/1002
Aor: 1002 1
Contact: 1002/sip:1002@192.168.0.14:5065 72d3e696e2 Avail 2.518
Transport: transport-udp udp 0 0 0.0.0.0:5060

Endpoint: 801 Not in use 0 of inf
InAuth: 801/801
Aor: 801 1
Contact: 801/sip:801@192.168.0.14:59200;transport=U 56db6defba NonQual nan
Transport: transport-udp udp 0 0 0.0.0.0:5060

Endpoint: voipms Not in use 0 of inf
InAuth: voipms_auth/username
Aor: voipms 1
Contact: voipms/sip:username@atlanta.voip.ms 7f20b8fc72 Avail 72.981
Transport: transport-udp udp 0 0 0.0.0.0:5060

Objects found: 4

as you can see the endpoint voipms is listed in the conf , asterisk are able to get the info from the table

At no point do you send them a user ID and at no point do they ask you for a password. Typically the user ID is sent in the user part of the From: URI, which is also the default location for the caller ID. You have sent then what appears to be an internal caller ID.

I’d expect something like the second example in

https://wiki.asterisk.org/wiki/display/AST/res_pjsip+Configuration+Examples

to work, with the addition of from_user, set to the username, in the endpoint section, send_rpid set to true, also in that section, and dialplan code to set the caller ID to your official phone number.

It is just possible that they assume the host you register for incoming calls is valid for outgoing ones, but SIP really expects outgoing requests to be authenticated independently. However their documentation suggests you must authenticate every request (although it is based on the obsolete, chan _sip driver, and contains some common mistakes found in provider provided configurations.

I haven’t said it’s not being used. It’s just not configured properly to work with voip.ms it seems.

I managed to make it work before, The only issue is : I truncate the table of extensions by error, when I tried to put the dial-up conf into the table, since then, I’m getting the issue

It’s not dialplan related, unless you were working around incorrect PJSIP configuration (such as not setting from_user) by setting callerid in the dialplan.

I’m confuse where the error comes from
here’s some tables, I couldnt share ps_endpoints because it will be hard to read

Wrong direction

I don’t believe this should have a user part.

See also previous notes about from_user, send_rpid, and setting the caller ID.

Personally, I would suggest getting things working using .conf files. In particular, I can’t think of a good reason for not always using .conf files for the provider end points.

I wanted to make it dynamic , easy to manage from the database
but I will try static and see if issue persist

A lot of the ARA code is only community maintained, but the basic suggestion is get it working the simple way before you complicate things with ARA.

You might want to note that, although it maintains a database, FreePBX doesn’t use ARA, but rather construct .conf files from its own database.

Incidentally, in other areas, ARA can make debugging more difficult, because there is a certain amount of lazy evaluation, which means that debugging tools may only see the parts of the data that have been accessed, as they generally work from the in memory data.

The provider configuration is generally more complicated than that for local phones, and not something that is repeated. That’s why I suggest not using ARA for that.