[asterisk-users] register => to let Asterisk register to another softswitch via SIP

Alex Balashov abalashov at evaristesys.com
Tue Oct 23 15:27:35 CDT 2007


Bilal,

On Tue, 23 Oct 2007, bilal ghayyad wrote:

> This is if I need to let Asterisk register with another softswitch (so I 
> used register =>), what if I need asterisk to send call for the 
> softswitch without register to it (directly)? If I removed the register 
> => then how it will distiguish the IP address in the "host" at the 
> [sip_trunk] is the IP address of the softswitch that need to register 
> with it and not the IP address of the original caller sip endpoint?

   Unless I am missing something here, I suppose the answer is that 
Asterisk can distinguish the IP endpoints because they are ... distinct.

   Here is the essence of the situation:

   In Asterisk it is possible to peer with an endpoint with and without
registrations.  Registrations are mostly intended for dynamic endpoints
whose IP address can potentially change, such as end-user phones off of
broadband connections, or other clients whose IP address is not desirable
to track or cannot be trusted.

   The other type of peer is a 'trusted' trunk tied to a particular IP 
endpoint on the far end.  The trust can be done only by IP address,
or by IP address + SIP UDP port.  This type of peer is typically used
when doing SIP handoff from origination and termination carriers on any
kind of large-scale, or in other intra-industrial and/or internal and/or
intra-platform SIP connections where it is not desirable to position one
endpoint of the SIP trunk as a UAC (client) registering against a UAS
(server) per se, as such, in the respect that one challenges the other
for authentication credentials.

   So, what I would do is build a trusted trunk (type=peer, insecure=very) 
to the softswitch that has a static IP (host=) endpoint defined.  Then,
Asterisk can accept registrations from your users.  Where to route the
call is determined entirely in the dial plan (extensions.conf), where
you can send calls to particular SIP peers.  So, for example, here is a
regular user defined in sip.conf:

[Alex_Evariste_2]
type=friend
host=dynamic
canreinvite=no
username=Alex_Evariste_2
secret=xxxxxx
nat=yes
allow=ulaw
qualify=yes
mailbox=1000 at evariste
context=default-user-dial

   And here is a dedicated trunk to a provider:

[my_sip_provider]

host=xxx.yyy.zzz.www
insecure=very
type=peer
qualify=no
canreinvite=no
dtmfmode=rfc2833

   Then, your dial plan for a user can be set up like this, for example,
in extensions.conf:

 	[default-user-dial]

 	; Any North American ten-digit number.

 	exten => _NXXXXXXXXX,1,Dial(SIP/${EXTEN}@my_sip_provider)

   In our case, we actually register with our SIP origination provider, so 
we have this IP trunk:

[junction_networks]

fromdomain=jnctn.net
host=sip.jnctn.net
port=5060
insecure=very
username=this_user
secret=this_password
type=peer
qualify=no
canreinvite=no
dtmfmode=rfc2833

   But in addition, in the [general] context at the top of sip.conf, we 
have:

    register => our_user:our_password at sip.jnctn.net

   As you can see, one type of registration requirement does not interfere 
with another.

   Hope this helps.  If it doesn't, please let me know if I misunderstood 
something.

Cheers,

--
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : +1-678-954-0670
Direct : +1-678-954-0671



More information about the asterisk-users mailing list