Outbound call for sip account

Hello,

I have several various mode outgoing accounts. How can I do that only each sip account has access to outgoing belonging to one sip account?

Hope someone can help me with this.

Outbound is no problem. The reason that multiple accounts on the same ITSP is a bad idea relates to the inability to distinguish them incoming.

There are some rumours that some ITSPs cannot cope with multiple registrations from the same IP address, which is another reason not to try and do this, but that is an ITSP issue, not an Asterisk one.

Assuming the ITSP can cope, you just use the right sip.conf section for the user.

So how can i do it ?

Here is a example for my idea.

This is sip account 100

[100_sip]

This is the outbound call only for sip account 100

[100_outbound]

I hope some one here understand what i looking for. And sorry for my very bad english.

Do you want that the :

extension 100 dial out through the account sip_100

extension 101 extension 100 dial out through the account sip_101

is that what you want?

Hi,

Easy example. sip account 100 should have access to call outbound from [100_outbound]

And sip account 200 should not have access to 100_outbound but have access to [200_outbound]

100 outbound and 200 outbound is my provider settings.

Hope you understand :smile:

[quote=“kenneiv”]Hi,

Easy example. sip account 100 should have access to call outbound from [100_outbound]

And sip account 200 should not have access to 100_outbound but have access to [200_outbound]

100 outbound and 200 outbound is my provider settings.

Hope you understand :smile:[/quote]

Simple just place the extension 100 and 200 in different s contexts

Too you can do this, verify the accounts by the Caller ID and based on the result route the calls.

No tested but should work:

[my context]

exten => _9.,1,GotoIf($["${CALLERID(num)}" = “100”]?account1:account2)

exten => _9.,10(account1),Dial(SIP/${EXTEN}@account1,30)
same=>n,Hangup()

exten => _9.,20(account2),Dial(SIP/${EXTEN}@account2,30)
same=>n,Hangup()