[Asterisk-Users] Two accounts at one provider and a 302 redirect
problem
Rich Adamson
radamson at routers.com
Sat Apr 2 08:19:23 MST 2005
> I've got a problem with my incoming calls (SIP). First I tried to route
> different providers to different extensions in which ._ matched the call
> and called the internal phones and so on.
>
> Then I got this Nikotel Account. I managed to get it working. Small hint
> for the people trying Nikotel and having problems with the internal 99er
> numbers. Nikotel redirects with the 302 message to a user called
> user at 63.214.186.6. Asterisk can't redirect unless you define a sip.conf
> section with [63.214.186.6]. See
> http://bugs.digium.com/bug_view_page.php?bug_id=0001974 and read
> marksters comment at the bottom.
>
> So now it worked.
>
> Then I tried two Nikotel Accounts on the same asterisk machine. Problem
> is that now every internal 99er call goes to the extension defined in
> [63.214.186.6]. My idea is now to route every incoming call to one
> extension. I tried to recognize the called number int the extension like
> this:
>
> 9978389389,1,Answer
> 9978389389,2,...ring phone 1
>
> 9948389390,1,Answer
> 9948389390,2,...ring phone 2
>
> (these are fake numbers)
>
> But I did not manage to route the call based on the called numbers. Only
>
> _.,1,Answer
> _.,2,...ring a phone
>
> did work.
>
> Does anyone have a hint? I would appreciate any comments!
Not enough info to guess with any reasonableness.
Assuming you are using a register statement for each account, that
statement should look something like:
register=myuserid:mysecret at 146.135.8.128/1234
The "1234" at the end of that statement tells your provider what
digits to dial when contacting your asterisk. So, in this example,
an entry in extensions.conf like:
exten => 1234,1,Dial(SIP/3000,15,r)
would cause that incoming call to ring sip phone x3000. For
If you use a different suffix on each provider's register statement,
you should be able to put together an associated extensions.conf
entry to handle each separately.
On the other hand, if you use a register statement like:
register=myuserid:mysecret at 146.135.8.128
without the suffix, then an extensions.conf entry like:
exten => s,1,Dial(SIP/3000,15,r)
would work, but it doesn't distinguish between multiple providers.
If you need a better answer, then post your register statements in
sip.conf (change the passwords) for each provider, along with the
appropriate sections of extensions.conf that handle the incoming
calls.
More information about the asterisk-users
mailing list