Programmatically make and receive calls using PJSIP via a PBX?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2016-02-19 05:48, Sonny Rajagopalan wrote:
> Hello,
>
> I am trying to use the PJSUA binary to register with a SIP PBX (that 
> uses SIP over TCP), and I try this (compiled correctly in Linux 3.x/64 
> bit):
>
> ${pjproject-2.4.5-home}/pjsip-apps/bin$ 
> ./pjsua-x86_64-unknown-linux-gnu --id 
> sip:extension@<PublicIPAddressOFPBX> --registrar 
> sip:<PublicIPAddressOFPBX>;transport=tcp --realm * --username silly 
> --password sillerpassword

Don't forget to escape the ";" and "*" characters, otherwise your shell 
will do something unexpected.

> I pointed to another PBX which does UDP based SIP and then tried this:
>
> ${pjproject-2.4.5-home}/pjsip-apps/bin$ 
> ./pjsua-x86_64-unknown-linux-gnu --id 
> sip:extension@<PublicIPAddressOfUDPPBX> --registrar 
> sip:<PublicIPAddressOfUDPPBX> --realm * --username silly --password 
> sillerpassword
>
> Which doesn't work due to
>
> pjsua_app_conf  Invalid SIP URI pjsystest-x86_64-unknown-linux-gnu
>
> In this case, however, no pretty ASCII prompt, and my pjsua program 
> exits out completely.
>
> Can someone tell me what I am doing wrong? I am using the instructions 
> in http://www.pjsip.org/pjsua.htm
>

I use these arguments and it works well for me:
--id sip:<user>@<server> --registrar sip:<server> --username <user> 
--password <password> --realm *

>
> Is there a less clunkier way of doing all of this? The pjsua app 
> certainly looks broken to me. Is it? If so, are there any alternatives?
>

You could use the --config-file argument and save all your arguments to 
a text file.
Its contents could be something like:
--log-level 5
--app-log-level 4
--local-port 5601
--id sip:01 at example.com
--registrar sip:example.com;transport=tcp
--username 01
--password secret
--realm *
--video
--auto-answer 500

You get the idea.




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux