Incoming and outgoing calls on Asterisk

Here are the sip and extensions files from my asterisk. The problem is I can’t make any code and don’t know why.


Ask the people who maintain the remote system, as that system refused the call.

1 Like

That will happen if the credentials between the remote host and local server don’t match.

The provider told me that the INVITE is wrong but I don’t know how to modify it. Can you help me with that ?

Did they tell you HOW it is wrong?

1 Like

Now the INVITE is sip:“anumber”

and it needs to be changed to the number from where i call

You don’t appear to have defined the meta-name “anumber”, so I don’t know what the last post means.

Also, if the request URI doesn’t contain the destination, how is the ITSP expected to route it.

I’m guessing that what they are actually saying is that the From header user field contains the caller ID when they want he account name. In that case, use fromuser.

the anumber is the number used in the extensions.conf file but I configured it to force asterisk to call this number because i was not sure he was taking the right number.

You’re guessing that I need to change the fromuser is the sip.conf file Under netplus-out ?

but how do you explain the fact that when I dial something there is nothing on asterisk even with the verbose on level 3 ?

Please do not PM contributors asking for free consultancy. Sample SIP configurations are in in Sample extensions.conf ones in

There should also be extensive examples in

Finding the correct settings for a particular ITSP and local configuration require correct and detailed information about what they require and more time than is reasonable for peer support forums.

I don’t do paid consultancy, but those who do would want an indication of how much you were prepared to pay.

The actual INVITE is
sip: “thenumberIdial”
and it needs to be changed by the number I have. Not the one I dial so the provider can know who is calling and process the pricing.

It seems that the correct A-number (Calling Party) needs to be set in the From header.
The simple way will be ‘fromuser=’, alternatively it could be set in dialplan using ‘Set(CALLERID(num)=’.
In either case provider should tell the right format or provide an example.

I assume the "'s are not really there. By the actual invite, I assume you mean the request URI. If that is not the called party number, no compliant SIP implementation is going to be able to route the call to the correct destination.

As I’ve already said, and has been backed up by the last responder, it is normally the the From header that ITSPs exepct to contain the account information.

Generally, though, if the ITSP cannot give you at least a configuration for an obsolete version of Asterisk, they are not in the business market, but probably in the single IP phone home market. Even then home phones will send the called number in the request URI.

Agree on “the single IP phone home market”.
Assuming their own application is not using TLS for SIP I see the only way to find out all the details - their softphone needs to be installed and configured then traffic between the phone and provider needs to be captured and analyzed.

As a last attempt:
Remove [netplus-out] or simply don’t use it.
In [netplus] set ‘defaultuser’ and ‘fromuser’ to whatever id provided by provider.
Set ‘fromdomain’ to the same value as ‘host’. Add ‘secret’ with your password.
Make a call through ‘netplus’, post your sip debug output as text(!), switch off the regular logging.