[HELP]: Multiple SIP registrations at one sip host


I need to have multiple registrations on one host (e.g. two or more accounts at provider - sipgate.co.uk:5060, fwd, whatever). How do I do this?

Registration and outgoing calls work fine. Incoming calls DO NOT.

Asterisk always assigns incoming INVITEs (when someone calls in) to one of these accounts. I have tried several configurations and probably the best result was when only one number worked and other accounts were unreachable (asterisk complained about bad username in incoming SIP messages).

Any idea how to solve this?

Another question is about freedigits.com/talkdigits.com - has anyone set up outgoing phone calls to this provider ? Their server complains about filled domain name in authentication messages.

Thank you,


Identical problem here.

I understand that it’s because asterisk’s SIP handling is too weak to match incoming calls from multiple registrations with the same provider.

I’ve read that the SIP code is being re-written, but meanwhile, we need a workaround … this is a MAJOR problem if you’re with a provider that doesn’t talk IAX.

Can someone PLEASE help?


I would suggest a simple workaround.
Leave just a single registration for a ‘main’ number, and configure unconditional call forwarding (on the provider’s side) from all other numbers to that main number.
On the Asterisk side you will still have a visibility on the called number.

Thanks for the idea AndrewZ, but the reason I have multiple numbers is so that I can route the calls to multiple phones. Caller ID won’t help me in making this decision in my dialplan.

Any other ideas?

You can :wink:

As I sad before - On the Asterisk side you will still have a visibility on the originally called number. I’m using exactly the same setup.

Just configure it and check the call debug. You will see all the information there.

Okay … so I tried your suggestion AndrewZ, and eventually I got it working, but outgoing calls stopped working.

Here’s why:

1.) I needed to include SIP channels for both numbers, even though only one of them was going to be used for incoming calls. Otherwise I wouldn’t have been able to separate outgoing calls.

2.) Asterisk still couldn’t decide which channel to match when an incoming INVITE arrived (it didn’t help that sometimes the INVITE came from a different address to the channel’s host – I’m with a naughty provider, it seems). So to get authentication working I had to add an auth = my_credentials@my_realm to the [authentication] section of sip.conf. Then everything started to work for incoming calls (it could authenticate by realm).

3.) Outgoing credentials when placing a call from the second number (i.e. the one that is forwarded to the common number on the provider side) were always the ones specified by the auth = line (rather than the ones specified for the SIP channel, even with an auth = line of its own), so it wouldn’t authenticate outgoing calls. Adding multiple auth lines achieved nothing (the realms were the same, so asterisk must have ignored the second one), so basically I was at another brick wall.

I’ve now ditched one number and will use two different providers. Bring on the day when Asterisk supports more than the simplest of SIP configurations …

Thanks for your ideas though AndrewZ … I appreciate your assistance. mhinner, have you had any luck?

Hi guys,

I think you should have a look at : www.mysipswitch.com
That’s a free tool which allows the use of multiple SIP accounts from a single SIP login.