SearchSearch  Log in to check your private messagesLog in to check your private messages  recent posts Recent Posts
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
vniqaOffline



Joined: May 09, 2008
Posts: 7

Status: Offline
Posted: May 11, 2008 - 07:36 AM Reply with quote Back to top
I'm trying out pjsip/pjsua as a possible test tool for our company's IP PBX product. There's not a lot of "PJSIP/PJSUA for dummies" type of documentation/tutorials out there, so I've tried my best following the tools help/usage information. Unfortunately, the tool didn't work right off the bat and its logging/error reporting is too verbose for me to interpret.

Maybe someone can advise me on what the problem is.

I compiled the PJSIP source code and am playing with

pjproject-0.5.10.4\pjsip-apps\bin\pjsua_vc6d.exe

and here are the output results I'm getting trying to connect with my voipuser.org vs my company's PBX. The output appears to say the SIP registration was unsuccessful. I have however been able to register to my company's PBX using X-Lite (but was not able to do the same for voipuser.org with X-Lite, at least within my company's network when I did the test).

Code:

D:\ToCompile\pjproject-0.5.10.4\pjsip-apps\bin>pjsua_vc6d.exe --id=sip:vniqa@voi
puser.org --registrar=sip:sip.voipuser.org --local-port=5060 --no-udp --username
=vniqa --password=<mypassword> --null-audio --auto-loop
 23:14:44.046 os_core_win32. pjlib 0.5.10.4 for win32 initialized
 23:14:44.697 sip_endpoint.c Creating endpoint instance...
 23:14:44.707          pjlib select() I/O Queue created (00A27334)
 23:14:44.707 sip_endpoint.c Module "mod-msg-print" registered
 23:14:44.707 sip_transport. Transport manager created.
 23:14:44.707 sip_endpoint.c Module "mod-pjsua-log" registered
 23:14:44.707 sip_endpoint.c Module "mod-tsx-layer" registered
 23:14:44.707 sip_endpoint.c Module "mod-stateful-util" registered
 23:14:44.707 sip_endpoint.c Module "mod-ua" registered
 23:14:44.707 sip_endpoint.c Module "mod-pjsua" registered
 23:14:44.707 sip_endpoint.c Module "mod-invite" registered
 23:14:51.256      pasound.c PortAudio sound library initialized, status=0
 23:14:51.276      pasound.c PortAudio host api count=3
 23:14:51.276      pasound.c Sound device count=16
 23:14:51.276          pjlib select() I/O Queue created (00F0D284)
 23:14:51.286 sip_endpoint.c Module "mod-evsub" registered
 23:14:51.286 sip_endpoint.c Module "mod-presence" registered
 23:14:51.286 sip_endpoint.c Module "mod-refer" registered
 23:14:51.286 sip_endpoint.c Module "mod-pjsua-pres" registered
 23:14:51.286 sip_endpoint.c Module "mod-pjsua-im" registered
 23:14:51.286 sip_endpoint.c Module "mod-pjsua-options" registered
 23:14:51.286   pjsua_core.c 1 SIP worker threads created
 23:14:51.286   pjsua_core.c pjsua version 0.5.10.4 for win32 initialized
 23:14:51.346    tcplis:5060 SIP TCP listener ready for incoming connections at
192.168.69.31:5060
 23:14:51.657    pjsua_acc.c Account <sip:192.168.69.31:5060;transport=TCP> adde
d with id 0
 23:14:51.667    pjsua_acc.c Account sip:vniqa@voipuser.org added with id 1
 23:14:51.667    tsx00F2A244 Failed to send Request msg REGISTER/cseq=5202 (tdta
00F2920C)! err=171060 (Unsupported transport (PJSIP_EUNSUPTRANSPORT))
 23:14:51.667    pjsua_acc.c SIP registration failed, status=503 (Service Unavai
lable)
 23:14:51.667     sip_regc.c Error sending request, status=171060
 23:14:51.667    pjsua_acc.c Unable to create/send REGISTER: Unsupported transpo
rt (PJSIP_EUNSUPTRANSPORT) [status=171060]
 23:14:51.667  pjsua_media.c RTP socket reachable at 192.168.69.31:4000
 23:14:51.667  pjsua_media.c RTCP socket reachable at 192.168.69.31:4001
 23:14:51.677  pjsua_media.c RTP socket reachable at 192.168.69.31:4002
 23:14:51.677  pjsua_media.c RTCP socket reachable at 192.168.69.31:4003
 23:14:51.677  pjsua_media.c RTP socket reachable at 192.168.69.31:4004
 23:14:51.677  pjsua_media.c RTCP socket reachable at 192.168.69.31:4005
 23:14:51.687  pjsua_media.c RTP socket reachable at 192.168.69.31:4006
 23:14:51.687  pjsua_media.c RTCP socket reachable at 192.168.69.31:4007
 23:14:51.687  pjsua_media.c Opening null sound device..
>>>>
Account list:
  [ 0] <sip:192.168.69.31:5060;transport=TCP>: does not register
       Online status: Online
 *[ 1] sip:vniqa@voipuser.org: 503/Service Unavailable (expires=-1)
       Online status: Online
Buddy list:
 -none-

+=============================================================================+
|       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              | !b  Modify buddy         | !a  Modify accnt. |
|  h  Hangup call  (ha=all)    |  i  Send IM              | rr  (Re-)register |
|  H  Hold call                |  s  Subscribe presence   | ru  Unregister    |
|  v  re-inVite (release hold) |  u  Unsubscribe presence |  >  Cycle next ac.|
|  ]  Select next dialog       |  t  ToGgle Online status |  <  Cycle prev ac.|
|  [  Select previous dialog   +--------------------------+-------------------+
|  x  Xfer call                |      Media Commands:     |  Status & Config: |
|  X  Xfer with Replaces       |                          |                   |
|  #  Send DTMF string         | cl  List ports           |  d  Dump status   |
| dq  Dump curr. call quality  | cc  Connect port         | dd  Dump detailed |
|                              | cd  Disconnect port      | dc  Dump config   |
|  S  Send arbitrary REQUEST   |  V  Adjust audio Volume  |  f  Save config   |
+------------------------------+--------------------------+-------------------+
|  q  QUIT                  sleep N: console sleep for N ms                   |
+=============================================================================+
You have 0 active call
>>> q
 23:16:21.294   pjsua_core.c Shutting down...
 23:16:22.315  pjsua_media.c Closing null sound device..
 23:16:22.426      pasound.c PortAudio sound library shutting down..
 23:16:22.426      pasound.c PortAudio sound library shutting down..
 23:16:22.426 sip_endpoint.c Module "mod-pjsua-options" unregistered
 23:16:22.426 sip_endpoint.c Module "mod-pjsua-im" unregistered
 23:16:22.426 sip_endpoint.c Module "mod-pjsua-pres" unregistered
 23:16:22.426 sip_endpoint.c Module "mod-pjsua" unregistered
 23:16:22.426 sip_endpoint.c Module "mod-stateful-util" unregistered
 23:16:22.426 sip_endpoint.c Module "mod-refer" unregistered
 23:16:22.426 sip_endpoint.c Module "mod-presence" unregistered
 23:16:22.426 sip_endpoint.c Module "mod-evsub" unregistered
 23:16:22.426 sip_endpoint.c Module "mod-invite" unregistered
 23:16:22.426 sip_endpoint.c Module "mod-ua" unregistered
 23:16:22.426 sip_transactio Stopping transaction layer module
 23:16:22.426 sip_transactio Transaction layer module destroyed
 23:16:22.426 sip_endpoint.c Module "mod-tsx-layer" unregistered
 23:16:22.426 sip_endpoint.c Module "mod-msg-print" unregistered
 23:16:22.446 sip_endpoint.c Module "mod-pjsua-log" unregistered
 23:16:22.446    tcplis:5060 SIP TCP listener destroyed
 23:16:22.446 sip_endpoint.c Endpoint 00A2634C destroyed
 23:16:22.446   pjsua_core.c PJSUA destroyed...

D:\ToCompile\pjproject-0.5.10.4\pjsip-apps\bin>


Code:

D:\ToCompile\pjproject-0.5.10.4\pjsip-apps\bin>pjsua_vc6d.exe --id=sip:601@192.1
68.69.8 --registrar=sip:192.168.69.8 --local-port=5060 --no-udp --username=601 -
-password=""  --null-audio --auto-loop
 23:18:43.375 os_core_win32. pjlib 0.5.10.4 for win32 initialized
 23:18:43.576 sip_endpoint.c Creating endpoint instance...
 23:18:43.806          pjlib select() I/O Queue created (00A27324)
 23:18:43.806 sip_endpoint.c Module "mod-msg-print" registered
 23:18:43.816 sip_transport. Transport manager created.
 23:18:43.816 sip_endpoint.c Module "mod-pjsua-log" registered
 23:18:43.816 sip_endpoint.c Module "mod-tsx-layer" registered
 23:18:43.816 sip_endpoint.c Module "mod-stateful-util" registered
 23:18:43.816 sip_endpoint.c Module "mod-ua" registered
 23:18:43.816 sip_endpoint.c Module "mod-pjsua" registered
 23:18:43.816 sip_endpoint.c Module "mod-invite" registered
 23:18:49.985      pasound.c PortAudio sound library initialized, status=0
 23:18:50.015      pasound.c PortAudio host api count=3
 23:18:50.015      pasound.c Sound device count=16
 23:18:50.015          pjlib select() I/O Queue created (00F0D284)
 23:18:50.025 sip_endpoint.c Module "mod-evsub" registered
 23:18:50.025 sip_endpoint.c Module "mod-presence" registered
 23:18:50.025 sip_endpoint.c Module "mod-refer" registered
 23:18:50.025 sip_endpoint.c Module "mod-pjsua-pres" registered
 23:18:50.025 sip_endpoint.c Module "mod-pjsua-im" registered
 23:18:50.035 sip_endpoint.c Module "mod-pjsua-options" registered
 23:18:50.035   pjsua_core.c 1 SIP worker threads created
 23:18:50.035   pjsua_core.c pjsua version 0.5.10.4 for win32 initialized
 23:18:50.065    tcplis:5060 SIP TCP listener ready for incoming connections at
192.168.69.31:5060
 23:18:50.065    pjsua_acc.c Account <sip:192.168.69.31:5060;transport=TCP> adde
d with id 0
 23:18:50.065    pjsua_acc.c Account sip:601@192.168.69.8 added with id 1
 23:18:50.065    tsx00F2A244 Failed to send Request msg REGISTER/cseq=31794 (tdt
a00F2920C)! err=171060 (Unsupported transport (PJSIP_EUNSUPTRANSPORT))
 23:18:50.085    pjsua_acc.c SIP registration failed, status=503 (Service Unavai
lable)
 23:18:50.085     sip_regc.c Error sending request, status=171060
 23:18:50.085    pjsua_acc.c Unable to create/send REGISTER: Unsupported transpo
rt (PJSIP_EUNSUPTRANSPORT) [status=171060]
 23:18:50.085  pjsua_media.c RTP socket reachable at 192.168.69.31:4000
 23:18:50.085  pjsua_media.c RTCP socket reachable at 192.168.69.31:4001
 23:18:50.095  pjsua_media.c RTP socket reachable at 192.168.69.31:4002
 23:18:50.095  pjsua_media.c RTCP socket reachable at 192.168.69.31:4003
 23:18:50.095  pjsua_media.c RTP socket reachable at 192.168.69.31:4004
 23:18:50.095  pjsua_media.c RTCP socket reachable at 192.168.69.31:4005
 23:18:50.105  pjsua_media.c RTP socket reachable at 192.168.69.31:4006
 23:18:50.105  pjsua_media.c RTCP socket reachable at 192.168.69.31:4007
 23:18:50.105  pjsua_media.c Opening null sound device..
>>>>
Account list:
  [ 0] <sip:192.168.69.31:5060;transport=TCP>: does not register
       Online status: Online
 *[ 1] sip:601@192.168.69.8: 503/Service Unavailable (expires=-1)
       Online status: Online
Buddy list:
 -none-

+=============================================================================+
|       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              | !b  Modify buddy         | !a  Modify accnt. |
|  h  Hangup call  (ha=all)    |  i  Send IM              | rr  (Re-)register |
|  H  Hold call                |  s  Subscribe presence   | ru  Unregister    |
|  v  re-inVite (release hold) |  u  Unsubscribe presence |  >  Cycle next ac.|
|  ]  Select next dialog       |  t  ToGgle Online status |  <  Cycle prev ac.|
|  [  Select previous dialog   +--------------------------+-------------------+
|  x  Xfer call                |      Media Commands:     |  Status & Config: |
|  X  Xfer with Replaces       |                          |                   |
|  #  Send DTMF string         | cl  List ports           |  d  Dump status   |
| dq  Dump curr. call quality  | cc  Connect port         | dd  Dump detailed |
|                              | cd  Disconnect port      | dc  Dump config   |
|  S  Send arbitrary REQUEST   |  V  Adjust audio Volume  |  f  Save config   |
+------------------------------+--------------------------+-------------------+
|  q  QUIT                  sleep N: console sleep for N ms                   |
+=============================================================================+
You have 0 active call
>>> q
 23:19:10.684   pjsua_core.c Shutting down...
 23:19:11.696  pjsua_media.c Closing null sound device..
 23:19:11.696      pasound.c PortAudio sound library shutting down..
 23:19:11.706      pasound.c PortAudio sound library shutting down..
 23:19:11.716 sip_endpoint.c Module "mod-pjsua-options" unregistered
 23:19:11.716 sip_endpoint.c Module "mod-pjsua-im" unregistered
 23:19:11.726 sip_endpoint.c Module "mod-pjsua-pres" unregistered
 23:19:11.736 sip_endpoint.c Module "mod-pjsua" unregistered
 23:19:11.736 sip_endpoint.c Module "mod-stateful-util" unregistered
 23:19:11.746 sip_endpoint.c Module "mod-refer" unregistered
 23:19:11.756 sip_endpoint.c Module "mod-presence" unregistered
 23:19:11.756 sip_endpoint.c Module "mod-evsub" unregistered
 23:19:11.766 sip_endpoint.c Module "mod-invite" unregistered
 23:19:11.776 sip_endpoint.c Module "mod-ua" unregistered
 23:19:11.776 sip_transactio Stopping transaction layer module
 23:19:11.796 sip_transactio Transaction layer module destroyed
 23:19:11.806 sip_endpoint.c Module "mod-tsx-layer" unregistered
 23:19:11.806 sip_endpoint.c Module "mod-msg-print" unregistered
 23:19:11.816 sip_endpoint.c Module "mod-pjsua-log" unregistered
 23:19:11.846    tcplis:5060 SIP TCP listener destroyed
 23:19:12.146 sip_endpoint.c Endpoint 00A2633C destroyed
 23:19:12.146   pjsua_core.c PJSUA destroyed...

D:\ToCompile\pjproject-0.5.10.4\pjsip-apps\bin>
View user's profile Send private message
x-consoleOffline
Site Admin


Joined: Aug 01, 2006
Posts: 1503
Location: Leeds UK
Status: Offline
Posted: May 11, 2008 - 12:26 PM Reply with quote Back to top
Quote:
23:14:51.667 tsx00F2A244 Failed to send Request msg REGISTER/cseq=5202 (tdta
00F2920C)! err=171060 (Unsupported transport (PJSIP_EUNSUPTRANSPORT))
23:18:50.085 pjsua_acc.c SIP registration failed, status=503 (Service Unavai
lable)
23:18:50.085 sip_regc.c Error sending request, status=171060
23:18:50.085 pjsua_acc.c Unable to create/send REGISTER: Unsupported transpo
rt (PJSIP_EUNSUPTRANSPORT) [status=171060]


it wont sent the message because the transport is not supported. try using UDP instead. Does the user you launced the app with have sufficient system privileges to open a tcp socket connection?

tip: ALWAYS have a packet trace running at the same time when doing this kind of thing. It tells you the answer (in this case, you would have seen no packets, thus you would have known there was a problem with your application config)
View user's profile Send private message Yahoo Messenger
vniqaOffline



Joined: May 09, 2008
Posts: 7

Status: Offline
Posted: May 12, 2008 - 10:04 PM Reply with quote Back to top
Thanks, I am able to register successfully now. But can't make & answer calls. Looks like I have more investigating to do.
View user's profile Send private message
oerten25Offline



Joined: May 20, 2008
Posts: 1

Status: Offline
Posted: May 20, 2008 - 09:19 PM Reply with quote Back to top
hi, i am also new to this and i want to make some calls.
i searched out for some useful information but couldn`t figure out how to make calls.
Is there a step by step tutorial for doing this. And what is this registering all about? Do we need to register? What are we registering for and where are we registering?
Any help will be appreciated very much
Regards
View user's profile Send private message
vniqaOffline



Joined: May 09, 2008
Posts: 7

Status: Offline
Posted: May 20, 2008 - 10:04 PM Reply with quote Back to top
oerten25 :
hi, i am also new to this and i want to make some calls.
i searched out for some useful information but couldn`t figure out how to make calls.
Is there a step by step tutorial for doing this. And what is this registering all about? Do we need to register? What are we registering for and where are we registering?
Any help will be appreciated very much
Regards


From my experience with SIP testing & usage, you do not need to register for making calls. But you do need it for receiving calls (routed from SIP server/registrar). You may be ok for answering peer-to-peer SIP calls but I'm not sure, never did that kind of setup before.

For making calls, you just need to know the SIP destination like destination@HostOrIpAddress and the call is made as sip:destination@HostOrIpAddress.

Sure would be nice if someone did put together a dummies guide on how to use PJSUA. Demo video would be nice too. This way, any idiot tester can use the tool to test basic SIP operation. Yes, it helps to know SIP protocol and such, but the simpler the tool, the less prep time needed to make use of it. After all, you don't need to know much about the workings of SIP to use the X-Lite softphone. Don't see why PJSUA can't be "tutorialized" to be as simple to use as X-Lite.
View user's profile Send private message
ismangilOffline



Joined: May 22, 2008
Posts: 1

Status: Offline
Posted: May 22, 2008 - 11:56 AM Reply with quote Back to top
vniqa :

Sure would be nice if someone did put together a dummies guide on how to use PJSUA. Demo video would be nice too. This way, any idiot tester can use the tool to test basic SIP operation. Yes, it helps to know SIP protocol and such, but the simpler the tool, the less prep time needed to make use of it. After all, you don't need to know much about the workings of SIP to use the X-Lite softphone. Don't see why PJSUA can't be "tutorialized" to be as simple to use as X-Lite.


Hi, thanks for taking the time to use pjsua. I agree more documentation is always better.

You seemed to be using 0.5.x version which is very old. The latest release was 0.8. Or even better use the svn version, as many bugfixes has happened since then.

For the short tutorial on pjsua, for now we have the following, taken from http://www.pjsip.org/pjsua.htm#basic :

Basic Peer-to-Peer

The easiest way to use pjsua is to use it in serverless configuration, to call or receive calls from other SIP user agents directly.

This command below will initiate outgoing call to some SIP URL:

Code:
$ ./pjsua sip:192.168.0.10


Also, we have a mailing list (http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org) which you can ask these sort of questions.

Thank you again, we always welcome feedback from all users.

--
Perry Ismangil
http://www.pjsip.org
View user's profile Send private message


View previous topic Printable version Log in to check your private messages View next topic

Post new topic   Reply to topic
Forum Rules and Guidelines | About VoIP User | Privacy Policy


All logos and trademarks in this site are property of their respective owner.
Comments and posts are property of the poster, all the rest (c) 2003-2008 VoIP User Limited.

VoIP User Limited is incorporated in England and Wales under Company Number 6694577.

No part of this site may be reproduced without our prior consent.