[Asterisk-Users] Newbie question - sip.conf incoming contexts
Steve Gladden
Asterisk at MichiganBroadband.com
Sat Apr 1 23:25:08 MST 2006
> What version of asterisk? (been lots of changes happening to the sip
> code over the last year)
SVN-branch-1.2-r9156
I think what I am trying to do is pretty basic and should not have changed
much in the past year.
I got started in July of 2005 and I upgrade about once per month.
In all this time I have not gotten this simple concept down that I
am asking about.
>
> Have you looked at the sample configs in /usr/src/asterisk/configs?
Yes I have and my own configs are pretty much copies of them.
They do not detail, do or explain the simple concept that I am
trying to accomplish.
If they do.... I don't see it.
#1 I have more than one incoming SIP account
#2 I would like to have them come into the context of
my choice when a call comes in.
HOW do I do this?
currently I have 3 register lines
there is no way to specify in a register line
some way of making the call start in any other context
other than what is specified in the [general] section
of sip.conf
It seems that somehow maybe if there is a peer tat is somehow
matched to the register line (how???) it may work.
There may be some crazy way to do this within a peer
if so this is the information I am looking for...
The examples and descriptions are not at all clear to me....
I have 3 accounts with the same provider....
How do I get incoming calls to come into three different contexts
that I will create is the question.
>From the example file I see:
Asterisk can register as a SIP user agent to a SIP proxy (provider)
; Format for the register statement is:
; register => user[:secret[:authuser]]@host[:port][/extension]
;
; If no extension is given, the 's' extension is used. The extension needs to
; be defined in extensions.conf to be able to accept calls from this SIP
proxy
I actually need to do 3 of these.....
; (provider).
;
; host is either a host name defined in DNS or the name of a section defined
; below.
;
; Examples:
;
;register => 1234:password at mysipprovider.com
;
; This will pass incoming calls to the 's' extension
;
;
;register => 2345:password at sip_proxy/1234
;
; Register 2345 at sip provider 'sip_proxy'. Calls from this provider
; connect to local extension 1234 in extensions.conf, default context,
; unless you configure a [sip_proxy] section below, and configure a
; context.
Ok I have 3 accounts from the same provider....
one [sip_proxy] section just puts me in the same problem boat I'm already
in.... using a register line
the calls some into the context specified in [general] section of sip.conf
I need to somehow differentiate the three SIP 'lines' and give
them different contexts to start in.
; Tip 1: Avoid assigning hostname to a sip.conf section like
[provider.com]
OK sure then how will this associate with my register line that
uses provider.com
This makes no sense to me...
I mean It really makes no sense...
Sorry for my confusion.
Do I need the register line or do I not need the register line?
Why even have a register line if you don't need it and can somehow
do this in a peerf, riend or user section.....
and if you need the register line ---- the instructions say
not to use [provider.com] as the peer, then how the heck do you
get that register line to work with an associated [peer].
I need to get a handle on how this works before I go posting my
sporatic attempts to get a friend,peer or user to 'register'
which is not working.
The only way I've been able to get my system to take incoming calls
from our sip provider so far is to use register lines and keep
the system 'registered' with our provider.
; Tip 2: Use separate type=peer and type=user sections for SIP providers
; (instead of type=friend) if you have calls in both directions
> It would be far more helpful if you'd post your register statements and
> each of the sip contexts from sip.conf. Might also include the section
> of your dialplan that each of the sip.conf contexts refer to.
>
I can do this but only once I can try something
that seemingly should work.
Right now I'm pretty much using default configs,
a single incoming context and register lines of which
all of those calls come into this single context.
I need to know 'what to try' in order to give this a shot!
Thanks for your help and suggestions!
Steve
>> I've been struggling with the documentation for months on this simple
>> subject...
>> I still have not been able to get this concept down...
>>
>>
>> I have 3 sip accounts (PSTN DID's) that come into my asterisk box
>> and give me phone service from my itsp via SIP.
>> I for the life of me have not been able to figure out how to get them to
>> come in to 3 seperate contexts!
>>
>> This must be simple but I am missing the point.
>> All 3 accounts need a register line (I think) in order to work.
>>
>> The register lines work great but I have not been able to figure out
>> how to get the other two lines to come into another seperate inbound
>> context that I have defined other than the one that is specified
>> in the [general] section of sip.conf
>>
>> The /extension number does not do the trick for me
>>
>> I wuld like for these incoming lines (from the same itsp) to truly
>> land in one of 3 seperate starting contexts in my dialplan based
>> on what phone number (account) they are.
>>
>> Thank you very much for your help... this must be simple
>> but I have not really figured it out in several months of playing
>> around and reading....
>>
>> I've figured out a TON of other complex things, but this simple
>> incoming context thing has me a bit stumped.
>>
>> I've tried a few things in my sip peer like
>> register=yes which was suggested on a web site but it does not work.
>>
>> I also tried maing the peer name match the account (phone number)
>> of the sip account and that did not do it either.
>>
>> The peers work fine as outgoing but I've not figured out how to make
>> them
>> work for incoming as my sip itsp requires that I 'register' for inbound
>> calls.
>
> What version of asterisk? (been lots of changes happening to the sip
> code over the last year)
>
> Have you looked at the sample configs in /usr/src/asterisk/configs?
>
> It would be far more helpful if you'd post your register statements and
> each of the sip contexts from sip.conf. Might also include the section
> of your dialplan that each of the sip.conf contexts refer to.
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
More information about the asterisk-users
mailing list