Configuring Outbound Calls from a Registered Account


I’m trying to configure a way to use an registered voip account to emit calls from asterisk. Is that possible, how to configure? I was unable to find a correct answer from any wiki.

Firstly are we talking about SIP? If so, are you using the supported chan_pjsip driver?

SIP registration is not something that the RFC requires before making a call. It’s purpose is to inform the endpoint where to send incoming calls. Some providers may insist that you register and use your registered incoming address to validate the source of outgoing calls, but that is their policy decision.

More generally, the way that providers identify and authenticate callers varies between providers and between types of account within a provider, so it is impossible to give a definitive answer without that information.

The exact error response is also important in understanding what is going wrong.

The most common settings for outgoing calls on systems that identify by account name, is that the account name goes in the From user.

If you are behind NAT, you should set the external signalling and media addresses correctly.

It is becoming common to insist on the use of the correct caller ID, but one would need to know how caller ID should be signalled, for that provider.

1 Like

Thanks for you reply. But let me be clear on why I’m asking this. I manage a VOIP server and we were vitims of frauds. We’ve already identify from what network the fraud is comming and already stop it. However I’m trying to understand was the fraud possible. The passwords on the accounts are to complex to be craked but however the hacker was able to use these accounts to emit calls. From registrations logs, i was unable to find duplication of registration. So my current theory is that the VOIP server allows outbound calls from accounts that are already registered beforehand. So I’m trying to test this scenario on asterisk. I have an account that is already registered and now I’m trying to use asterisk to make an outbound call from said account. Possible?

Asterisk doesn’t care whether someone has registered with a provider before attempting an outbound call through that provider.

If you ask it to qualify the provider, it won’t attempt a normal call if it hasn’t received responses to OPTIONS, but it would be strange for a provider to ignore OPTIONS, but accept INVITE, dependant on whether the sender is registered for incoming calls, although some providers seem not to respond at all to OPTIONS.

Understood… So if i wanted to replicate this behaviour, how would i go about to configure it? I need to make sure if this is a safety issue we need to address imediatly and to verify that it was indeed how the fraud was done.
I was trying with:
exten => _XXXXXXX,1,Dial(SIP/${EXTEN})
But it does not work. I need to do further configurations?

You are using an obsolete channel driver.

What do you mean by username? By username, Asterisk means the user part of the request URI, which is generally the destination number.

The second / is not a documented option, when using literal URIs. Depending on what you are actually trying to send, you will probably need to use the devicename form of the dial string.

(The default source of From User is the caller ID, not anything in the dial string.)

However, you should be using chan_pjsip, which always requires an endpoint name.

To give any more precise information we’d need to know what you want to appear on the wire.

You can require an auth stanza in pjsip.conf, with a username and password. Then Asterisk shouldn’t accept calls via this endpoint without the right authentication.

I think the OP is trying to simulate a client with lax security, not to implement a server with strong security. (client and server as per RFC 3261.)

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