DaemonForums  

Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 28th June 2011
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default VoIP on OpenBSD

I got sick and tired of cranky people complaining about the lack of Skype on OpenBSD. So, I just wrote VoIP how-to for OpenBSD users who have dynamica IP address sitting behind NAT (most people on the world). It assumes that you have a free account on Proxy SIP servers

https://www.ekiga.net/index.php?page=register

or

http://serweb.iptel.org/user/reg/index.php

The how-to is in Serbian for now

https://www.bsdserbia.org/dokumentac...ku.php?id=voip

but I will translate soon. In the mean time this is shorten version. No configuration of OpenBSD is needed unless you want to listen to music while making a phone call. In that case you need to start audio server.

Code:
$ aucat -l
No configuration of your router which does NAT and any kind a funny stuff is needed!

The only thing is that pf rules must be very weak since SIP reminds me of FTP. It starts the conversation on UDP 5060 but then depends on the location uses ports all over the place.

You will need to configure files with your account information thought.

Code:
$more .pjsua.ekiga
# sample config file for Ekiga, through NAT
--clock-rate=44100
--registrar=sip:ekiga.net
--id=sip:me@ekiga.net
--realm=*
--username=me
--password=my_password
similarly for iptel.org

Code:
$more .pjsua.iptel
# sample config file for iptel.org, through NAT
--clock-rate=44100
--registrar=sip:iptel.org
--id=sip:me@iptel.org
--realm=*
--username=me
--password=my_password
Now you can start pjsua client for example with iptel.org account.

Code:
pjsua --config-file .pjsua.iptel
You will get output

Code:
+=============================================================================+
|       Call Commands:         |   Buddy, IM & Presence:  |     Account:      |
|                              |                          |                   |
|  m  Make new call            | +b  Add new buddy       .| +a  Add new accnt |
|  M  Make multiple calls      | -b  Delete buddy         | -a  Delete accnt. |
|  a  Answer call              |  i  Send IM              | !a  Modify accnt. |
|  h  Hangup call  (ha=all)    |  s  Subscribe presence   | rr  (Re-)register |
|  H  Hold call                |  u  Unsubscribe presence | ru  Unregister    |
|  v  re-inVite (release hold) |  t  ToGgle Online status |  >  Cycle next ac.|
|  U  send UPDATE              |  T  Set online status    |  <  Cycle prev ac.|
| ],[ Select next/prev call    +--------------------------+-------------------+
|  x  Xfer call                |      Media Commands:     |  Status & Config: |
|  X  Xfer with Replaces       |                          |                   |
|  #  Send RFC 2833 DTMF       | cl  List ports           |  d  Dump status   |
|  *  Send DTMF with INFO      | cc  Connect port         | dd  Dump detailed |
| dq  Dump curr. call quality  | cd  Disconnect port      | dc  Dump config   |
|                              |  V  Adjust audio Volume  |  f  Save config   |
|  S  Send arbitrary REQUEST   | Cp  Codec priorities     |  f  Save config   |
+------------------------------+--------------------------+-------------------+
|  q  QUIT   L  ReLoad   sleep MS   echo [0|1|txt]     n: detect NAT type     |
+=============================================================================+
You have 0 active call
>>>
Now make a test phone call.

Code:
>>> m
(You currently have 0 calls)
Buddy list:
 -none-

Choices:
   0         For current dialog.
  -1         All 0 buddies in buddy list
  [1 - 0]    Select from buddy list
  URL        An URL
  <Enter>    Empty input (or 'q') to cancel
Make call:
You need to type sip address you are calling. My configuration is tested with the following.

Code:
Make call: sip:*010600@ekiga.net
Now you should her a female voice and see something like
Code:
t 0 (default)
 23:28:46.948   conference.c  Port 0 (default) transmitting to port 3 (sip:*010600@ekiga.net)
 23:28:46.948    pjsua_app.c  Media for call 1 is active
 23:28:46.948   pjsua_core.c  TX 522 bytes Request msg ACK/cseq=19213 (tdta0x89135000) to UDP 86.64.162.35:5060:
ACK sip:600@72.51.47.59:5061 SIP/2.0
Via: SIP/2.0/UDP 192.168.2.2:5060;rport;branch=z9hG4bKPjREb8mml5UfL1taglP1Oas-27C9cZjJT5
Max-Forwards: 70
From: sip:ppunosevac@ekiga.net;tag=Fodbqp2tIT9wxRTlDe2ewLK-W8MonT77
To: sip:*010600@ekiga.net;tag=as507a14ed
Call-ID: 2ivSEtm.d4G99AYmcLRIS7JbzDJ05c8E
CSeq: 19213 ACK
Route: <sip:86.64.162.35;lr;did=90f.5093f8f4>
Route: <sip:64.34.162.221;lr;ftag=Fodbqp2tIT9wxRTlDe2ewLK-W8MonT77>
Route: <sip:72.51.47.59;lr;ftag=Fodbqp2tIT9wxRTlDe2ewLK-W8MonT77>
Content-Length:  0


--end msg--
 23:28:46.948    pjsua_app.c  Call 1 state changed to CONFIRMED
 23:28:47.584 strm0x89137974  VAD re-enabled
User-Agent: PJSUA v1.6/i386-unknown-openbsd4.8
Content-Type: application/sdp
Content-Length:   445

v=0
o=- 3518220550 3518220550 IN IP4 192.168.2.2
s=pjmedia
c=IN IP4 192.168.2.2
t=0 0
m=audio 4000 RTP/AVP 103 102 104 109 3 0 8 9 101
a=rtcp:4001 IN IP4 192.168.2.2
a=rtpmap:103 speex/16000
a=rtpmap:102 speex/8000
a=rtpmap:104 speex/32000
a=rtpmap:109 iLBC/8000
a=fmtp:109 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

Last edited by Oko; 3rd April 2014 at 09:24 PM.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Afelio PBX & VOIP server...? AlanQ General software and network 1 25th July 2009 08:15 AM
VoIP OpenBSD way Oko OpenBSD General 1 6th June 2009 03:27 AM
Voip FreeBSD ( I need some informations ) bsduser FreeBSD General 7 16th June 2008 03:50 AM


All times are GMT. The time now is 03:32 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick