[Spce-user] How to register 3rd party SIP service provider.
stefan.sayer at googlemail.com
Thu Jan 6 10:59:05 EST 2011
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
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/
~# cd /opt/
/opt# mkdir sems && cd sems
/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>"
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
"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>
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
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# 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
- rm -rf /opt/sems
- rm /etc/init.d/sems-sbc
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
VoIP Services Consulting and Development
Warschauer Str. 24
sip:sayer at iptel.org
email/xmpp:stefan.sayer at gmail.com
More information about the Spce-user