[Asterisk-Users] sip register incoming call contexts?

Steve Gladden Asterisk at MichiganBroadband.com
Mon Oct 10 18:41:32 MST 2005


OK, I'm starting to get somwhere with this, I'm at least registering now..
however My inbound calls are still coming into the context defined
in [general] of sip.conf and not into the context I have defined
in my peer and extensions.conf

Here is what I have done:

IN sip.conf:

register => nnnnnnn:ppppppp at ptest
;also tried register => 2484987171:mDTP5COIHEC at ptest/s


[ptest]
type=peer
;Enter your closest proxy server
host=sip.myprovider.net
fromdomain=sip.myprovider.net
fromuser=nnnnnnn
secret=:ppppppp
context=incoming2test
;Disable canreinvite if you are behind a NAT
canreinvite=no
;Don't try to authenticate on incoming calls
insecure=very
nat=yes


In extensions.conf:

[incoming2test]

exten => s,1,answer
exten => s,2,wait(1)
exten => s,3,Playback(testaudiofile)
exten => s,4,wait(1)
exten => s,5,hangup


; It never makes it into here but gets grabbed by s, defined in
[general] section of sip.conf


Any ideas??

Thanks!

Steve


--------------------------------------











> Long list of questions to follow:
>
> Short version:
>
> Does the register line mate to a peer or is a register line totally
> unrelated to a peer that is defined?
>
> When using a register line does it have to refer to actual hostnames?
> or can you refer to the peer name in the register line instead
> of an actual hostname/IP
>
> like this: register => <username>:<password>@peername/<extension>
>
> [peername] ; where peername does NOT = a hostname or ip address
>
> ---------------------------------------------------------------------
>
>
> Long version,
>
>
>
> Thanks, I have actually tried this and am still confused.
> Please bear with me...
>
> Also I was unclear on my first message and did not state that I also need
> to have a few seperate incoming contexts work from the same provider
> as well as two different providers.
>
>>From the link you provided the confusion starts wit hthe very first line:
> It reads,
>
> "register => <accountid>@sip.broadvoice.com:<password>:<account
> id>@sip.broadvoice.com/<extension>"
>
> I'm used to: register =>
> <accountid>@sip.broadvoice.com:password/<extension>
>
> This example has the "<accountid>@sip.broadvoice.com:password/<extension>"
> actually iterrated twice like:
>
> "<accountid>@sip.broadvoice.com:<password>:<account
> id>@sip.broadvoice.com/<extension>"
>
> (the same thing twice with a colon ":" in the middle.
> Is this an error?
>
> Next:
>
> You suggest to create a peer with the context= to what I need.
>
> This brings me back to the same problem of the
> [peer] name of [provider.net]
>
> I don't think I can make several peers called [my.provider.net]
>
> If I do.. register line will not know which one to use
> as they would all be called [my.provider.net]
>
> Do I need to make several different names and then do some tricks
> in DNS to make the different hostnames resolve to the same IP
> of my provider that I need?
>
> Please remember I am also trying to get several accounts from the same
> provider/IP to come into their own contexts. as well as an account or two
> from another provider.
>
> I get your point on what to do but I still do not undertand how to make
> several seperate peers that use the same IP/host yet bring their calls
> into separate contexts.
>
> The example shows using your providers hostname as the name of the peer.
>
> I guess you could name them something else but then how does the
> register line work with the peer if you do not use the hostname???
>
> can you have something like this work?
> so far I have tried this and it has been unsuccessful.
>
> I'm still unclear as to if the registerline needs to use actual
> hostnames or can it use the name of the peer and get it from the
> peer section?
>
> And does the name of the peer somehow mate the register line with the peer
> if the name of the peer matches the ?hostname? in the register line,
> And does it even need to be an actual hostname?
>
> Can you only use the real hostname in the peer and NOT use the hostname
> in the register line?
>
> I hope you can undertand my confusion on this with all the examples using
> hostnames and none of the examples using two incoming contexts with
> the same hostname yet different sip accounts.
>
> Thank you for your help and your patience.
>
> I think I almost understand this but not quite yet!
>
>
>
> register => username:password at testpeer/extension
>
> [testpeer]
> type=peer
> ;Enter your closest proxy server
> host=sip.myprovider.com
> fromdomain=sip.myprovider.com
> fromuser=<accountid>
> secret=<password>
> context=my-incoming-context-3
> ;Disable canreinvite if you are behind a NAT
> canreinvite=no
> ;Don't try to authenticate on incoming calls
> insecure=very
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>> Steve Gladden wrote:
>>> Sorry this is a bit of a newbie question, I've been at this for a few
>>> months and still have not quite figured this one out.
>>>
>>>
>>> I've been able to setup one itsp (incoming calls) (sip account) with a
>>> register line like this:
>>>
>>> register => nnnnnnn:ppppp at sip.provider.net
>>>
>>> -or-
>>>
>>> register => nnnnnnn:ppppp at sip.provider.net/nnn
>>> to come directly into an extension in the dialplan
>>>
>>>
>>> It seems that this only works with the default context in the dialplan.
>>>
>>>
>>> I have another sip account from another provider that I would like
>>> all of it's incoming calls to come into the s, extension of
>>> a new context but I have been unable to figure out
>>> how to bring calls from a register line into an alternate context.
>>
>> Create a peer with a host= setting that matches the IP of the service
>> provider's proxy. Set context for this peer. There are several examples
>> out there, one is http://edvina.net/broadvoice/
>>
>> /Olle
>> _______________________________________________
>> --Bandwidth and Colocation sponsored by Easynews.com --
>>
>> Asterisk-Users mailing list
>> Asterisk-Users at lists.digium.com
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
> _______________________________________________
> --Bandwidth and Colocation sponsored by Easynews.com --
>
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>




More information about the asterisk-users mailing list