bilal ghayyad
2007-Oct-23 20:12 UTC
[asterisk-users] register => to let Asterisk register to another softswitch via SIP
Dear Alex; Thanks alot for your nice help. 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? Your help is highly appreciated. Regards Bilal The same way you do it with IAX2, pretty much. http://www.voip-info.org/wiki-Asterisk+config+sip.conf On Fri, 19 Oct 2007, bilal ghayyad wrote:> Hi All; > > Alot of softswitches or PBX's does not accept to > manipulate any SIP call without being registered > firstly. So that means, I need asterisk to register > firstly then I can route my calls to that SIP trunk. > > In IAX2, we use the register => , so what shall wedo> in Asterisk? And how its format will be (if we will > use register)? Or what is the solution? > > Regards > Bilal__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Alex Balashov
2007-Oct-23 20:27 UTC
[asterisk-users] register => to let Asterisk register to another softswitch via SIP
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
bilal ghayyad
2007-Oct-24 11:35 UTC
[asterisk-users] register => to let Asterisk register to another softswitch via SIP
Dear Alex; Thanks for your great help and nice replies. I would like to confirm that I understood your request very well, so please advise me for the following: 1) If no need for registering asterisk with the softswitch, then no need to use register => but we will configure the section with type=peer and host=softswitch_ipaddress, correct? 2) If no need to register asterisk with the softswitch, then this kind of trunk is called trunk tie and it is 'trusted', correct? 3) For receiving calls from the softswitch via the trunk tie, then username and secret are not important for the section configuration as the insecure=very, correct?