[Spce-user] How to register 3rd party SIP service provider.
agranig at sipwise.com
Fri Jan 7 13:04:24 EST 2011
The next release of the CE will bring a redesign of the SIP routing
architecture in order to allow couple of more things, including
authentication towards peers as requested.
Currently, there's one kamailio instance running on the CE, with SEMS
and Asterisk running side-by-side mainly for media services and
The new design comes with two kamailios (one as load-balancer and one as
proxy/registrar) and SEMS with SBC module in between, like [client A] ->
[kamailio lb] -> [kamailio proxy] -> [sems sbc] -> [kamailio lb] ->
[peering gw / client B].
Since the SEMS SBC is acting as back-to-back user-agent, it can
authenticate calls in behalf of the platform, as well as playing early
media etc. etc.
We're going to release a beta around end of January, leveraging these
new features. The next stable release will be available by end of March.
On 01/06/2011 05:02 PM, Chris Michael wrote:
> That's fantastic! We'll try implementing over the next few days and let the group know how we get on.
> Many thanks.
> On 6 Jan 2011, at 15:59, Stefan Sayer wrote:
>> here follows a short tutorial on how to use newer SEMS to register to 3rd party SIP provider and authenticate *outgoing calls*. (Incoming calls are not supported atm, in fact they will probably be sent back to the 3rd party).
>> Possibly the sipwise wizards can integrate something like that into the next ngcp release.
>> Using SEMS to register to SIP provider and authenticate calls through a B2BUA
>> Here is how current SEMS can be used to register an ngcp-ce to a SIP provider, and authenticate outgoing calls.
>> Handling incoming calls is not supported at the moment, this will be added in the next part of this tutorial.
>> 1. get & unpack SEMS:
>> Unfortunately, the SEMS version in use in the ngcp repos too old to contain the SBC module.
>> therefore we will just download and unpack the SEMS package and install it into /opt/sems/
>> like this:
>> ~# cd /opt/
>> /opt# mkdir sems && cd sems
>> /opt/sems# wget ftp://ftp.iptel.org/pub/sems/1.4/1.4.0-dev423329a/packages/debian/lenny64/sems_1.4.0-dev423329a_amd64.deb
>> /opt/sems# ar x sems_1.4.0-dev423329a_amd64.deb ; tar xzvf data.tar.gz
>> /opt/sems# rm data.tar.gz debian-binary control.tar.gz
>> 2. edit config files
>> In these config files, there are explanations for each of the config settings. Some are commented (with a hash #), some not. I'm assuming I want to register as user 8111111 at sipgate.de with the password 4asdb11 (just an example).
>> Adapt these settings:
>> /opt/sems# joe etc/sems/sems.conf
>> sip_ip=<your public IP>
>> (Ctrl-KX to save and exit)
>> /opt/sems# joe etc/sems/etc/reg_agent.conf
>> /opt/sems# joe etc/sems/etc/sbc.conf
>> /opt/sems# joe etc/sems/etc/auth_b2b.sbcprofile.conf
>> RURI=sip:$rU at sipgate.de
>> From="\"8111111\" <sip:8111111 at sipgate.de>"
>> To="\"$rU\" <sip:$rU@$sipgate.de>"
>> 3. check out whether registering works:
>> /opt/sems# usr/sbin/sems -f etc/sems/sems.conf -D 3 -E
>> now you should see many log lines, and pretty much at the end something like
>> "DEBUG: positive reply to REGISTER!", two boxes with "DEBUG: --- Contact Info ---"
>> and periodically messages like:
>> "DEBUG: Got state RegisterActive with expires 590s for registration."
>> If that's the case, you are registered.
>> Now you can create a peering server, in a peering group, like:
>> Name: sipgate through SEMS
>> IP Address: <your public IP>
>> Port: 5090
>> Weight: 1
>> and place a call. In the log you should now see many lines with SIP messages, specifically an INVITE coming in, and INVITE being sent out, a 407 coming back, another INVITE going out etc. If you are getting 407 back to the caller, the user/password you entered above in
>> auth_b2b.sbcprofile.conf is probably not correct.
>> 4. start SEMS as a daemon
>> In the terminal window that you have open above, you can hit Ctrl-C to stop SEMS.
>> Now we adapt the init files to start the SEMS from /opt as a daemon:
>> /opt/sems# joe etc/default/sems
>> /opt/sems# joe etc/init.d/sems
>> if test -f /opt/sems/etc/default/sems ; then
>> . /opt/sems/etc/default/sems
>> export LD_LIBRARY_PATH
>> /opt/sems# ln -s /opt/sems/etc/init.d/sems /etc/init.d/sems-sbc
>> Then the SBC-SEMS can be started with
>> # /etc/init.d/sems-sbc start
>> and added to runlevels e.g. with update-rc.d sems
>> 5. how to remove all this:
>> - stop SEMS with /etc/init.d/sems-sbc stop or kill -9 `cat /var/run/sems/sems-sbc.pid`
>> - rm -rf /opt/sems
>> - rm /etc/init.d/sems-sbc
>> Happy hacking!
>> o Chris Michael on 01/06/2011 01:11 PM:
>>> Hi Stefan,
>>> Thanks for the response and the proposed solution. I'm in no way technical and most of that went way over my head, but i'll get the person who installed the platform to have a look into it.
>>> Offering to post a how to is very kind of you, I'm sure it will benefit other users of the platform also.
>>> We were looking for an all-encompassing solution like sipwise because we found using multiple platforms and writing patches and custom script had a knock on effect on the overall stability and security of the platform, but also worried that software updates to the platforms would break any custom codes or configurations. If this is the case with your solution it may be worth pointing it out in the how to document so people can bear it in mind.
>>> On 6 Jan 2011, at 11:32, Stefan Sayer wrote:
>>>> you could easily have SEMS register to that 3rd party SIP provider, as in ngcp you already have the necessary modules installed (add registrar_client, reg_agent and uac_auth to load_plugins, and configure the account in /etc/sems/reg_agent.conf). But then SEMS registers with its contact at port 5080. So, if the sipwise guys are not coming up with a solution, and you are still interested, I might post a howto using reg_agent and newer SEMS' sbc module, which lets you do this kind of trunking easily.
>>>> o Chris Michael on 01/06/2011 11:59 AM:
>>>>> How simple to implement is this and when will it be available? Without it we'll have to look into using a different platform unfortunately.
>>>>> On 5 Jan 2011, at 15:18, Tyrone Miles wrote:
>>>>>> This is much needed, and I would also like to see it in the next release.
>>>>>>> Date: Wed, 5 Jan 2011 13:44:08 +0100
>>>>>>> From: dtiefnig at sipwise.com <mailto:dtiefnig at sipwise.com>
>>>>>>> To: spce-user at lists.sipwise.com <mailto:spce-user at lists.sipwise.com>
>>>>>>> Subject: Re: [Spce-user] How to register 3rd party SIP service provider.
>>>>>>>> On 01/05/2011 01:26 PM, Sailo VL Hruaia wrote:
>>>>>>>> Is it possible to register to 3rd party SIP service provider for > > termination of calls using their service?
>>>>>>>> Doing a SIP REGISTER? Not at the moment, but should be easy to
>>>>>>> implement. I'll discuss that with the SIP guys over here if we can get
>>>>>>> it into the next release maybe.
>>>>>>> Spce-user mailing list
>>>>>>> Spce-user at lists.sipwise.com <mailto:Spce-user at lists.sipwise.com>
>>>>>> Spce-user mailing list
>>>>>> Spce-user at lists.sipwise.com <mailto:Spce-user at lists.sipwise.com>
>>>>> Spce-user mailing list
>>>>> Spce-user at lists.sipwise.com
>>>> Stefan Sayer
>>>> VoIP Services Consulting and Development
>>>> Warschauer Str. 24
>>>> 10243 Berlin
>>>> sip:sayer at iptel.org
>>>> email/xmpp:stefan.sayer at gmail.com
>> Stefan Sayer
>> VoIP Services Consulting and Development
>> Warschauer Str. 24
>> 10243 Berlin
>> sip:sayer at iptel.org
>> email/xmpp:stefan.sayer at gmail.com
> Spce-user mailing list
> Spce-user at lists.sipwise.com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: OpenPGP digital signature
More information about the Spce-user