How to use pjsua to make a phone call?

AB
alain.bonnefoy@ponant-technologies.com
Thu, Nov 29, 2018 3:23 PM

Hello,

I try to use pjsua to call a phone number a play a wav file.

I looked at this
tuto(http://aminastaneh.net/2012-05-06/fun-with-command-line-sip.html) which
seems to do it successfully, but with a quite old version.

If I try to do like this tuto, I cannot register to my sip account.

Here is the command I use:

./pjsua --config-file ./pjsua_config sip:0033661nnnnnn@sip3.ovh.fr

The config file is:

            --id sip:0033972nnnnnnnn@sip3.ovh.fr

            --registrar sip:sip3.ovh.fr

            --username 0033972nnnnnnnn

            --password myPasswd

            --realm *

            --null-audio

            --auto-play

            --play-file ./test.wav

and the result is:

            16:00:26.844         os_core_unix.c !pjlib 2.8 for POSIX

initialized

            16:00:26.845         sip_endpoint.c  .Creating endpoint

instance...

            16:00:26.845                  pjlib  .select() I/O Queue

created (0x55ffcb0d37f0)

            16:00:26.845         sip_endpoint.c  .Module "mod-msg-print"

registered

            16:00:26.845        sip_transport.c  .Transport manager

created.

            16:00:26.845           pjsua_core.c  .PJSUA state changed:

NULL --> CREATED

            16:00:26.845         sip_endpoint.c  .Module "mod-pjsua-log"

registered

            16:00:26.845         sip_endpoint.c  .Module "mod-tsx-layer"

registered

            16:00:26.845         sip_endpoint.c  .Module

"mod-stateful-util" registered

            16:00:26.845         sip_endpoint.c  .Module "mod-ua"

registered

            16:00:26.845         sip_endpoint.c  .Module "mod-100rel"

registered

            16:00:26.845         sip_endpoint.c  .Module "mod-pjsua"

registered

            16:00:26.846         sip_endpoint.c  .Module "mod-invite"

registered

            16:00:26.938             alsa_dev.c  ..ALSA driver found 32

devices

            16:00:26.938             alsa_dev.c  ..ALSA initialized

            16:00:26.939                  pjlib  ..select() I/O Queue

created (0x55ffcb0ed158)

            16:00:26.941         sip_endpoint.c  .Module "mod-evsub"

registered

            16:00:26.941         sip_endpoint.c  .Module "mod-presence"

registered

            16:00:26.941         sip_endpoint.c  .Module "mod-mwi"

registered

            16:00:26.941         sip_endpoint.c  .Module "mod-refer"

registered

            16:00:26.941         sip_endpoint.c  .Module

"mod-pjsua-pres" registered

            16:00:26.941         sip_endpoint.c  .Module "mod-pjsua-im"

registered

            16:00:26.941         sip_endpoint.c  .Module

"mod-pjsua-options" registered

            16:00:26.941           pjsua_core.c  .1 SIP worker threads

created

            16:00:26.941           pjsua_core.c  .pjsua version 2.8 for

Linux-4.15.0.39/x86_64/glibc-2.27 initialized

            16:00:26.941           pjsua_core.c  .PJSUA state changed:

CREATED --> INIT

            16:00:26.941         sip_endpoint.c  Module

"mod-default-handler" registered

            16:00:26.941            pjsua_aud.c  Creating file player:

./test.wav..

            16:00:26.941           wav_player.c  .File player

'./test.wav' created: samp.rate=16000, ch=1, bufsize=4KB, filesize=163KB

            16:00:26.941            pjsua_aud.c  .Player created, id=0,

slot=1

            16:00:26.941           pjsua_core.c  SIP UDP socket

reachable at 192.168.105.26:5060

            16:00:26.941      udp0x55ffcb14bd90  SIP UDP transport

started, published address is 192.168.105.26:5060

            16:00:26.942            pjsua_acc.c  Adding account:

id=sip:192.168.105.26:5060

            16:00:26.942            pjsua_acc.c  .Account

sip:192.168.105.26:5060 added with id 0

            16:00:26.942            pjsua_acc.c  Modifying account 0

            16:00:26.942            pjsua_acc.c  Acc 0: setting online

status to 1..

            16:00:26.942            pjsua_acc.c  Adding account:

id=sip:0033972617378@sip3.ovh.fr

            16:00:26.942            pjsua_acc.c  .Account

sip:0033972617378@sip3.ovh.fr added with id 1

            16:00:26.942            pjsua_acc.c  .Acc 1: setting

registration..

            16:00:26.942           pjsua_core.c  ...TX 568 bytes Request

msg REGISTER/cseq=20718 (tdta0x55ffcb151698) to UDP 91.121.129.159:5060:

            REGISTER sip:sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP

192.168.105.26:5060;rport;branch=z9hG4bKPjwZ0eQlyjNoDdLg6UG-Osr8gZFdkQ05JL

            Max-Forwards: 70

            From:

sip:0033972617378@sip3.ovh.fr;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To: <sip:0033972617378@sip3.ovh.fr>

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            CSeq: 20718 REGISTER

            User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

            Contact: <sip:0033972617378@192.168.105.26:5060;ob>

            Expires: 300

            Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO,

SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

            Content-Length:  0





            --end msg--

            16:00:26.942            pjsua_acc.c  ..Acc 1: Registration

sent

            16:00:26.942            pjsua_acc.c  Acc 1: setting online

status to 1..

            16:00:26.942           pjsua_pres.c  Adding buddy:

sip:0033661940377@sip3.ovh.fr

            16:00:26.942           pjsua_pres.c  .Buddy 0 added.

            16:00:26.942           pjsua_pres.c  ..Buddy 0: updating

presence..

            16:00:26.942            pjsua_aud.c  Setting null sound

device..

            16:00:26.942            pjsua_app.c  .Turning sound device

-99 -99 ON

            16:00:26.942            pjsua_aud.c  .Opening null sound

device..

            16:00:26.942           pjsua_core.c  PJSUA state changed:

INIT --> STARTING

            16:00:26.942         sip_endpoint.c  .Module

"mod-unsolicited-mwi" registered

            16:00:26.942           pjsua_core.c  .PJSUA state changed:

STARTING --> RUNNING

            16:00:26.942                 main.c  Ready: Success

            16:00:26.942           pjsua_call.c  Making call with acc #1

to sip:0033661940377@sip3.ovh.fr

            16:00:26.942          pjsua_media.c  .Call 0: initializing

media..

            16:00:26.942          pjsua_media.c  ..RTP socket reachable

at 192.168.105.26:4000

            16:00:26.942          pjsua_media.c  ..RTCP socket reachable

at 192.168.105.26:4001

            16:00:26.942          pjsua_media.c  ..Media index 0

selected for audio call 0

            16:00:26.942           pjsua_core.c  ....TX 1198 bytes

Request msg INVITE/cseq=13359 (tdta0x55ffcb16b4a8) to UDP
91.121.129.159:5060:

            INVITE sip:0033661940377@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP

192.168.105.26:5060;rport;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc

            Max-Forwards: 70

            From:

sip:0033972617378@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY

            To: sip:0033661940377@sip3.ovh.fr

            Contact: <sip:0033972617378@192.168.105.26:5060;ob>

            Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO

            CSeq: 13359 INVITE

            Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO,

SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

            Supported: replaces, 100rel, timer, norefersub

            Session-Expires: 1800

            Min-SE: 90

            User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

            Content-Type: application/sdp

            Content-Length:   521



            v=0

            o=- 3752492426 3752492426 IN IP4 192.168.105.26

            s=pjmedia

            b=AS:84

            t=0 0

            a=X-nat:0

            m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 9 96

            c=IN IP4 192.168.105.26

            b=TIAS:64000

            a=rtcp:4001 IN IP4 192.168.105.26

            a=sendrecv

            a=rtpmap:98 speex/16000

            a=rtpmap:97 speex/8000

            a=rtpmap:99 speex/32000

            a=rtpmap:104 iLBC/8000

            a=fmtp:104 mode=30

            a=rtpmap:3 GSM/8000

            a=rtpmap:0 PCMU/8000

            a=rtpmap:8 PCMA/8000

            a=rtpmap:9 G722/8000

            a=rtpmap:96 telephone-event/8000

            a=fmtp:96 0-16

            a=ssrc:1011957511 cname:75cedd633ab5e97d



            --end msg--

            16:00:26.942            pjsua_app.c  .......Call 0 state

changed to CALLING

            Account list:

              [ 0] <sip:192.168.105.26:5060>: does not register

                   Online status: Online

            *[ 1] sip:0033972617378@sip3.ovh.fr: 100/In Progress

(expires=0)

                   Online status: Online

            Buddy list:

            [ 1] <?>  sip:0033661940377@sip3.ovh.fr

---=========
==+

            |       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     |

|

+---------------------------------------------------------------------------
--+

            |  q  QUIT   L  ReLoad   sleep MS   echo [0|1|txt]     n:

detect NAT type    |


---=========
==+

            You have 1 active call

            Current call id=0 to sip:0033661940377@sip3.ovh.fr [CALLING]

16:00:26.966          pjsua_core.c  .RX 341 bytes

Response msg 100/REGISTER/cseq=20718 (rdata0x55ffcb14d818) from UDP
91.121.129.159:5060:

            SIP/2.0 100 Trying

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            CSeq: 20718 REGISTER

            From:

sip:0033972617378@sip3.ovh.fr;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To: <sip:0033972617378@sip3.ovh.fr>

            Via: SIP/2.0/UDP

192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjwZ0eQ
lyjNoDdLg6UG-Osr8gZFdkQ05JL

            Content-Length: 0





            --end msg--

            16:00:26.966           pjsua_core.c  .RX 339 bytes Response

msg 100/INVITE/cseq=13359 (rdata0x7f414c009ae8) from UDP
91.121.129.159:5060:

            SIP/2.0 100 Trying

            Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO

            CSeq: 13359 INVITE

            From:

sip:0033972617378@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY

            To: <sip:0033661940377@sip3.ovh.fr>

            Via: SIP/2.0/UDP

192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjM2z7W
8MLQLAIH9yQkxNQUMwAYogM9rwc

            Content-Length: 0





            --end msg--

            16:00:26.966           pjsua_core.c  .RX 379 bytes Response

msg 403/INVITE/cseq=13359 (rdata0x7f414c009ae8) from UDP
91.121.129.159:5060:

            SIP/2.0 403 not registered

            Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO

            CSeq: 13359 INVITE

            From:

sip:0033972617378@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY

            To:

sip:0033661940377@sip3.ovh.fr;tag=02-22581-7130a9fb-6f8a0a441

            Via: SIP/2.0/UDP

192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjM2z7W
8MLQLAIH9yQkxNQUMwAYogM9rwc

            Content-Length: 0





            --end msg--

            16:00:26.966           pjsua_core.c  ..TX 377 bytes Request

msg ACK/cseq=13359 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060:

            ACK sip:0033661940377@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP

192.168.105.26:5060;rport;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc

            Max-Forwards: 70

            From:

sip:0033972617378@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY

            To:

sip:0033661940377@sip3.ovh.fr;tag=02-22581-7130a9fb-6f8a0a441

            Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO

            CSeq: 13359 ACK

            Content-Length:  0





            --end msg--

            16:00:26.967            pjsua_app.c  .....Call 0 is

DISCONNECTED [reason=403 (not registered)]

            16:00:26.967     pjsua_app_common.c  .....

              [DISCONNCTD] To: sip:0033661940377@sip3.ovh.fr

                Call time: 00h:00m:00s, 1st res in 25 ms, conn in 0ms

            16:00:26.967          pjsua_media.c  .....Call 0:

deinitializing media..

            16:00:26.967          pjsua_media.c  ......Call 0: cleaning

up provisional media, prov_med_cnt=1, med_cnt=0

            16:00:26.969           pjsua_core.c  .RX 549 bytes Response

msg 401/REGISTER/cseq=20718 (rdata0x7f414c009ae8) from UDP
91.121.129.159:5060:

            SIP/2.0 401 Unauthorized

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            CSeq: 20718 REGISTER

            From:

sip:0033972617378@sip3.ovh.fr;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To:

sip:0033972617378@sip3.ovh.fr;tag=00-07686-08f654bc-4d18b7a46

            Via: SIP/2.0/UDP

192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjwZ0eQ
lyjNoDdLg6UG-Osr8gZFdkQ05JL

            WWW-Authenticate: Digest

realm="sip3.ovh.fr",nonce="08f64a24258ffbd7790be25e506a8b45",opaque="08f232d
d5578250",stale=false,algorithm=MD5

            Server: Cirpack/v4.76 (gw_sip)

            Content-Length: 0





            --end msg--

            16:00:26.970           pjsua_core.c  ....TX 788 bytes

Request msg REGISTER/cseq=20719 (tdta0x55ffcb151698) to UDP
91.121.129.159:5060:

            REGISTER sip:sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP

192.168.105.26:5060;rport;branch=z9hG4bKPjUpk6GULmUTzkGVjYXebYbqOKZo3mjF83

            Max-Forwards: 70

            From:

sip:0033972617378@sip3.ovh.fr;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To: <sip:0033972617378@sip3.ovh.fr>

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            CSeq: 20719 REGISTER

            User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

            Contact: <sip:0033972617378@192.168.105.26:5060;ob>

            Expires: 300

            Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO,

SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

            Authorization: Digest username="0033972617378",

realm="sip3.ovh.fr", nonce="08f64a24258ffbd7790be25e506a8b45",
uri="sip:sip3.ovh.fr", response="1aa4dc5667db77e63ab8d15817a95474",
algorithm=MD5, opaque="08f232dd5578250"

            Content-Length:  0





            --end msg--

            16:00:26.993           pjsua_core.c  .RX 341 bytes Response

msg 100/REGISTER/cseq=20719 (rdata0x7f414c009ae8) from UDP
91.121.129.159:5060:

            SIP/2.0 100 Trying

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            CSeq: 20719 REGISTER

            From:

sip:0033972617378@sip3.ovh.fr;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To: <sip:0033972617378@sip3.ovh.fr>

            Via: SIP/2.0/UDP

192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjUpk6G
ULmUTzkGVjYXebYbqOKZo3mjF83

            Content-Length: 0





            --end msg--

            16:00:27.045           pjsua_core.c  .RX 514 bytes Response

msg 200/REGISTER/cseq=20719 (rdata0x7f414c009ae8) from UDP
91.121.129.159:5060:

            SIP/2.0 200 OK

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            Contact:

sip:0033972617378@192.168.105.26:5060;ob;expires=300

            CSeq: 20719 REGISTER

            From:

sip:0033972617378@sip3.ovh.fr;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To:

sip:0033972617378@sip3.ovh.fr;tag=00-07755-08f654c7-0470b8783

            Via: SIP/2.0/UDP

192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjUpk6G
ULmUTzkGVjYXebYbqOKZo3mjF83

            P-Associated-URI: <sip:0972617378@sip3.ovh.fr>

            Server: Cirpack/v4.76 (gw_sip)

            Content-Length: 0





            --end msg--

            16:00:27.045            pjsua_acc.c  ....SIP outbound status

for acc 1 is not active

            16:00:27.045            pjsua_acc.c

....sip:0033972617378@sip3.ovh.fr: registration success, status=200 (OK),
will re-register in 300 seconds

            16:00:27.045            pjsua_acc.c  ....Keep-alive timer

started for acc 1, destination:91.121.129.159:5060:15, interval:0s

            16:00:27.942            pjsua_aud.c  Closing sound device

after idle for 1 second(s)

            16:00:27.942            pjsua_app.c  .Turning sound device

-99 -99 OFF

            16:00:27.942            pjsua_aud.c  .Closing null sound

device..

I fact I wonder if pjsua takes care to register before calling the given
URI.

So to make another test, once in pjsua I hit m, and enter
sip:0033661nnnnnn@sip3.ovh.fr, and I get the following result:

            16:03:31.129           pjsua_call.c !Making call with acc #1

to sip:0033661nnnnnn@sip3.ovh.fr

            16:03:31.129            pjsua_aud.c  .Set sound device:

capture=-99, playback=-99

            16:03:31.129            pjsua_aud.c  ..Setting null sound

device..

            16:03:31.129            pjsua_app.c  ...Turning sound device

-99 -99 ON

            16:03:31.129            pjsua_aud.c  ...Opening null sound

device..

            16:03:31.129          pjsua_media.c  .Call 2: initializing

media..

            16:03:31.129          pjsua_media.c  ..RTP socket reachable

at 192.168.105.26:4002

            16:03:31.129          pjsua_media.c  ..RTCP socket reachable

at 192.168.105.26:4003

            16:03:31.129          pjsua_media.c  ..Media index 0

selected for audio call 2

            16:03:31.130           pjsua_core.c  ....TX 1197 bytes

Request msg INVITE/cseq=25951 (tdta0x55ffcb14daa8) to UDP
91.121.129.159:5060:

            INVITE sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP

192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Max-Forwards: 70

            From:

sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To: sip:0033661nnnnnn@sip3.ovh.fr

            Contact: <sip:0033972nnnnnn@192.168.105.26:5060;ob>

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO,

SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

            Supported: replaces, 100rel, timer, norefersub

            Session-Expires: 1800

            Min-SE: 90

            User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

            Content-Type: application/sdp

            Content-Length:   520



            v=0

            o=- 3752492611 3752492611 IN IP4 192.168.105.26

            s=pjmedia

            b=AS:84

            t=0 0

            a=X-nat:0

            m=audio 4002 RTP/AVP 98 97 99 104 3 0 8 9 96

            c=IN IP4 192.168.105.26

            b=TIAS:64000

            a=rtcp:4003 IN IP4 192.168.105.26

            a=sendrecv

            a=rtpmap:98 speex/16000

            a=rtpmap:97 speex/8000

            a=rtpmap:99 speex/32000

            a=rtpmap:104 iLBC/8000

            a=fmtp:104 mode=30

            a=rtpmap:3 GSM/8000

            a=rtpmap:0 PCMU/8000

            a=rtpmap:8 PCMA/8000

            a=rtpmap:9 G722/8000

            a=rtpmap:96 telephone-event/8000

            a=fmtp:96 0-16

            a=ssrc:281817610 cname:6551173f0b0e5f0f



            --end msg--

            16:03:31.130            pjsua_app.c  .......Call 2 state

changed to CALLING

16:03:31.155          pjsua_core.c  .RX 339 bytes

Response msg 100/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP
91.121.129.159:5060:

            SIP/2.0 100 Trying

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            From:

sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To: <sip:0033661nnnnnn@sip3.ovh.fr>

            Via: SIP/2.0/UDP

192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSa
SErQ5cB3NwXli7DykVXR4Yf.qa8

            Content-Length: 0





            --end msg--

            16:03:31.155           pjsua_core.c  .RX 379 bytes Response

msg 403/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP
91.121.129.159:5060:

            SIP/2.0 403 not registered

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            From:

sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To:

sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1

            Via: SIP/2.0/UDP

192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSa
SErQ5cB3NwXli7DykVXR4Yf.qa8

            Content-Length: 0





            --end msg--

            16:03:31.155           pjsua_core.c  ..TX 377 bytes Request

msg ACK/cseq=25951 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060:

            ACK sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP

192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Max-Forwards: 70

            From:

sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To:

sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 ACK

            Content-Length:  0





            --end msg--

            16:03:31.155            pjsua_app.c  .....Call 2 is

DISCONNECTED [reason=403 (not registered)]

            16:03:31.155     pjsua_app_common.c  .....

              [DISCONNCTD] To: sip:0033661nnnnnn@sip3.ovh.fr

                Call time: 00h:00m:00s, 1st res in 26 ms, conn in 0ms

            16:03:31.155          pjsua_media.c  .....Call 2:

deinitializing media..

            16:03:31.155          pjsua_media.c  ......Call 2: cleaning

up provisional media, prov_med_cnt=1, med_cnt=0

            16:03:32.156            pjsua_aud.c  Closing sound device

after idle for 1 second(s)

            16:03:32.156            pjsua_app.c  .Turning sound device

-99 -99 OFF

            16:03:32.156            pjsua_aud.c  .Closing null sound

device..

                           16:03:31.129           pjsua_call.c !Making

call with acc #1 to sip:00336619nnnnnn@sip3.ovh.fr

            16:03:31.129            pjsua_aud.c  .Set sound device:

capture=-99, playback=-99

            16:03:31.129            pjsua_aud.c  ..Setting null sound

device..

            16:03:31.129            pjsua_app.c  ...Turning sound device

-99 -99 ON

            16:03:31.129            pjsua_aud.c  ...Opening null sound

device..

            16:03:31.129          pjsua_media.c  .Call 2: initializing

media..

            16:03:31.129          pjsua_media.c  ..RTP socket reachable

at 192.168.105.26:4002

            16:03:31.129          pjsua_media.c  ..RTCP socket reachable

at 192.168.105.26:4003

            16:03:31.129          pjsua_media.c  ..Media index 0

selected for audio call 2

            16:03:31.130           pjsua_core.c  ....TX 1197 bytes

Request msg INVITE/cseq=25951 (tdta0x55ffcb14daa8) to UDP
91.121.129.159:5060:

            INVITE sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP

192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Max-Forwards: 70

            From:

sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To: sip:0033661nnnnnn@sip3.ovh.fr

            Contact: <sip:0033972nnnnnn@192.168.105.26:5060;ob>

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO,

SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

            Supported: replaces, 100rel, timer, norefersub

            Session-Expires: 1800

            Min-SE: 90

            User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

            Content-Type: application/sdp

            Content-Length:   520



            v=0

            o=- 3752492611 3752492611 IN IP4 192.168.105.26

            s=pjmedia

            b=AS:84

            t=0 0

            a=X-nat:0

            m=audio 4002 RTP/AVP 98 97 99 104 3 0 8 9 96

            c=IN IP4 192.168.105.26

            b=TIAS:64000

            a=rtcp:4003 IN IP4 192.168.105.26

            a=sendrecv

            a=rtpmap:98 speex/16000

            a=rtpmap:97 speex/8000

            a=rtpmap:99 speex/32000

            a=rtpmap:104 iLBC/8000

            a=fmtp:104 mode=30

            a=rtpmap:3 GSM/8000

            a=rtpmap:0 PCMU/8000

            a=rtpmap:8 PCMA/8000

            a=rtpmap:9 G722/8000

            a=rtpmap:96 telephone-event/8000

            a=fmtp:96 0-16

            a=ssrc:281817610 cname:6551173f0b0e5f0f



            --end msg--

            16:03:31.130            pjsua_app.c  .......Call 2 state

changed to CALLING

16:03:31.155          pjsua_core.c  .RX 339 bytes

Response msg 100/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP
91.121.129.159:5060:

            SIP/2.0 100 Trying

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            From:

sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To: <sip:0033661nnnnnn@sip3.ovh.fr>

            Via: SIP/2.0/UDP

192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSa
SErQ5cB3NwXli7DykVXR4Yf.qa8

            Content-Length: 0





            --end msg--

            16:03:31.155           pjsua_core.c  .RX 379 bytes Response

msg 403/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP
91.121.129.159:5060:

            SIP/2.0 403 not registered

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            From:

sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To:

sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1

            Via: SIP/2.0/UDP

192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSa
SErQ5cB3NwXli7DykVXR4Yf.qa8

            Content-Length: 0





            --end msg--

            16:03:31.155           pjsua_core.c  ..TX 377 bytes Request

msg ACK/cseq=25951 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060:

            ACK sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP

192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Max-Forwards: 70

            From:

sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To:

sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 ACK

            Content-Length:  0





            --end msg--

            16:03:31.155            pjsua_app.c  .....Call 2 is

DISCONNECTED [reason=403 (not registered)]

            16:03:31.155     pjsua_app_common.c  .....

              [DISCONNCTD] To: sip:0033661nnnnnn@sip3.ovh.fr

                Call time: 00h:00m:00s, 1st res in 26 ms, conn in 0ms

            16:03:31.155          pjsua_media.c  .....Call 2:

deinitializing media..

            16:03:31.155          pjsua_media.c  ......Call 2: cleaning

up provisional media, prov_med_cnt=1, med_cnt=0

            16:03:32.156            pjsua_aud.c  Closing sound device

after idle for 1 second(s)

            16:03:32.156            pjsua_app.c  .Turning sound device

-99 -99 OFF

            16:03:32.156            pjsua_aud.c  .Closing null sound

device..

What is this Call 2 is DISCONNECTED [reason=403 (not registered)] message?

Could you tell me what's wrong?

Regards ,

Alain

Hello, I try to use pjsua to call a phone number a play a wav file. I looked at this tuto(http://aminastaneh.net/2012-05-06/fun-with-command-line-sip.html) which seems to do it successfully, but with a quite old version. If I try to do like this tuto, I cannot register to my sip account. Here is the command I use: ./pjsua --config-file ./pjsua_config sip:0033661nnnnnn@sip3.ovh.fr The config file is: --id sip:0033972nnnnnnnn@sip3.ovh.fr --registrar sip:sip3.ovh.fr --username 0033972nnnnnnnn --password myPasswd --realm * --null-audio --auto-play --play-file ./test.wav and the result is: 16:00:26.844 os_core_unix.c !pjlib 2.8 for POSIX initialized 16:00:26.845 sip_endpoint.c .Creating endpoint instance... 16:00:26.845 pjlib .select() I/O Queue created (0x55ffcb0d37f0) 16:00:26.845 sip_endpoint.c .Module "mod-msg-print" registered 16:00:26.845 sip_transport.c .Transport manager created. 16:00:26.845 pjsua_core.c .PJSUA state changed: NULL --> CREATED 16:00:26.845 sip_endpoint.c .Module "mod-pjsua-log" registered 16:00:26.845 sip_endpoint.c .Module "mod-tsx-layer" registered 16:00:26.845 sip_endpoint.c .Module "mod-stateful-util" registered 16:00:26.845 sip_endpoint.c .Module "mod-ua" registered 16:00:26.845 sip_endpoint.c .Module "mod-100rel" registered 16:00:26.845 sip_endpoint.c .Module "mod-pjsua" registered 16:00:26.846 sip_endpoint.c .Module "mod-invite" registered 16:00:26.938 alsa_dev.c ..ALSA driver found 32 devices 16:00:26.938 alsa_dev.c ..ALSA initialized 16:00:26.939 pjlib ..select() I/O Queue created (0x55ffcb0ed158) 16:00:26.941 sip_endpoint.c .Module "mod-evsub" registered 16:00:26.941 sip_endpoint.c .Module "mod-presence" registered 16:00:26.941 sip_endpoint.c .Module "mod-mwi" registered 16:00:26.941 sip_endpoint.c .Module "mod-refer" registered 16:00:26.941 sip_endpoint.c .Module "mod-pjsua-pres" registered 16:00:26.941 sip_endpoint.c .Module "mod-pjsua-im" registered 16:00:26.941 sip_endpoint.c .Module "mod-pjsua-options" registered 16:00:26.941 pjsua_core.c .1 SIP worker threads created 16:00:26.941 pjsua_core.c .pjsua version 2.8 for Linux-4.15.0.39/x86_64/glibc-2.27 initialized 16:00:26.941 pjsua_core.c .PJSUA state changed: CREATED --> INIT 16:00:26.941 sip_endpoint.c Module "mod-default-handler" registered 16:00:26.941 pjsua_aud.c Creating file player: ./test.wav.. 16:00:26.941 wav_player.c .File player './test.wav' created: samp.rate=16000, ch=1, bufsize=4KB, filesize=163KB 16:00:26.941 pjsua_aud.c .Player created, id=0, slot=1 16:00:26.941 pjsua_core.c SIP UDP socket reachable at 192.168.105.26:5060 16:00:26.941 udp0x55ffcb14bd90 SIP UDP transport started, published address is 192.168.105.26:5060 16:00:26.942 pjsua_acc.c Adding account: id=<sip:192.168.105.26:5060> 16:00:26.942 pjsua_acc.c .Account <sip:192.168.105.26:5060> added with id 0 16:00:26.942 pjsua_acc.c Modifying account 0 16:00:26.942 pjsua_acc.c Acc 0: setting online status to 1.. 16:00:26.942 pjsua_acc.c Adding account: id=sip:0033972617378@sip3.ovh.fr 16:00:26.942 pjsua_acc.c .Account sip:0033972617378@sip3.ovh.fr added with id 1 16:00:26.942 pjsua_acc.c .Acc 1: setting registration.. 16:00:26.942 pjsua_core.c ...TX 568 bytes Request msg REGISTER/cseq=20718 (tdta0x55ffcb151698) to UDP 91.121.129.159:5060: REGISTER sip:sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjwZ0eQlyjNoDdLg6UG-Osr8gZFdkQ05JL Max-Forwards: 70 From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: <sip:0033972617378@sip3.ovh.fr> Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV CSeq: 20718 REGISTER User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Contact: <sip:0033972617378@192.168.105.26:5060;ob> Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Content-Length: 0 --end msg-- 16:00:26.942 pjsua_acc.c ..Acc 1: Registration sent 16:00:26.942 pjsua_acc.c Acc 1: setting online status to 1.. 16:00:26.942 pjsua_pres.c Adding buddy: sip:0033661940377@sip3.ovh.fr 16:00:26.942 pjsua_pres.c .Buddy 0 added. 16:00:26.942 pjsua_pres.c ..Buddy 0: updating presence.. 16:00:26.942 pjsua_aud.c Setting null sound device.. 16:00:26.942 pjsua_app.c .Turning sound device -99 -99 ON 16:00:26.942 pjsua_aud.c .Opening null sound device.. 16:00:26.942 pjsua_core.c PJSUA state changed: INIT --> STARTING 16:00:26.942 sip_endpoint.c .Module "mod-unsolicited-mwi" registered 16:00:26.942 pjsua_core.c .PJSUA state changed: STARTING --> RUNNING 16:00:26.942 main.c Ready: Success 16:00:26.942 pjsua_call.c Making call with acc #1 to sip:0033661940377@sip3.ovh.fr 16:00:26.942 pjsua_media.c .Call 0: initializing media.. 16:00:26.942 pjsua_media.c ..RTP socket reachable at 192.168.105.26:4000 16:00:26.942 pjsua_media.c ..RTCP socket reachable at 192.168.105.26:4001 16:00:26.942 pjsua_media.c ..Media index 0 selected for audio call 0 16:00:26.942 pjsua_core.c ....TX 1198 bytes Request msg INVITE/cseq=13359 (tdta0x55ffcb16b4a8) to UDP 91.121.129.159:5060: INVITE sip:0033661940377@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc Max-Forwards: 70 From: sip:0033972617378@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY To: sip:0033661940377@sip3.ovh.fr Contact: <sip:0033972617378@192.168.105.26:5060;ob> Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO CSeq: 13359 INVITE Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Supported: replaces, 100rel, timer, norefersub Session-Expires: 1800 Min-SE: 90 User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Content-Type: application/sdp Content-Length: 521 v=0 o=- 3752492426 3752492426 IN IP4 192.168.105.26 s=pjmedia b=AS:84 t=0 0 a=X-nat:0 m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 9 96 c=IN IP4 192.168.105.26 b=TIAS:64000 a=rtcp:4001 IN IP4 192.168.105.26 a=sendrecv a=rtpmap:98 speex/16000 a=rtpmap:97 speex/8000 a=rtpmap:99 speex/32000 a=rtpmap:104 iLBC/8000 a=fmtp:104 mode=30 a=rtpmap:3 GSM/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:9 G722/8000 a=rtpmap:96 telephone-event/8000 a=fmtp:96 0-16 a=ssrc:1011957511 cname:75cedd633ab5e97d --end msg-- 16:00:26.942 pjsua_app.c .......Call 0 state changed to CALLING >>>> Account list: [ 0] <sip:192.168.105.26:5060>: does not register Online status: Online *[ 1] sip:0033972617378@sip3.ovh.fr: 100/In Progress (expires=0) Online status: Online Buddy list: [ 1] <?> sip:0033661940377@sip3.ovh.fr +=========================================================================== ==+ | 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 | | +--------------------------------------------------------------------------- --+ | q QUIT L ReLoad sleep MS echo [0|1|txt] n: detect NAT type | +=========================================================================== ==+ You have 1 active call Current call id=0 to sip:0033661940377@sip3.ovh.fr [CALLING] >>> 16:00:26.966 pjsua_core.c .RX 341 bytes Response msg 100/REGISTER/cseq=20718 (rdata0x55ffcb14d818) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV CSeq: 20718 REGISTER From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: <sip:0033972617378@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjwZ0eQ lyjNoDdLg6UG-Osr8gZFdkQ05JL Content-Length: 0 --end msg-- 16:00:26.966 pjsua_core.c .RX 339 bytes Response msg 100/INVITE/cseq=13359 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO CSeq: 13359 INVITE From: <sip:0033972617378@sip3.ovh.fr>;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY To: <sip:0033661940377@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjM2z7W 8MLQLAIH9yQkxNQUMwAYogM9rwc Content-Length: 0 --end msg-- 16:00:26.966 pjsua_core.c .RX 379 bytes Response msg 403/INVITE/cseq=13359 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 403 not registered Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO CSeq: 13359 INVITE From: <sip:0033972617378@sip3.ovh.fr>;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY To: <sip:0033661940377@sip3.ovh.fr>;tag=02-22581-7130a9fb-6f8a0a441 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjM2z7W 8MLQLAIH9yQkxNQUMwAYogM9rwc Content-Length: 0 --end msg-- 16:00:26.966 pjsua_core.c ..TX 377 bytes Request msg ACK/cseq=13359 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060: ACK sip:0033661940377@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc Max-Forwards: 70 From: sip:0033972617378@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY To: sip:0033661940377@sip3.ovh.fr;tag=02-22581-7130a9fb-6f8a0a441 Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO CSeq: 13359 ACK Content-Length: 0 --end msg-- 16:00:26.967 pjsua_app.c .....Call 0 is DISCONNECTED [reason=403 (not registered)] 16:00:26.967 pjsua_app_common.c ..... [DISCONNCTD] To: sip:0033661940377@sip3.ovh.fr Call time: 00h:00m:00s, 1st res in 25 ms, conn in 0ms 16:00:26.967 pjsua_media.c .....Call 0: deinitializing media.. 16:00:26.967 pjsua_media.c ......Call 0: cleaning up provisional media, prov_med_cnt=1, med_cnt=0 16:00:26.969 pjsua_core.c .RX 549 bytes Response msg 401/REGISTER/cseq=20718 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 401 Unauthorized Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV CSeq: 20718 REGISTER From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: <sip:0033972617378@sip3.ovh.fr>;tag=00-07686-08f654bc-4d18b7a46 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjwZ0eQ lyjNoDdLg6UG-Osr8gZFdkQ05JL WWW-Authenticate: Digest realm="sip3.ovh.fr",nonce="08f64a24258ffbd7790be25e506a8b45",opaque="08f232d d5578250",stale=false,algorithm=MD5 Server: Cirpack/v4.76 (gw_sip) Content-Length: 0 --end msg-- 16:00:26.970 pjsua_core.c ....TX 788 bytes Request msg REGISTER/cseq=20719 (tdta0x55ffcb151698) to UDP 91.121.129.159:5060: REGISTER sip:sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjUpk6GULmUTzkGVjYXebYbqOKZo3mjF83 Max-Forwards: 70 From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: <sip:0033972617378@sip3.ovh.fr> Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV CSeq: 20719 REGISTER User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Contact: <sip:0033972617378@192.168.105.26:5060;ob> Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Authorization: Digest username="0033972617378", realm="sip3.ovh.fr", nonce="08f64a24258ffbd7790be25e506a8b45", uri="sip:sip3.ovh.fr", response="1aa4dc5667db77e63ab8d15817a95474", algorithm=MD5, opaque="08f232dd5578250" Content-Length: 0 --end msg-- 16:00:26.993 pjsua_core.c .RX 341 bytes Response msg 100/REGISTER/cseq=20719 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV CSeq: 20719 REGISTER From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: <sip:0033972617378@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjUpk6G ULmUTzkGVjYXebYbqOKZo3mjF83 Content-Length: 0 --end msg-- 16:00:27.045 pjsua_core.c .RX 514 bytes Response msg 200/REGISTER/cseq=20719 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 200 OK Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV Contact: <sip:0033972617378@192.168.105.26:5060;ob>;expires=300 CSeq: 20719 REGISTER From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: <sip:0033972617378@sip3.ovh.fr>;tag=00-07755-08f654c7-0470b8783 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjUpk6G ULmUTzkGVjYXebYbqOKZo3mjF83 P-Associated-URI: <sip:0972617378@sip3.ovh.fr> Server: Cirpack/v4.76 (gw_sip) Content-Length: 0 --end msg-- 16:00:27.045 pjsua_acc.c ....SIP outbound status for acc 1 is not active 16:00:27.045 pjsua_acc.c ....sip:0033972617378@sip3.ovh.fr: registration success, status=200 (OK), will re-register in 300 seconds 16:00:27.045 pjsua_acc.c ....Keep-alive timer started for acc 1, destination:91.121.129.159:5060:15, interval:0s 16:00:27.942 pjsua_aud.c Closing sound device after idle for 1 second(s) 16:00:27.942 pjsua_app.c .Turning sound device -99 -99 OFF 16:00:27.942 pjsua_aud.c .Closing null sound device.. I fact I wonder if pjsua takes care to register *before* calling the given URI. So to make another test, once in pjsua I hit `m`, and enter `sip:0033661nnnnnn@sip3.ovh.fr`, and I get the following result: 16:03:31.129 pjsua_call.c !Making call with acc #1 to sip:0033661nnnnnn@sip3.ovh.fr 16:03:31.129 pjsua_aud.c .Set sound device: capture=-99, playback=-99 16:03:31.129 pjsua_aud.c ..Setting null sound device.. 16:03:31.129 pjsua_app.c ...Turning sound device -99 -99 ON 16:03:31.129 pjsua_aud.c ...Opening null sound device.. 16:03:31.129 pjsua_media.c .Call 2: initializing media.. 16:03:31.129 pjsua_media.c ..RTP socket reachable at 192.168.105.26:4002 16:03:31.129 pjsua_media.c ..RTCP socket reachable at 192.168.105.26:4003 16:03:31.129 pjsua_media.c ..Media index 0 selected for audio call 2 16:03:31.130 pjsua_core.c ....TX 1197 bytes Request msg INVITE/cseq=25951 (tdta0x55ffcb14daa8) to UDP 91.121.129.159:5060: INVITE sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Max-Forwards: 70 From: sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: sip:0033661nnnnnn@sip3.ovh.fr Contact: <sip:0033972nnnnnn@192.168.105.26:5060;ob> Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Supported: replaces, 100rel, timer, norefersub Session-Expires: 1800 Min-SE: 90 User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Content-Type: application/sdp Content-Length: 520 v=0 o=- 3752492611 3752492611 IN IP4 192.168.105.26 s=pjmedia b=AS:84 t=0 0 a=X-nat:0 m=audio 4002 RTP/AVP 98 97 99 104 3 0 8 9 96 c=IN IP4 192.168.105.26 b=TIAS:64000 a=rtcp:4003 IN IP4 192.168.105.26 a=sendrecv a=rtpmap:98 speex/16000 a=rtpmap:97 speex/8000 a=rtpmap:99 speex/32000 a=rtpmap:104 iLBC/8000 a=fmtp:104 mode=30 a=rtpmap:3 GSM/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:9 G722/8000 a=rtpmap:96 telephone-event/8000 a=fmtp:96 0-16 a=ssrc:281817610 cname:6551173f0b0e5f0f --end msg-- 16:03:31.130 pjsua_app.c .......Call 2 state changed to CALLING >>> 16:03:31.155 pjsua_core.c .RX 339 bytes Response msg 100/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: <sip:0033661nnnnnn@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSa SErQ5cB3NwXli7DykVXR4Yf.qa8 Content-Length: 0 --end msg-- 16:03:31.155 pjsua_core.c .RX 379 bytes Response msg 403/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 403 not registered Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: <sip:0033661nnnnnn@sip3.ovh.fr>;tag=02-24827-7134b08a-07f4e44f1 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSa SErQ5cB3NwXli7DykVXR4Yf.qa8 Content-Length: 0 --end msg-- 16:03:31.155 pjsua_core.c ..TX 377 bytes Request msg ACK/cseq=25951 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060: ACK sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Max-Forwards: 70 From: sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1 Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 ACK Content-Length: 0 --end msg-- 16:03:31.155 pjsua_app.c .....Call 2 is DISCONNECTED [reason=403 (not registered)] 16:03:31.155 pjsua_app_common.c ..... [DISCONNCTD] To: sip:0033661nnnnnn@sip3.ovh.fr Call time: 00h:00m:00s, 1st res in 26 ms, conn in 0ms 16:03:31.155 pjsua_media.c .....Call 2: deinitializing media.. 16:03:31.155 pjsua_media.c ......Call 2: cleaning up provisional media, prov_med_cnt=1, med_cnt=0 16:03:32.156 pjsua_aud.c Closing sound device after idle for 1 second(s) 16:03:32.156 pjsua_app.c .Turning sound device -99 -99 OFF 16:03:32.156 pjsua_aud.c .Closing null sound device.. 16:03:31.129 pjsua_call.c !Making call with acc #1 to sip:00336619nnnnnn@sip3.ovh.fr 16:03:31.129 pjsua_aud.c .Set sound device: capture=-99, playback=-99 16:03:31.129 pjsua_aud.c ..Setting null sound device.. 16:03:31.129 pjsua_app.c ...Turning sound device -99 -99 ON 16:03:31.129 pjsua_aud.c ...Opening null sound device.. 16:03:31.129 pjsua_media.c .Call 2: initializing media.. 16:03:31.129 pjsua_media.c ..RTP socket reachable at 192.168.105.26:4002 16:03:31.129 pjsua_media.c ..RTCP socket reachable at 192.168.105.26:4003 16:03:31.129 pjsua_media.c ..Media index 0 selected for audio call 2 16:03:31.130 pjsua_core.c ....TX 1197 bytes Request msg INVITE/cseq=25951 (tdta0x55ffcb14daa8) to UDP 91.121.129.159:5060: INVITE sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Max-Forwards: 70 From: sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: sip:0033661nnnnnn@sip3.ovh.fr Contact: <sip:0033972nnnnnn@192.168.105.26:5060;ob> Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Supported: replaces, 100rel, timer, norefersub Session-Expires: 1800 Min-SE: 90 User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Content-Type: application/sdp Content-Length: 520 v=0 o=- 3752492611 3752492611 IN IP4 192.168.105.26 s=pjmedia b=AS:84 t=0 0 a=X-nat:0 m=audio 4002 RTP/AVP 98 97 99 104 3 0 8 9 96 c=IN IP4 192.168.105.26 b=TIAS:64000 a=rtcp:4003 IN IP4 192.168.105.26 a=sendrecv a=rtpmap:98 speex/16000 a=rtpmap:97 speex/8000 a=rtpmap:99 speex/32000 a=rtpmap:104 iLBC/8000 a=fmtp:104 mode=30 a=rtpmap:3 GSM/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:9 G722/8000 a=rtpmap:96 telephone-event/8000 a=fmtp:96 0-16 a=ssrc:281817610 cname:6551173f0b0e5f0f --end msg-- 16:03:31.130 pjsua_app.c .......Call 2 state changed to CALLING >>> 16:03:31.155 pjsua_core.c .RX 339 bytes Response msg 100/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: <sip:0033661nnnnnn@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSa SErQ5cB3NwXli7DykVXR4Yf.qa8 Content-Length: 0 --end msg-- 16:03:31.155 pjsua_core.c .RX 379 bytes Response msg 403/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 403 not registered Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: <sip:0033661nnnnnn@sip3.ovh.fr>;tag=02-24827-7134b08a-07f4e44f1 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSa SErQ5cB3NwXli7DykVXR4Yf.qa8 Content-Length: 0 --end msg-- 16:03:31.155 pjsua_core.c ..TX 377 bytes Request msg ACK/cseq=25951 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060: ACK sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Max-Forwards: 70 From: sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1 Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 ACK Content-Length: 0 --end msg-- 16:03:31.155 pjsua_app.c .....Call 2 is DISCONNECTED [reason=403 (not registered)] 16:03:31.155 pjsua_app_common.c ..... [DISCONNCTD] To: sip:0033661nnnnnn@sip3.ovh.fr Call time: 00h:00m:00s, 1st res in 26 ms, conn in 0ms 16:03:31.155 pjsua_media.c .....Call 2: deinitializing media.. 16:03:31.155 pjsua_media.c ......Call 2: cleaning up provisional media, prov_med_cnt=1, med_cnt=0 16:03:32.156 pjsua_aud.c Closing sound device after idle for 1 second(s) 16:03:32.156 pjsua_app.c .Turning sound device -99 -99 OFF 16:03:32.156 pjsua_aud.c .Closing null sound device.. What is this `Call 2 is DISCONNECTED [reason=403 (not registered)]` message? Could you tell me what's wrong? Regards , Alain
KS
KoltogyanU2 SergeyU2
Thu, Nov 29, 2018 3:29 PM

may be because  sip client is not registered ?

This is from you log:

"....

16:00:26.966           pjsua_core.c  .RX 379 bytes Response msg 403/INVITE/cseq=13359 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 403 not registered

......"


From: pjsip pjsip-bounces@lists.pjsip.org on behalf of alain.bonnefoy@ponant-technologies.com alain.bonnefoy@ponant-technologies.com
Sent: Thursday, November 29, 2018 17:23
To: pjsip@lists.pjsip.org
Subject: [pjsip] How to use pjsua to make a phone call?

Hello,

I try to use pjsua to call a phone number a play a wav file.

I looked at this tuto(http://aminastaneh.net/2012-05-06/fun-with-command-line-sip.html) which seems to do it successfully, but with a quite old version.

If I try to do like this tuto, I cannot register to my sip account.

Here is the command I use:

./pjsua --config-file ./pjsua_config sip:0033661nnnnnn@sip3.ovh.fr

The config file is:

            --id sip:0033972nnnnnnnn@sip3.ovh.fr

            --registrar sip:sip3.ovh.fr

            --username 0033972nnnnnnnn

            --password myPasswd

            --realm *

            --null-audio

            --auto-play

            --play-file ./test.wav

and the result is:

            16:00:26.844         os_core_unix.c !pjlib 2.8 for POSIX initialized

            16:00:26.845         sip_endpoint.c  .Creating endpoint instance...

            16:00:26.845                  pjlib  .select() I/O Queue created (0x55ffcb0d37f0)

            16:00:26.845         sip_endpoint.c  .Module "mod-msg-print" registered

            16:00:26.845        sip_transport.c  .Transport manager created.

            16:00:26.845           pjsua_core.c  .PJSUA state changed: NULL --> CREATED

            16:00:26.845         sip_endpoint.c  .Module "mod-pjsua-log" registered

            16:00:26.845         sip_endpoint.c  .Module "mod-tsx-layer" registered

            16:00:26.845         sip_endpoint.c  .Module "mod-stateful-util" registered

            16:00:26.845         sip_endpoint.c  .Module "mod-ua" registered

            16:00:26.845         sip_endpoint.c  .Module "mod-100rel" registered

            16:00:26.845         sip_endpoint.c  .Module "mod-pjsua" registered

            16:00:26.846         sip_endpoint.c  .Module "mod-invite" registered

            16:00:26.938             alsa_dev.c  ..ALSA driver found 32 devices

            16:00:26.938             alsa_dev.c  ..ALSA initialized

            16:00:26.939                  pjlib  ..select() I/O Queue created (0x55ffcb0ed158)

            16:00:26.941         sip_endpoint.c  .Module "mod-evsub" registered

            16:00:26.941         sip_endpoint.c  .Module "mod-presence" registered

            16:00:26.941         sip_endpoint.c  .Module "mod-mwi" registered

            16:00:26.941         sip_endpoint.c  .Module "mod-refer" registered

            16:00:26.941         sip_endpoint.c  .Module "mod-pjsua-pres" registered

            16:00:26.941         sip_endpoint.c  .Module "mod-pjsua-im" registered

            16:00:26.941         sip_endpoint.c  .Module "mod-pjsua-options" registered

            16:00:26.941           pjsua_core.c  .1 SIP worker threads created

            16:00:26.941           pjsua_core.c  .pjsua version 2.8 for Linux-4.15.0.39/x86_64/glibc-2.27 initialized

            16:00:26.941           pjsua_core.c  .PJSUA state changed: CREATED --> INIT

            16:00:26.941         sip_endpoint.c  Module "mod-default-handler" registered

            16:00:26.941            pjsua_aud.c  Creating file player: ./test.wav..

            16:00:26.941           wav_player.c  .File player './test.wav' created: samp.rate=16000, ch=1, bufsize=4KB, filesize=163KB

            16:00:26.941            pjsua_aud.c  .Player created, id=0, slot=1

            16:00:26.941           pjsua_core.c  SIP UDP socket reachable at 192.168.105.26:5060

            16:00:26.941      udp0x55ffcb14bd90  SIP UDP transport started, published address is 192.168.105.26:5060

            16:00:26.942            pjsua_acc.c  Adding account: id=<sip:192.168.105.26:5060>

            16:00:26.942            pjsua_acc.c  .Account <sip:192.168.105.26:5060> added with id 0

            16:00:26.942            pjsua_acc.c  Modifying account 0

            16:00:26.942            pjsua_acc.c  Acc 0: setting online status to 1..

            16:00:26.942            pjsua_acc.c  Adding account: id=sip:0033972617378@sip3.ovh.fr

            16:00:26.942            pjsua_acc.c  .Account sip:0033972617378@sip3.ovh.fr added with id 1

            16:00:26.942            pjsua_acc.c  .Acc 1: setting registration..

            16:00:26.942           pjsua_core.c  ...TX 568 bytes Request msg REGISTER/cseq=20718 (tdta0x55ffcb151698) to UDP 91.121.129.159:5060:

            REGISTER sip:sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjwZ0eQlyjNoDdLg6UG-Osr8gZFdkQ05JL

            Max-Forwards: 70

            From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To: <sip:0033972617378@sip3.ovh.fr>

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            CSeq: 20718 REGISTER

            User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

            Contact: <sip:0033972617378@192.168.105.26:5060;ob>

            Expires: 300

            Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

            Content-Length:  0





            --end msg--

            16:00:26.942            pjsua_acc.c  ..Acc 1: Registration sent

            16:00:26.942            pjsua_acc.c  Acc 1: setting online status to 1..

            16:00:26.942           pjsua_pres.c  Adding buddy: sip:0033661940377@sip3.ovh.fr

            16:00:26.942           pjsua_pres.c  .Buddy 0 added.

            16:00:26.942           pjsua_pres.c  ..Buddy 0: updating presence..

            16:00:26.942            pjsua_aud.c  Setting null sound device..

            16:00:26.942            pjsua_app.c  .Turning sound device -99 -99 ON

            16:00:26.942            pjsua_aud.c  .Opening null sound device..

            16:00:26.942           pjsua_core.c  PJSUA state changed: INIT --> STARTING

            16:00:26.942         sip_endpoint.c  .Module "mod-unsolicited-mwi" registered

            16:00:26.942           pjsua_core.c  .PJSUA state changed: STARTING --> RUNNING

            16:00:26.942                 main.c  Ready: Success

            16:00:26.942           pjsua_call.c  Making call with acc #1 to sip:0033661940377@sip3.ovh.fr

            16:00:26.942          pjsua_media.c  .Call 0: initializing media..

            16:00:26.942          pjsua_media.c  ..RTP socket reachable at 192.168.105.26:4000

            16:00:26.942          pjsua_media.c  ..RTCP socket reachable at 192.168.105.26:4001

            16:00:26.942          pjsua_media.c  ..Media index 0 selected for audio call 0

            16:00:26.942           pjsua_core.c  ....TX 1198 bytes Request msg INVITE/cseq=13359 (tdta0x55ffcb16b4a8) to UDP 91.121.129.159:5060:

            INVITE sip:0033661940377@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc

            Max-Forwards: 70

            From: sip:0033972617378@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY

            To: sip:0033661940377@sip3.ovh.fr

            Contact: <sip:0033972617378@192.168.105.26:5060;ob>

            Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO

            CSeq: 13359 INVITE

            Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

            Supported: replaces, 100rel, timer, norefersub

            Session-Expires: 1800

            Min-SE: 90

            User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

            Content-Type: application/sdp

            Content-Length:   521



            v=0

            o=- 3752492426 3752492426 IN IP4 192.168.105.26

            s=pjmedia

            b=AS:84

            t=0 0

            a=X-nat:0

            m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 9 96

            c=IN IP4 192.168.105.26

            b=TIAS:64000

            a=rtcp:4001 IN IP4 192.168.105.26

            a=sendrecv

            a=rtpmap:98 speex/16000

            a=rtpmap:97 speex/8000

            a=rtpmap:99 speex/32000

            a=rtpmap:104 iLBC/8000

            a=fmtp:104 mode=30

            a=rtpmap:3 GSM/8000

            a=rtpmap:0 PCMU/8000

            a=rtpmap:8 PCMA/8000

            a=rtpmap:9 G722/8000

            a=rtpmap:96 telephone-event/8000

            a=fmtp:96 0-16

            a=ssrc:1011957511 cname:75cedd633ab5e97d



            --end msg--

            16:00:26.942            pjsua_app.c  .......Call 0 state changed to CALLING
            Account list:

              [ 0] <sip:192.168.105.26:5060>: does not register

                   Online status: Online

            *[ 1] sip:0033972617378@sip3.ovh.fr: 100/In Progress (expires=0)

                   Online status: Online

            Buddy list:

            [ 1] <?>  sip:0033661940377@sip3.ovh.fr



            +

---===========+

            |       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     |                   |

            +-----------------------------------------------------------------------------+

            |  q  QUIT   L  ReLoad   sleep MS   echo [0|1|txt]     n: detect NAT type     |

            +

---===========+

            You have 1 active call

            Current call id=0 to sip:0033661940377@sip3.ovh.fr [CALLING]

16:00:26.966          pjsua_core.c  .RX 341 bytes Response msg 100/REGISTER/cseq=20718 (rdata0x55ffcb14d818) from UDP 91.121.129.159:5060:

            SIP/2.0 100 Trying

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            CSeq: 20718 REGISTER

            From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To: <sip:0033972617378@sip3.ovh.fr>

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjwZ0eQlyjNoDdLg6UG-Osr8gZFdkQ05JL

            Content-Length: 0





            --end msg--

            16:00:26.966           pjsua_core.c  .RX 339 bytes Response msg 100/INVITE/cseq=13359 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 100 Trying

            Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO

            CSeq: 13359 INVITE

            From: <sip:0033972617378@sip3.ovh.fr>;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY

            To: <sip:0033661940377@sip3.ovh.fr>

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc

            Content-Length: 0





            --end msg--

            16:00:26.966           pjsua_core.c  .RX 379 bytes Response msg 403/INVITE/cseq=13359 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 403 not registered

            Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO

            CSeq: 13359 INVITE

            From: <sip:0033972617378@sip3.ovh.fr>;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY

            To: <sip:0033661940377@sip3.ovh.fr>;tag=02-22581-7130a9fb-6f8a0a441

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc

            Content-Length: 0





            --end msg--

            16:00:26.966           pjsua_core.c  ..TX 377 bytes Request msg ACK/cseq=13359 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060:

            ACK sip:0033661940377@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc

            Max-Forwards: 70

            From: sip:0033972617378@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY

            To: sip:0033661940377@sip3.ovh.fr;tag=02-22581-7130a9fb-6f8a0a441

            Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO

            CSeq: 13359 ACK

            Content-Length:  0





            --end msg--

            16:00:26.967            pjsua_app.c  .....Call 0 is DISCONNECTED [reason=403 (not registered)]

            16:00:26.967     pjsua_app_common.c  .....

              [DISCONNCTD] To: sip:0033661940377@sip3.ovh.fr

                Call time: 00h:00m:00s, 1st res in 25 ms, conn in 0ms

            16:00:26.967          pjsua_media.c  .....Call 0: deinitializing media..

            16:00:26.967          pjsua_media.c  ......Call 0: cleaning up provisional media, prov_med_cnt=1, med_cnt=0

            16:00:26.969           pjsua_core.c  .RX 549 bytes Response msg 401/REGISTER/cseq=20718 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 401 Unauthorized

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            CSeq: 20718 REGISTER

            From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To: <sip:0033972617378@sip3.ovh.fr>;tag=00-07686-08f654bc-4d18b7a46

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjwZ0eQlyjNoDdLg6UG-Osr8gZFdkQ05JL

            WWW-Authenticate: Digest realm="sip3.ovh.fr",nonce="08f64a24258ffbd7790be25e506a8b45",opaque="08f232dd5578250",stale=false,algorithm=MD5

            Server: Cirpack/v4.76 (gw_sip)

            Content-Length: 0





            --end msg--

            16:00:26.970           pjsua_core.c  ....TX 788 bytes Request msg REGISTER/cseq=20719 (tdta0x55ffcb151698) to UDP 91.121.129.159:5060:

            REGISTER sip:sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjUpk6GULmUTzkGVjYXebYbqOKZo3mjF83

            Max-Forwards: 70

            From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To: <sip:0033972617378@sip3.ovh.fr>

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            CSeq: 20719 REGISTER

            User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

            Contact: <sip:0033972617378@192.168.105.26:5060;ob>

            Expires: 300

            Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

            Authorization: Digest username="0033972617378", realm="sip3.ovh.fr", nonce="08f64a24258ffbd7790be25e506a8b45", uri="sip:sip3.ovh.fr", response="1aa4dc5667db77e63ab8d15817a95474", algorithm=MD5, opaque="08f232dd5578250"

            Content-Length:  0





            --end msg--

            16:00:26.993           pjsua_core.c  .RX 341 bytes Response msg 100/REGISTER/cseq=20719 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 100 Trying

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            CSeq: 20719 REGISTER

            From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To: <sip:0033972617378@sip3.ovh.fr>

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjUpk6GULmUTzkGVjYXebYbqOKZo3mjF83

            Content-Length: 0





            --end msg--

            16:00:27.045           pjsua_core.c  .RX 514 bytes Response msg 200/REGISTER/cseq=20719 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 200 OK

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            Contact: <sip:0033972617378@192.168.105.26:5060;ob>;expires=300

            CSeq: 20719 REGISTER

            From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To: <sip:0033972617378@sip3.ovh.fr>;tag=00-07755-08f654c7-0470b8783

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjUpk6GULmUTzkGVjYXebYbqOKZo3mjF83

            P-Associated-URI: <sip:0972617378@sip3.ovh.fr>

            Server: Cirpack/v4.76 (gw_sip)

            Content-Length: 0





            --end msg--

            16:00:27.045            pjsua_acc.c  ....SIP outbound status for acc 1 is not active

            16:00:27.045            pjsua_acc.c  ....sip:0033972617378@sip3.ovh.fr: registration success, status=200 (OK), will re-register in 300 seconds

            16:00:27.045            pjsua_acc.c  ....Keep-alive timer started for acc 1, destination:91.121.129.159:5060:15, interval:0s

            16:00:27.942            pjsua_aud.c  Closing sound device after idle for 1 second(s)

            16:00:27.942            pjsua_app.c  .Turning sound device -99 -99 OFF

            16:00:27.942            pjsua_aud.c  .Closing null sound device..

I fact I wonder if pjsua takes care to register before calling the given URI.

So to make another test, once in pjsua I hit m, and enter sip:0033661nnnnnn@sip3.ovh.fr, and I get the following result:

            16:03:31.129           pjsua_call.c !Making call with acc #1 to sip:0033661nnnnnn@sip3.ovh.fr

            16:03:31.129            pjsua_aud.c  .Set sound device: capture=-99, playback=-99

            16:03:31.129            pjsua_aud.c  ..Setting null sound device..

            16:03:31.129            pjsua_app.c  ...Turning sound device -99 -99 ON

            16:03:31.129            pjsua_aud.c  ...Opening null sound device..

            16:03:31.129          pjsua_media.c  .Call 2: initializing media..

            16:03:31.129          pjsua_media.c  ..RTP socket reachable at 192.168.105.26:4002

            16:03:31.129          pjsua_media.c  ..RTCP socket reachable at 192.168.105.26:4003

            16:03:31.129          pjsua_media.c  ..Media index 0 selected for audio call 2

            16:03:31.130           pjsua_core.c  ....TX 1197 bytes Request msg INVITE/cseq=25951 (tdta0x55ffcb14daa8) to UDP 91.121.129.159:5060:

            INVITE sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Max-Forwards: 70

            From: sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To: sip:0033661nnnnnn@sip3.ovh.fr

            Contact: <sip:0033972nnnnnn@192.168.105.26:5060;ob>

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

            Supported: replaces, 100rel, timer, norefersub

            Session-Expires: 1800

            Min-SE: 90

            User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

            Content-Type: application/sdp

            Content-Length:   520



            v=0

            o=- 3752492611 3752492611 IN IP4 192.168.105.26

            s=pjmedia

            b=AS:84

            t=0 0

            a=X-nat:0

            m=audio 4002 RTP/AVP 98 97 99 104 3 0 8 9 96

            c=IN IP4 192.168.105.26

            b=TIAS:64000

            a=rtcp:4003 IN IP4 192.168.105.26

            a=sendrecv

            a=rtpmap:98 speex/16000

            a=rtpmap:97 speex/8000

            a=rtpmap:99 speex/32000

            a=rtpmap:104 iLBC/8000

            a=fmtp:104 mode=30

            a=rtpmap:3 GSM/8000

            a=rtpmap:0 PCMU/8000

            a=rtpmap:8 PCMA/8000

            a=rtpmap:9 G722/8000

            a=rtpmap:96 telephone-event/8000

            a=fmtp:96 0-16

            a=ssrc:281817610 cname:6551173f0b0e5f0f



            --end msg--

            16:03:31.130            pjsua_app.c  .......Call 2 state changed to CALLING

16:03:31.155          pjsua_core.c  .RX 339 bytes Response msg 100/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 100 Trying

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To: <sip:0033661nnnnnn@sip3.ovh.fr>

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Content-Length: 0





            --end msg--

            16:03:31.155           pjsua_core.c  .RX 379 bytes Response msg 403/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 403 not registered

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To: <sip:0033661nnnnnn@sip3.ovh.fr>;tag=02-24827-7134b08a-07f4e44f1

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Content-Length: 0





            --end msg--

            16:03:31.155           pjsua_core.c  ..TX 377 bytes Request msg ACK/cseq=25951 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060:

            ACK sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Max-Forwards: 70

            From: sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To: sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 ACK

            Content-Length:  0





            --end msg--

            16:03:31.155            pjsua_app.c  .....Call 2 is DISCONNECTED [reason=403 (not registered)]

            16:03:31.155     pjsua_app_common.c  .....

              [DISCONNCTD] To: sip:0033661nnnnnn@sip3.ovh.fr

                Call time: 00h:00m:00s, 1st res in 26 ms, conn in 0ms

            16:03:31.155          pjsua_media.c  .....Call 2: deinitializing media..

            16:03:31.155          pjsua_media.c  ......Call 2: cleaning up provisional media, prov_med_cnt=1, med_cnt=0

            16:03:32.156            pjsua_aud.c  Closing sound device after idle for 1 second(s)

            16:03:32.156            pjsua_app.c  .Turning sound device -99 -99 OFF

            16:03:32.156            pjsua_aud.c  .Closing null sound device..

                           16:03:31.129           pjsua_call.c !Making call with acc #1 to sip:00336619nnnnnn@sip3.ovh.fr

            16:03:31.129            pjsua_aud.c  .Set sound device: capture=-99, playback=-99

            16:03:31.129            pjsua_aud.c  ..Setting null sound device..

            16:03:31.129            pjsua_app.c  ...Turning sound device -99 -99 ON

            16:03:31.129            pjsua_aud.c  ...Opening null sound device..

            16:03:31.129          pjsua_media.c  .Call 2: initializing media..

            16:03:31.129          pjsua_media.c  ..RTP socket reachable at 192.168.105.26:4002

            16:03:31.129          pjsua_media.c  ..RTCP socket reachable at 192.168.105.26:4003

            16:03:31.129          pjsua_media.c  ..Media index 0 selected for audio call 2

            16:03:31.130           pjsua_core.c  ....TX 1197 bytes Request msg INVITE/cseq=25951 (tdta0x55ffcb14daa8) to UDP 91.121.129.159:5060:

            INVITE sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Max-Forwards: 70

            From: sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To: sip:0033661nnnnnn@sip3.ovh.fr

            Contact: <sip:0033972nnnnnn@192.168.105.26:5060;ob>

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

            Supported: replaces, 100rel, timer, norefersub

            Session-Expires: 1800

            Min-SE: 90

            User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

            Content-Type: application/sdp

            Content-Length:   520



            v=0

            o=- 3752492611 3752492611 IN IP4 192.168.105.26

            s=pjmedia

            b=AS:84

            t=0 0

            a=X-nat:0

            m=audio 4002 RTP/AVP 98 97 99 104 3 0 8 9 96

            c=IN IP4 192.168.105.26

            b=TIAS:64000

            a=rtcp:4003 IN IP4 192.168.105.26

            a=sendrecv

            a=rtpmap:98 speex/16000

            a=rtpmap:97 speex/8000

            a=rtpmap:99 speex/32000

            a=rtpmap:104 iLBC/8000

            a=fmtp:104 mode=30

            a=rtpmap:3 GSM/8000

            a=rtpmap:0 PCMU/8000

            a=rtpmap:8 PCMA/8000

            a=rtpmap:9 G722/8000

            a=rtpmap:96 telephone-event/8000

            a=fmtp:96 0-16

            a=ssrc:281817610 cname:6551173f0b0e5f0f



            --end msg--

            16:03:31.130            pjsua_app.c  .......Call 2 state changed to CALLING

16:03:31.155          pjsua_core.c  .RX 339 bytes Response msg 100/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 100 Trying

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To: <sip:0033661nnnnnn@sip3.ovh.fr>

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Content-Length: 0





            --end msg--

            16:03:31.155           pjsua_core.c  .RX 379 bytes Response msg 403/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 403 not registered

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To: <sip:0033661nnnnnn@sip3.ovh.fr>;tag=02-24827-7134b08a-07f4e44f1

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Content-Length: 0





            --end msg--

            16:03:31.155           pjsua_core.c  ..TX 377 bytes Request msg ACK/cseq=25951 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060:

            ACK sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Max-Forwards: 70

            From: sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To: sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 ACK

            Content-Length:  0





            --end msg--

            16:03:31.155            pjsua_app.c  .....Call 2 is DISCONNECTED [reason=403 (not registered)]

            16:03:31.155     pjsua_app_common.c  .....

              [DISCONNCTD] To: sip:0033661nnnnnn@sip3.ovh.fr

                Call time: 00h:00m:00s, 1st res in 26 ms, conn in 0ms

            16:03:31.155          pjsua_media.c  .....Call 2: deinitializing media..

            16:03:31.155          pjsua_media.c  ......Call 2: cleaning up provisional media, prov_med_cnt=1, med_cnt=0

            16:03:32.156            pjsua_aud.c  Closing sound device after idle for 1 second(s)

            16:03:32.156            pjsua_app.c  .Turning sound device -99 -99 OFF

            16:03:32.156            pjsua_aud.c  .Closing null sound device..

What is this Call 2 is DISCONNECTED [reason=403 (not registered)] message?

Could you tell me what's wrong?

Regards ,

Alain

may be because sip client is not registered ? This is from you log: ".... 16:00:26.966 pjsua_core.c .RX 379 bytes Response msg 403/INVITE/cseq=13359 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 403 not registered ......" ________________________________ From: pjsip <pjsip-bounces@lists.pjsip.org> on behalf of alain.bonnefoy@ponant-technologies.com <alain.bonnefoy@ponant-technologies.com> Sent: Thursday, November 29, 2018 17:23 To: pjsip@lists.pjsip.org Subject: [pjsip] How to use pjsua to make a phone call? Hello, I try to use pjsua to call a phone number a play a wav file. I looked at this tuto(http://aminastaneh.net/2012-05-06/fun-with-command-line-sip.html) which seems to do it successfully, but with a quite old version. If I try to do like this tuto, I cannot register to my sip account. Here is the command I use: ./pjsua --config-file ./pjsua_config sip:0033661nnnnnn@sip3.ovh.fr The config file is: --id sip:0033972nnnnnnnn@sip3.ovh.fr --registrar sip:sip3.ovh.fr --username 0033972nnnnnnnn --password myPasswd --realm * --null-audio --auto-play --play-file ./test.wav and the result is: 16:00:26.844 os_core_unix.c !pjlib 2.8 for POSIX initialized 16:00:26.845 sip_endpoint.c .Creating endpoint instance... 16:00:26.845 pjlib .select() I/O Queue created (0x55ffcb0d37f0) 16:00:26.845 sip_endpoint.c .Module "mod-msg-print" registered 16:00:26.845 sip_transport.c .Transport manager created. 16:00:26.845 pjsua_core.c .PJSUA state changed: NULL --> CREATED 16:00:26.845 sip_endpoint.c .Module "mod-pjsua-log" registered 16:00:26.845 sip_endpoint.c .Module "mod-tsx-layer" registered 16:00:26.845 sip_endpoint.c .Module "mod-stateful-util" registered 16:00:26.845 sip_endpoint.c .Module "mod-ua" registered 16:00:26.845 sip_endpoint.c .Module "mod-100rel" registered 16:00:26.845 sip_endpoint.c .Module "mod-pjsua" registered 16:00:26.846 sip_endpoint.c .Module "mod-invite" registered 16:00:26.938 alsa_dev.c ..ALSA driver found 32 devices 16:00:26.938 alsa_dev.c ..ALSA initialized 16:00:26.939 pjlib ..select() I/O Queue created (0x55ffcb0ed158) 16:00:26.941 sip_endpoint.c .Module "mod-evsub" registered 16:00:26.941 sip_endpoint.c .Module "mod-presence" registered 16:00:26.941 sip_endpoint.c .Module "mod-mwi" registered 16:00:26.941 sip_endpoint.c .Module "mod-refer" registered 16:00:26.941 sip_endpoint.c .Module "mod-pjsua-pres" registered 16:00:26.941 sip_endpoint.c .Module "mod-pjsua-im" registered 16:00:26.941 sip_endpoint.c .Module "mod-pjsua-options" registered 16:00:26.941 pjsua_core.c .1 SIP worker threads created 16:00:26.941 pjsua_core.c .pjsua version 2.8 for Linux-4.15.0.39/x86_64/glibc-2.27 initialized 16:00:26.941 pjsua_core.c .PJSUA state changed: CREATED --> INIT 16:00:26.941 sip_endpoint.c Module "mod-default-handler" registered 16:00:26.941 pjsua_aud.c Creating file player: ./test.wav.. 16:00:26.941 wav_player.c .File player './test.wav' created: samp.rate=16000, ch=1, bufsize=4KB, filesize=163KB 16:00:26.941 pjsua_aud.c .Player created, id=0, slot=1 16:00:26.941 pjsua_core.c SIP UDP socket reachable at 192.168.105.26:5060 16:00:26.941 udp0x55ffcb14bd90 SIP UDP transport started, published address is 192.168.105.26:5060 16:00:26.942 pjsua_acc.c Adding account: id=<sip:192.168.105.26:5060> 16:00:26.942 pjsua_acc.c .Account <sip:192.168.105.26:5060> added with id 0 16:00:26.942 pjsua_acc.c Modifying account 0 16:00:26.942 pjsua_acc.c Acc 0: setting online status to 1.. 16:00:26.942 pjsua_acc.c Adding account: id=sip:0033972617378@sip3.ovh.fr 16:00:26.942 pjsua_acc.c .Account sip:0033972617378@sip3.ovh.fr added with id 1 16:00:26.942 pjsua_acc.c .Acc 1: setting registration.. 16:00:26.942 pjsua_core.c ...TX 568 bytes Request msg REGISTER/cseq=20718 (tdta0x55ffcb151698) to UDP 91.121.129.159:5060: REGISTER sip:sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjwZ0eQlyjNoDdLg6UG-Osr8gZFdkQ05JL Max-Forwards: 70 From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: <sip:0033972617378@sip3.ovh.fr> Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV CSeq: 20718 REGISTER User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Contact: <sip:0033972617378@192.168.105.26:5060;ob> Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Content-Length: 0 --end msg-- 16:00:26.942 pjsua_acc.c ..Acc 1: Registration sent 16:00:26.942 pjsua_acc.c Acc 1: setting online status to 1.. 16:00:26.942 pjsua_pres.c Adding buddy: sip:0033661940377@sip3.ovh.fr 16:00:26.942 pjsua_pres.c .Buddy 0 added. 16:00:26.942 pjsua_pres.c ..Buddy 0: updating presence.. 16:00:26.942 pjsua_aud.c Setting null sound device.. 16:00:26.942 pjsua_app.c .Turning sound device -99 -99 ON 16:00:26.942 pjsua_aud.c .Opening null sound device.. 16:00:26.942 pjsua_core.c PJSUA state changed: INIT --> STARTING 16:00:26.942 sip_endpoint.c .Module "mod-unsolicited-mwi" registered 16:00:26.942 pjsua_core.c .PJSUA state changed: STARTING --> RUNNING 16:00:26.942 main.c Ready: Success 16:00:26.942 pjsua_call.c Making call with acc #1 to sip:0033661940377@sip3.ovh.fr 16:00:26.942 pjsua_media.c .Call 0: initializing media.. 16:00:26.942 pjsua_media.c ..RTP socket reachable at 192.168.105.26:4000 16:00:26.942 pjsua_media.c ..RTCP socket reachable at 192.168.105.26:4001 16:00:26.942 pjsua_media.c ..Media index 0 selected for audio call 0 16:00:26.942 pjsua_core.c ....TX 1198 bytes Request msg INVITE/cseq=13359 (tdta0x55ffcb16b4a8) to UDP 91.121.129.159:5060: INVITE sip:0033661940377@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc Max-Forwards: 70 From: sip:0033972617378@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY To: sip:0033661940377@sip3.ovh.fr Contact: <sip:0033972617378@192.168.105.26:5060;ob> Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO CSeq: 13359 INVITE Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Supported: replaces, 100rel, timer, norefersub Session-Expires: 1800 Min-SE: 90 User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Content-Type: application/sdp Content-Length: 521 v=0 o=- 3752492426 3752492426 IN IP4 192.168.105.26 s=pjmedia b=AS:84 t=0 0 a=X-nat:0 m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 9 96 c=IN IP4 192.168.105.26 b=TIAS:64000 a=rtcp:4001 IN IP4 192.168.105.26 a=sendrecv a=rtpmap:98 speex/16000 a=rtpmap:97 speex/8000 a=rtpmap:99 speex/32000 a=rtpmap:104 iLBC/8000 a=fmtp:104 mode=30 a=rtpmap:3 GSM/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:9 G722/8000 a=rtpmap:96 telephone-event/8000 a=fmtp:96 0-16 a=ssrc:1011957511 cname:75cedd633ab5e97d --end msg-- 16:00:26.942 pjsua_app.c .......Call 0 state changed to CALLING >>>> Account list: [ 0] <sip:192.168.105.26:5060>: does not register Online status: Online *[ 1] sip:0033972617378@sip3.ovh.fr: 100/In Progress (expires=0) Online status: Online Buddy list: [ 1] <?> sip:0033661940377@sip3.ovh.fr +=============================================================================+ | 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 | | +-----------------------------------------------------------------------------+ | q QUIT L ReLoad sleep MS echo [0|1|txt] n: detect NAT type | +=============================================================================+ You have 1 active call Current call id=0 to sip:0033661940377@sip3.ovh.fr [CALLING] >>> 16:00:26.966 pjsua_core.c .RX 341 bytes Response msg 100/REGISTER/cseq=20718 (rdata0x55ffcb14d818) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV CSeq: 20718 REGISTER From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: <sip:0033972617378@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjwZ0eQlyjNoDdLg6UG-Osr8gZFdkQ05JL Content-Length: 0 --end msg-- 16:00:26.966 pjsua_core.c .RX 339 bytes Response msg 100/INVITE/cseq=13359 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO CSeq: 13359 INVITE From: <sip:0033972617378@sip3.ovh.fr>;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY To: <sip:0033661940377@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc Content-Length: 0 --end msg-- 16:00:26.966 pjsua_core.c .RX 379 bytes Response msg 403/INVITE/cseq=13359 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 403 not registered Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO CSeq: 13359 INVITE From: <sip:0033972617378@sip3.ovh.fr>;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY To: <sip:0033661940377@sip3.ovh.fr>;tag=02-22581-7130a9fb-6f8a0a441 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc Content-Length: 0 --end msg-- 16:00:26.966 pjsua_core.c ..TX 377 bytes Request msg ACK/cseq=13359 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060: ACK sip:0033661940377@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc Max-Forwards: 70 From: sip:0033972617378@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY To: sip:0033661940377@sip3.ovh.fr;tag=02-22581-7130a9fb-6f8a0a441 Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO CSeq: 13359 ACK Content-Length: 0 --end msg-- 16:00:26.967 pjsua_app.c .....Call 0 is DISCONNECTED [reason=403 (not registered)] 16:00:26.967 pjsua_app_common.c ..... [DISCONNCTD] To: sip:0033661940377@sip3.ovh.fr Call time: 00h:00m:00s, 1st res in 25 ms, conn in 0ms 16:00:26.967 pjsua_media.c .....Call 0: deinitializing media.. 16:00:26.967 pjsua_media.c ......Call 0: cleaning up provisional media, prov_med_cnt=1, med_cnt=0 16:00:26.969 pjsua_core.c .RX 549 bytes Response msg 401/REGISTER/cseq=20718 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 401 Unauthorized Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV CSeq: 20718 REGISTER From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: <sip:0033972617378@sip3.ovh.fr>;tag=00-07686-08f654bc-4d18b7a46 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjwZ0eQlyjNoDdLg6UG-Osr8gZFdkQ05JL WWW-Authenticate: Digest realm="sip3.ovh.fr",nonce="08f64a24258ffbd7790be25e506a8b45",opaque="08f232dd5578250",stale=false,algorithm=MD5 Server: Cirpack/v4.76 (gw_sip) Content-Length: 0 --end msg-- 16:00:26.970 pjsua_core.c ....TX 788 bytes Request msg REGISTER/cseq=20719 (tdta0x55ffcb151698) to UDP 91.121.129.159:5060: REGISTER sip:sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjUpk6GULmUTzkGVjYXebYbqOKZo3mjF83 Max-Forwards: 70 From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: <sip:0033972617378@sip3.ovh.fr> Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV CSeq: 20719 REGISTER User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Contact: <sip:0033972617378@192.168.105.26:5060;ob> Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Authorization: Digest username="0033972617378", realm="sip3.ovh.fr", nonce="08f64a24258ffbd7790be25e506a8b45", uri="sip:sip3.ovh.fr", response="1aa4dc5667db77e63ab8d15817a95474", algorithm=MD5, opaque="08f232dd5578250" Content-Length: 0 --end msg-- 16:00:26.993 pjsua_core.c .RX 341 bytes Response msg 100/REGISTER/cseq=20719 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV CSeq: 20719 REGISTER From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: <sip:0033972617378@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjUpk6GULmUTzkGVjYXebYbqOKZo3mjF83 Content-Length: 0 --end msg-- 16:00:27.045 pjsua_core.c .RX 514 bytes Response msg 200/REGISTER/cseq=20719 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 200 OK Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV Contact: <sip:0033972617378@192.168.105.26:5060;ob>;expires=300 CSeq: 20719 REGISTER From: <sip:0033972617378@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: <sip:0033972617378@sip3.ovh.fr>;tag=00-07755-08f654c7-0470b8783 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjUpk6GULmUTzkGVjYXebYbqOKZo3mjF83 P-Associated-URI: <sip:0972617378@sip3.ovh.fr> Server: Cirpack/v4.76 (gw_sip) Content-Length: 0 --end msg-- 16:00:27.045 pjsua_acc.c ....SIP outbound status for acc 1 is not active 16:00:27.045 pjsua_acc.c ....sip:0033972617378@sip3.ovh.fr: registration success, status=200 (OK), will re-register in 300 seconds 16:00:27.045 pjsua_acc.c ....Keep-alive timer started for acc 1, destination:91.121.129.159:5060:15, interval:0s 16:00:27.942 pjsua_aud.c Closing sound device after idle for 1 second(s) 16:00:27.942 pjsua_app.c .Turning sound device -99 -99 OFF 16:00:27.942 pjsua_aud.c .Closing null sound device.. I fact I wonder if pjsua takes care to register *before* calling the given URI. So to make another test, once in pjsua I hit `m`, and enter `sip:0033661nnnnnn@sip3.ovh.fr`, and I get the following result: 16:03:31.129 pjsua_call.c !Making call with acc #1 to sip:0033661nnnnnn@sip3.ovh.fr 16:03:31.129 pjsua_aud.c .Set sound device: capture=-99, playback=-99 16:03:31.129 pjsua_aud.c ..Setting null sound device.. 16:03:31.129 pjsua_app.c ...Turning sound device -99 -99 ON 16:03:31.129 pjsua_aud.c ...Opening null sound device.. 16:03:31.129 pjsua_media.c .Call 2: initializing media.. 16:03:31.129 pjsua_media.c ..RTP socket reachable at 192.168.105.26:4002 16:03:31.129 pjsua_media.c ..RTCP socket reachable at 192.168.105.26:4003 16:03:31.129 pjsua_media.c ..Media index 0 selected for audio call 2 16:03:31.130 pjsua_core.c ....TX 1197 bytes Request msg INVITE/cseq=25951 (tdta0x55ffcb14daa8) to UDP 91.121.129.159:5060: INVITE sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Max-Forwards: 70 From: sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: sip:0033661nnnnnn@sip3.ovh.fr Contact: <sip:0033972nnnnnn@192.168.105.26:5060;ob> Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Supported: replaces, 100rel, timer, norefersub Session-Expires: 1800 Min-SE: 90 User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Content-Type: application/sdp Content-Length: 520 v=0 o=- 3752492611 3752492611 IN IP4 192.168.105.26 s=pjmedia b=AS:84 t=0 0 a=X-nat:0 m=audio 4002 RTP/AVP 98 97 99 104 3 0 8 9 96 c=IN IP4 192.168.105.26 b=TIAS:64000 a=rtcp:4003 IN IP4 192.168.105.26 a=sendrecv a=rtpmap:98 speex/16000 a=rtpmap:97 speex/8000 a=rtpmap:99 speex/32000 a=rtpmap:104 iLBC/8000 a=fmtp:104 mode=30 a=rtpmap:3 GSM/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:9 G722/8000 a=rtpmap:96 telephone-event/8000 a=fmtp:96 0-16 a=ssrc:281817610 cname:6551173f0b0e5f0f --end msg-- 16:03:31.130 pjsua_app.c .......Call 2 state changed to CALLING >>> 16:03:31.155 pjsua_core.c .RX 339 bytes Response msg 100/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: <sip:0033661nnnnnn@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Content-Length: 0 --end msg-- 16:03:31.155 pjsua_core.c .RX 379 bytes Response msg 403/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 403 not registered Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: <sip:0033661nnnnnn@sip3.ovh.fr>;tag=02-24827-7134b08a-07f4e44f1 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Content-Length: 0 --end msg-- 16:03:31.155 pjsua_core.c ..TX 377 bytes Request msg ACK/cseq=25951 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060: ACK sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Max-Forwards: 70 From: sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1 Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 ACK Content-Length: 0 --end msg-- 16:03:31.155 pjsua_app.c .....Call 2 is DISCONNECTED [reason=403 (not registered)] 16:03:31.155 pjsua_app_common.c ..... [DISCONNCTD] To: sip:0033661nnnnnn@sip3.ovh.fr Call time: 00h:00m:00s, 1st res in 26 ms, conn in 0ms 16:03:31.155 pjsua_media.c .....Call 2: deinitializing media.. 16:03:31.155 pjsua_media.c ......Call 2: cleaning up provisional media, prov_med_cnt=1, med_cnt=0 16:03:32.156 pjsua_aud.c Closing sound device after idle for 1 second(s) 16:03:32.156 pjsua_app.c .Turning sound device -99 -99 OFF 16:03:32.156 pjsua_aud.c .Closing null sound device.. 16:03:31.129 pjsua_call.c !Making call with acc #1 to sip:00336619nnnnnn@sip3.ovh.fr 16:03:31.129 pjsua_aud.c .Set sound device: capture=-99, playback=-99 16:03:31.129 pjsua_aud.c ..Setting null sound device.. 16:03:31.129 pjsua_app.c ...Turning sound device -99 -99 ON 16:03:31.129 pjsua_aud.c ...Opening null sound device.. 16:03:31.129 pjsua_media.c .Call 2: initializing media.. 16:03:31.129 pjsua_media.c ..RTP socket reachable at 192.168.105.26:4002 16:03:31.129 pjsua_media.c ..RTCP socket reachable at 192.168.105.26:4003 16:03:31.129 pjsua_media.c ..Media index 0 selected for audio call 2 16:03:31.130 pjsua_core.c ....TX 1197 bytes Request msg INVITE/cseq=25951 (tdta0x55ffcb14daa8) to UDP 91.121.129.159:5060: INVITE sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Max-Forwards: 70 From: sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: sip:0033661nnnnnn@sip3.ovh.fr Contact: <sip:0033972nnnnnn@192.168.105.26:5060;ob> Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Supported: replaces, 100rel, timer, norefersub Session-Expires: 1800 Min-SE: 90 User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Content-Type: application/sdp Content-Length: 520 v=0 o=- 3752492611 3752492611 IN IP4 192.168.105.26 s=pjmedia b=AS:84 t=0 0 a=X-nat:0 m=audio 4002 RTP/AVP 98 97 99 104 3 0 8 9 96 c=IN IP4 192.168.105.26 b=TIAS:64000 a=rtcp:4003 IN IP4 192.168.105.26 a=sendrecv a=rtpmap:98 speex/16000 a=rtpmap:97 speex/8000 a=rtpmap:99 speex/32000 a=rtpmap:104 iLBC/8000 a=fmtp:104 mode=30 a=rtpmap:3 GSM/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:9 G722/8000 a=rtpmap:96 telephone-event/8000 a=fmtp:96 0-16 a=ssrc:281817610 cname:6551173f0b0e5f0f --end msg-- 16:03:31.130 pjsua_app.c .......Call 2 state changed to CALLING >>> 16:03:31.155 pjsua_core.c .RX 339 bytes Response msg 100/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: <sip:0033661nnnnnn@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Content-Length: 0 --end msg-- 16:03:31.155 pjsua_core.c .RX 379 bytes Response msg 403/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 403 not registered Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: <sip:0033661nnnnnn@sip3.ovh.fr>;tag=02-24827-7134b08a-07f4e44f1 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Content-Length: 0 --end msg-- 16:03:31.155 pjsua_core.c ..TX 377 bytes Request msg ACK/cseq=25951 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060: ACK sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Max-Forwards: 70 From: sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1 Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 ACK Content-Length: 0 --end msg-- 16:03:31.155 pjsua_app.c .....Call 2 is DISCONNECTED [reason=403 (not registered)] 16:03:31.155 pjsua_app_common.c ..... [DISCONNCTD] To: sip:0033661nnnnnn@sip3.ovh.fr Call time: 00h:00m:00s, 1st res in 26 ms, conn in 0ms 16:03:31.155 pjsua_media.c .....Call 2: deinitializing media.. 16:03:31.155 pjsua_media.c ......Call 2: cleaning up provisional media, prov_med_cnt=1, med_cnt=0 16:03:32.156 pjsua_aud.c Closing sound device after idle for 1 second(s) 16:03:32.156 pjsua_app.c .Turning sound device -99 -99 OFF 16:03:32.156 pjsua_aud.c .Closing null sound device.. What is this `Call 2 is DISCONNECTED [reason=403 (not registered)]` message? Could you tell me what's wrong? Regards , Alain
AB
alain.bonnefoy@ponant-technologies.com
Thu, Nov 29, 2018 3:55 PM

Ok thanks for your answer but it’s exactly what I’d like to understand :

Here is what I exactly did after starting pjsua : First I register, i’ts done successfully and than I make a call which fails and tells ‘not registered’ :

   $ ./pjsua-x86_64-unknown-linux-gnu 

   16:43:53.666         os_core_unix.c !pjlib 2.8 for POSIX initialized

   16:43:53.668         sip_endpoint.c  .Creating endpoint instance...

   16:43:53.669                  pjlib  .select() I/O Queue created (0x55ab4f4d27f0)

   16:43:53.669         sip_endpoint.c  .Module "mod-msg-print" registered

   16:43:53.669        sip_transport.c  .Transport manager created.

   16:43:53.669           pjsua_core.c  .PJSUA state changed: NULL --> CREATED

   16:43:53.670         sip_endpoint.c  .Module "mod-pjsua-log" registered

   16:43:53.670         sip_endpoint.c  .Module "mod-tsx-layer" registered

   16:43:53.670         sip_endpoint.c  .Module "mod-stateful-util" registered

   16:43:53.670         sip_endpoint.c  .Module "mod-ua" registered

   16:43:53.670         sip_endpoint.c  .Module "mod-100rel" registered

   16:43:53.670         sip_endpoint.c  .Module "mod-pjsua" registered

   16:43:53.670         sip_endpoint.c  .Module "mod-invite" registered

   16:43:53.754             alsa_dev.c  ..ALSA driver found 32 devices

   16:43:53.755             alsa_dev.c  ..ALSA initialized

   16:43:53.755                  pjlib  ..select() I/O Queue created (0x55ab4f55bc88)

   16:43:53.758         sip_endpoint.c  .Module "mod-evsub" registered

   16:43:53.758         sip_endpoint.c  .Module "mod-presence" registered

   16:43:53.758         sip_endpoint.c  .Module "mod-mwi" registered

   16:43:53.758         sip_endpoint.c  .Module "mod-refer" registered

   16:43:53.758         sip_endpoint.c  .Module "mod-pjsua-pres" registered

   16:43:53.758         sip_endpoint.c  .Module "mod-pjsua-im" registered

   16:43:53.758         sip_endpoint.c  .Module "mod-pjsua-options" registered

   16:43:53.758           pjsua_core.c  .1 SIP worker threads created

   16:43:53.758           pjsua_core.c  .pjsua version 2.8 for Linux-4.15.0.39/x86_64/glibc-2.27 initialized

   16:43:53.758           pjsua_core.c  .PJSUA state changed: CREATED --> INIT

   16:43:53.758         sip_endpoint.c  Module "mod-default-handler" registered

   16:43:53.758           pjsua_core.c  SIP UDP socket reachable at 192.168.105.26:5060

   16:43:53.758      udp0x55ab4f53c450  SIP UDP transport started, published address is 192.168.105.26:5060

   16:43:53.758            pjsua_acc.c  Adding account: id=<sip:192.168.105.26:5060>

   16:43:53.758            pjsua_acc.c  .Account <sip:192.168.105.26:5060> added with id 0

   16:43:53.758            pjsua_acc.c  Modifying account 0

   16:43:53.758            pjsua_acc.c  Acc 0: setting online status to 1..

   16:43:53.758             tcptp:5060  SIP TCP listener ready for incoming connections at 192.168.105.26:5060

   16:43:53.758            pjsua_acc.c  Adding account: id=<sip:192.168.105.26:5060;transport=TCP>

   16:43:53.758            pjsua_acc.c  .Account <sip:192.168.105.26:5060;transport=TCP> added with id 1

   16:43:53.758            pjsua_acc.c  Modifying account 1

   16:43:53.758            pjsua_acc.c  Acc 1: setting online status to 1..

   16:43:53.758           pjsua_core.c  PJSUA state changed: INIT --> STARTING

   16:43:53.758         sip_endpoint.c  .Module "mod-unsolicited-mwi" registered

   16:43:53.758           pjsua_core.c  .PJSUA state changed: STARTING --> RUNNING

   16:43:53.758                 main.c  Ready: Success
   Account list:

     [ 0] <sip:192.168.105.26:5060>: does not register

          Online status: Online

   *[ 1] <sip:192.168.105.26:5060;transport=TCP>: does not register

          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              |  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     |                   |

   +-----------------------------------------------------------------------------+

   |  q  QUIT   L  ReLoad   sleep MS   echo [0|1|txt]     n: detect NAT type     |

   +

---===========+

   You have 0 active call

+a

   Your SIP URL: (empty to cancel): sip:0033972nnnnnn@sip3.ovh.fr

   URL of the registrar: (empty to cancel): sip:sip3.ovh.fr

   Auth Realm: (empty to cancel): *

   Auth Username: (empty to cancel): 0033972nnnnnn

   Auth Password: (empty to cancel): mypasswd

   16:44:38.922            pjsua_acc.c  Adding account: id=sip:0033972nnnnnn@sip3.ovh.fr

   16:44:38.922            pjsua_acc.c  .Account sip:0033972nnnnnn@sip3.ovh.fr added with id 2

   16:44:38.922            pjsua_acc.c  .Acc 2: setting registration..

   16:44:38.950           pjsua_core.c  ...TX 568 bytes Request msg REGISTER/cseq=32229 (tdta0x55ab4f542bc8) to UDP 91.121.129.159:5060:

   REGISTER sip:sip3.ovh.fr SIP/2.0

   Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjIR29GPvvEm8AWC5s1qV4EKMviO-3wRim

   Max-Forwards: 70

   From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb

   To: <sip:0033972nnnnnn@sip3.ovh.fr>

   Call-ID: EZarPAaegxJWYDDaUFn8IMS.fT1ynipE

   CSeq: 32229 REGISTER

   User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

   Contact: <sip:0033972nnnnnn@192.168.105.26:5060;ob>

   Expires: 300

   Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

   Content-Length:  0





   --end msg--

   16:44:38.950            pjsua_acc.c  ..Acc 2: Registration sent

16:44:38.974          pjsua_core.c  .RX 341 bytes Response msg 100/REGISTER/cseq=32229 (rdata0x55ab4f53ded8) from UDP 91.121.129.159:5060:

   SIP/2.0 100 Trying

   Call-ID: EZarPAaegxJWYDDaUFn8IMS.fT1ynipE

   CSeq: 32229 REGISTER

   From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb

   To: <sip:0033972nnnnnn@sip3.ovh.fr>

   Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjIR29GPvvEm8AWC5s1qV4EKMviO-3wRim

   Content-Length: 0





   --end msg--

   16:44:38.996           pjsua_core.c  .RX 549 bytes Response msg 401/REGISTER/cseq=32229 (rdata0x7f9b84009988) from UDP 91.121.129.159:5060:

   SIP/2.0 401 Unauthorized

   Call-ID: EZarPAaegxJWYDDaUFn8IMS.fT1ynipE

   CSeq: 32229 REGISTER

   From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb

   To: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=00-08027-0ae69417-6950486d5

   Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjIR29GPvvEm8AWC5s1qV4EKMviO-3wRim

   WWW-Authenticate: Digest realm="sip3.ovh.fr",nonce="0ae6882d0ce42861705875534fdfc7d4",opaque="0ae410ed63e0dd3",stale=false,algorithm=MD5

   Server: Cirpack/v4.76 (gw_sip)

   Content-Length: 0





   --end msg--

   16:44:38.996           pjsua_core.c  ....TX 788 bytes Request msg REGISTER/cseq=32230 (tdta0x55ab4f542bc8) to UDP 91.121.129.159:5060:

   REGISTER sip:sip3.ovh.fr SIP/2.0

   Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPj-vQTwMT-eq-zheaUxY7-qZAnQdFKL7ed

   Max-Forwards: 70

   From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb

   To: <sip:0033972nnnnnn@sip3.ovh.fr>

   Call-ID: EZarPAaegxJWYDDaUFn8IMS.fT1ynipE

   CSeq: 32230 REGISTER

   User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

   Contact: <sip:0033972nnnnnn@192.168.105.26:5060;ob>

   Expires: 300

   Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

   Authorization: Digest username="0033972nnnnnn", realm="sip3.ovh.fr", nonce="0ae6882d0ce42861705875534fdfc7d4", uri="sip:sip3.ovh.fr", response="e70170dacab9d6f6f4d079c3d2a7165a", algorithm=MD5, opaque="0ae410ed63e0dd3"

   Content-Length:  0





   --end msg--

   16:44:39.020           pjsua_core.c  .RX 341 bytes Response msg 100/REGISTER/cseq=32230 (rdata0x7f9b84009988) from UDP 91.121.129.159:5060:

   SIP/2.0 100 Trying

   Call-ID: EZarPAaegxJWYDDaUFn8IMS.fT1ynipE

   CSeq: 32230 REGISTER

   From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb

   To: <sip:0033972nnnnnn@sip3.ovh.fr>

   Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPj-vQTwMT-eq-zheaUxY7-qZAnQdFKL7ed

   Content-Length: 0





   --end msg--

   16:44:39.055           pjsua_core.c  .RX 514 bytes Response msg 200/REGISTER/cseq=32230 (rdata0x7f9b84009988) from UDP 91.121.129.159:5060:

   SIP/2.0 200 OK

   Call-ID: EZarPAaegxJWYDDaUFn8IMS.fT1ynipE

   Contact: <sip:0033972nnnnnn@192.168.105.26:5060;ob>;expires=300

   CSeq: 32230 REGISTER

   From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb

   To: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=00-07606-0ae69433-66effe766

   Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPj-vQTwMT-eq-zheaUxY7-qZAnQdFKL7ed

   P-Associated-URI: <sip:0972617378@sip3.ovh.fr>

   Server: Cirpack/v4.76 (gw_sip)

   Content-Length: 0





   --end msg--

   16:44:39.055            pjsua_acc.c  ....SIP outbound status for acc 2 is not active

   16:44:39.056            pjsua_acc.c  ....sip:0033972nnnnnn@sip3.ovh.fr: registration success, status=200 (OK), will re-register in 300 seconds

   16:44:39.056            pjsua_acc.c  ....Keep-alive timer started for acc 2, destination:91.121.129.159:5060:15, interval:0s







   +

---===========+

   |       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     |                   |

   +-----------------------------------------------------------------------------+

   |  q  QUIT   L  ReLoad   sleep MS   echo [0|1|txt]     n: detect NAT type     |

   +

---===========+

   You have 0 active call

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: sip:0033661nnnnnn@sip3.ovh.fr 

   16:45:20.251           pjsua_call.c !Making call with acc #2 to sip:0033661nnnnnn@sip3.ovh.fr

   16:45:20.251            pjsua_aud.c  .Set sound device: capture=-1, playback=-2

   16:45:20.251            pjsua_app.c  ..Turning sound device -1 -2 ON

   16:45:20.251            pjsua_aud.c  ..Opening sound device (speaker + mic) PCM@16000/1/20ms

   16:45:20.290       ec0x55ab4f4fdc80  ...AEC created, clock_rate=16000, channel=1, samples per frame=320, tail length=200 ms, latency=0 ms

   16:45:20.290          pjsua_media.c  .Call 0: initializing media..

   16:45:20.290          pjsua_media.c !..RTP socket reachable at 192.168.105.26:4000

   16:45:20.290          pjsua_media.c !..RTCP socket reachable at 192.168.105.26:4001

   16:45:20.290          pjsua_media.c  ..Media index 0 selected for audio call 0

   16:45:20.291           pjsua_core.c  ....TX 1197 bytes Request msg INVITE/cseq=12436 (tdta0x55ab4f597c58) to UDP 91.121.129.159:5060:

   INVITE sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0

   Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjLV1XZ.poXUu0e6ret.J4DNdX74yIG7Qk

   Max-Forwards: 70

   From: sip:0033972nnnnnn@sip3.ovh.fr;tag=5k7dKtZTZPpoK56fFkhEYkfhFPWEO8gd

   To: sip:0033661nnnnnn@sip3.ovh.fr

   Contact: <sip:0033972nnnnnn@192.168.105.26:5060;ob>

   Call-ID: cN.De5mv.0UqSrDLEYaDomHf498ySfMr

   CSeq: 12436 INVITE

   Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

   Supported: replaces, 100rel, timer, norefersub

   Session-Expires: 1800

   Min-SE: 90

   User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

   Content-Type: application/sdp

   Content-Length:   520



   v=0

   o=- 3752495120 3752495120 IN IP4 192.168.105.26

   s=pjmedia

   b=AS:84

   t=0 0

   a=X-nat:0

   m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 9 96

   c=IN IP4 192.168.105.26

   b=TIAS:64000

   a=rtcp:4001 IN IP4 192.168.105.26

   a=sendrecv

   a=rtpmap:98 speex/16000

   a=rtpmap:97 speex/8000

   a=rtpmap:99 speex/32000

   a=rtpmap:104 iLBC/8000

   a=fmtp:104 mode=30

   a=rtpmap:3 GSM/8000

   a=rtpmap:0 PCMU/8000

   a=rtpmap:8 PCMA/8000

   a=rtpmap:9 G722/8000

   a=rtpmap:96 telephone-event/8000

   a=fmtp:96 0-16

   a=ssrc:472429953 cname:6d08069e32850a6a



   --end msg--

   16:45:20.291            pjsua_app.c  .......Call 0 state changed to CALLING

16:45:20.314          pjsua_core.c  .RX 339 bytes Response msg 100/INVITE/cseq=12436 (rdata0x7f9b84009988) from UDP 91.121.129.159:5060:

   SIP/2.0 100 Trying

   Call-ID: cN.De5mv.0UqSrDLEYaDomHf498ySfMr

   CSeq: 12436 INVITE

   From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=5k7dKtZTZPpoK56fFkhEYkfhFPWEO8gd

   To: <sip:0033661nnnnnn@sip3.ovh.fr>

   Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjLV1XZ.poXUu0e6ret.J4DNdX74yIG7Qk

   Content-Length: 0





   --end msg--

   16:45:20.314           pjsua_core.c  .RX 379 bytes Response msg 403/INVITE/cseq=12436 (rdata0x7f9b84009988) from UDP 91.121.129.159:5060:

   SIP/2.0 403 not registered

   Call-ID: cN.De5mv.0UqSrDLEYaDomHf498ySfMr

   CSeq: 12436 INVITE

   From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=5k7dKtZTZPpoK56fFkhEYkfhFPWEO8gd

   To: <sip:0033661nnnnnn@sip3.ovh.fr>;tag=02-21423-716b2aa4-5cfb38d43

   Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjLV1XZ.poXUu0e6ret.J4DNdX74yIG7Qk

   Content-Length: 0





   --end msg--

   16:45:20.314           pjsua_core.c  ..TX 377 bytes Request msg ACK/cseq=12436 (tdta0x7f9b84007268) to UDP 91.121.129.159:5060:

   ACK sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0

   Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjLV1XZ.poXUu0e6ret.J4DNdX74yIG7Qk

   Max-Forwards: 70

   From: sip:0033972nnnnnn@sip3.ovh.fr;tag=5k7dKtZTZPpoK56fFkhEYkfhFPWEO8gd

   To: sip:0033661nnnnnn@sip3.ovh.fr;tag=02-21423-716b2aa4-5cfb38d43

   Call-ID: cN.De5mv.0UqSrDLEYaDomHf498ySfMr

   CSeq: 12436 ACK

   Content-Length:  0





   --end msg--

   16:45:20.314            pjsua_app.c  .....Call 0 is DISCONNECTED [reason=403 (not registered)]

   16:45:20.315     pjsua_app_common.c  .....

     [DISCONNCTD] To: sip:0033661nnnnnn@sip3.ovh.fr

       Call time: 00h:00m:00s, 1st res in 24 ms, conn in 0ms

   16:45:20.315          pjsua_media.c  .....Call 0: deinitializing media..

   16:45:20.315          pjsua_media.c  ......Call 0: cleaning up provisional media, prov_med_cnt=1, med_cnt=0

   16:45:21.315            pjsua_aud.c !Closing sound device after idle for 1 second(s)

   16:45:21.315            pjsua_app.c  .Turning sound device -1 -2 OFF

   16:45:21.315            pjsua_aud.c  .Closing default sound playback device and default sound capture device

,

may be because  sip client is not registered ?

This is from you log:

"....

16:00:26.966           pjsua_core.c  .RX 379 bytes Response msg 403/INVITE/cseq=13359 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: 

            SIP/2.0 403 not registered

......"


From: pjsip <pjsip-bounces@lists.pjsip.org mailto:pjsip-bounces@lists.pjsip.org > on behalf of alain.bonnefoy@ponant-technologies.com mailto:alain.bonnefoy@ponant-technologies.com  <alain.bonnefoy@ponant-technologies.com mailto:alain.bonnefoy@ponant-technologies.com >
Sent: Thursday, November 29, 2018 17:23
To: pjsip@lists.pjsip.org mailto:pjsip@lists.pjsip.org
Subject: [pjsip] How to use pjsua to make a phone call?

Hello,

I try to use pjsua to call a phone number a play a wav file.

I looked at this tuto( http://aminastaneh.net/2012-05-06/fun-with-command-line-sip.html http://aminastaneh.net/2012-05-06/fun-with-command-line-sip.html) which seems to do it successfully, but with a quite old version.

If I try to do like this tuto, I cannot register to my sip account.

Here is the command I use:

./pjsua --config-file ./pjsua_config  <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr

The config file is:

            --id  <sip:0033972nnnnnnnn@sip3.ovh.fr> sip:0033972nnnnnnnn@sip3.ovh.fr

            --registrar  <sip:sip3.ovh.fr> sip:sip3.ovh.fr

            --username 0033972nnnnnnnn

            --password myPasswd

            --realm *

            --null-audio

            --auto-play

            --play-file ./test.wav

and the result is:

            16:00:26.844         os_core_unix.c !pjlib 2.8 for POSIX initialized

            16:00:26.845         sip_endpoint.c  .Creating endpoint instance...

            16:00:26.845                  pjlib  .select() I/O Queue created (0x55ffcb0d37f0)

            16:00:26.845         sip_endpoint.c  .Module "mod-msg-print" registered

            16:00:26.845        sip_transport.c  .Transport manager created.

            16:00:26.845           pjsua_core.c  .PJSUA state changed: NULL --> CREATED

            16:00:26.845         sip_endpoint.c  .Module "mod-pjsua-log" registered

            16:00:26.845         sip_endpoint.c  .Module "mod-tsx-layer" registered

            16:00:26.845         sip_endpoint.c  .Module "mod-stateful-util" registered

            16:00:26.845         sip_endpoint.c  .Module "mod-ua" registered

            16:00:26.845         sip_endpoint.c  .Module "mod-100rel" registered

            16:00:26.845         sip_endpoint.c  .Module "mod-pjsua" registered

            16:00:26.846         sip_endpoint.c  .Module "mod-invite" registered

            16:00:26.938             alsa_dev.c  ..ALSA driver found 32 devices

            16:00:26.938             alsa_dev.c  ..ALSA initialized

            16:00:26.939                  pjlib  ..select() I/O Queue created (0x55ffcb0ed158)

            16:00:26.941         sip_endpoint.c  .Module "mod-evsub" registered

            16:00:26.941         sip_endpoint.c  .Module "mod-presence" registered

            16:00:26.941         sip_endpoint.c  .Module "mod-mwi" registered

            16:00:26.941         sip_endpoint.c  .Module "mod-refer" registered

            16:00:26.941         sip_endpoint.c  .Module "mod-pjsua-pres" registered

            16:00:26.941         sip_endpoint.c  .Module "mod-pjsua-im" registered

            16:00:26.941         sip_endpoint.c  .Module "mod-pjsua-options" registered

            16:00:26.941           pjsua_core.c  .1 SIP worker threads created

            16:00:26.941           pjsua_core.c  .pjsua version 2.8 for Linux-4.15.0.39/x86_64/glibc-2.27 initialized

            16:00:26.941           pjsua_core.c  .PJSUA state changed: CREATED --> INIT

            16:00:26.941         sip_endpoint.c  Module "mod-default-handler" registered

            16:00:26.941            pjsua_aud.c  Creating file player: ./test.wav..

            16:00:26.941           wav_player.c  .File player './test.wav' created: samp.rate=16000, ch=1, bufsize=4KB, filesize=163KB

            16:00:26.941            pjsua_aud.c  .Player created, id=0, slot=1

            16:00:26.941           pjsua_core.c  SIP UDP socket reachable at 192.168.105.26:5060

            16:00:26.941      udp0x55ffcb14bd90  SIP UDP transport started, published address is 192.168.105.26:5060

            16:00:26.942            pjsua_acc.c  Adding account: id=< <sip:192.168.105.26:5060> sip:192.168.105.26:5060>

            16:00:26.942            pjsua_acc.c  .Account < <sip:192.168.105.26:5060> sip:192.168.105.26:5060> added with id 0

            16:00:26.942            pjsua_acc.c  Modifying account 0

            16:00:26.942            pjsua_acc.c  Acc 0: setting online status to 1..

            16:00:26.942            pjsua_acc.c  Adding account: id=sip:0033972617378@sip3.ovh.fr

            16:00:26.942            pjsua_acc.c  .Account  <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr added with id 1

            16:00:26.942            pjsua_acc.c  .Acc 1: setting registration..

            16:00:26.942           pjsua_core.c  ...TX 568 bytes Request msg REGISTER/cseq=20718 (tdta0x55ffcb151698) to UDP 91.121.129.159:5060:

            REGISTER  <sip:sip3.ovh.fr> sip:sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjwZ0eQlyjNoDdLg6UG-Osr8gZFdkQ05JL

            Max-Forwards: 70

            From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            CSeq: 20718 REGISTER

            User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

            Contact: < <sip:0033972nnnnnn@192.168.105.26:5060;ob> sip:0033972nnnnnn@192.168.105.26:5060;ob>

            Expires: 300

            Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

            Content-Length:  0





            --end msg--

            16:00:26.942            pjsua_acc.c  ..Acc 1: Registration sent

            16:00:26.942            pjsua_acc.c  Acc 1: setting online status to 1..

            16:00:26.942           pjsua_pres.c  Adding buddy:  <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr

            16:00:26.942           pjsua_pres.c  .Buddy 0 added.

            16:00:26.942           pjsua_pres.c  ..Buddy 0: updating presence..

            16:00:26.942            pjsua_aud.c  Setting null sound device..

            16:00:26.942            pjsua_app.c  .Turning sound device -99 -99 ON

            16:00:26.942            pjsua_aud.c  .Opening null sound device..

            16:00:26.942           pjsua_core.c  PJSUA state changed: INIT --> STARTING

            16:00:26.942         sip_endpoint.c  .Module "mod-unsolicited-mwi" registered

            16:00:26.942           pjsua_core.c  .PJSUA state changed: STARTING --> RUNNING

            16:00:26.942                 main.c  Ready: Success

            16:00:26.942           pjsua_call.c  Making call with acc #1 to  <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr

            16:00:26.942          pjsua_media.c  .Call 0: initializing media..

            16:00:26.942          pjsua_media.c  ..RTP socket reachable at 192.168.105.26:4000

            16:00:26.942          pjsua_media.c  ..RTCP socket reachable at 192.168.105.26:4001

            16:00:26.942          pjsua_media.c  ..Media index 0 selected for audio call 0

            16:00:26.942           pjsua_core.c  ....TX 1198 bytes Request msg INVITE/cseq=13359 (tdta0x55ffcb16b4a8) to UDP 91.121.129.159:5060:

            INVITE  <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc

            Max-Forwards: 70

            From:  <sip:0033972nnnnnn@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY> sip:0033972nnnnnn@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY

            To:  <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr

            Contact: < <sip:003397nnnnnn@192.168.105.26:5060;ob> sip:003397nnnnnn@192.168.105.26:5060;ob>

            Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO

            CSeq: 13359 INVITE

            Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

            Supported: replaces, 100rel, timer, norefersub

            Session-Expires: 1800

            Min-SE: 90

            User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

            Content-Type: application/sdp

            Content-Length:   521



            v=0

            o=- 3752492426 3752492426 IN IP4 192.168.105.26

            s=pjmedia

            b=AS:84

            t=0 0

            a=X-nat:0

            m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 9 96

            c=IN IP4 192.168.105.26

            b=TIAS:64000

            a=rtcp:4001 IN IP4 192.168.105.26

            a=sendrecv

            a=rtpmap:98 speex/16000

            a=rtpmap:97 speex/8000

            a=rtpmap:99 speex/32000

            a=rtpmap:104 iLBC/8000

            a=fmtp:104 mode=30

            a=rtpmap:3 GSM/8000

            a=rtpmap:0 PCMU/8000

            a=rtpmap:8 PCMA/8000

            a=rtpmap:9 G722/8000

            a=rtpmap:96 telephone-event/8000

            a=fmtp:96 0-16

            a=ssrc:1011957511 cname:75cedd633ab5e97d



            --end msg--

            16:00:26.942            pjsua_app.c  .......Call 0 state changed to CALLING
            Account list:

              [ 0] < <sip:192.168.105.26:5060> sip:192.168.105.26:5060>: does not register

                   Online status: Online

            *[ 1]  <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr: 100/In Progress (expires=0)

                   Online status: Online

            Buddy list:

            [ 1] <?>   <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr



            +

---===========+

            |       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     |                   |

            +-----------------------------------------------------------------------------+

            |  q  QUIT   L  ReLoad   sleep MS   echo [0|1|txt]     n: detect NAT type     |

            +

---===========+

            You have 1 active call

            Current call id=0 to  <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr [CALLING]

16:00:26.966          pjsua_core.c  .RX 341 bytes Response msg 100/REGISTER/cseq=20718 (rdata0x55ffcb14d818) from UDP 91.121.129.159:5060:

            SIP/2.0 100 Trying

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            CSeq: 20718 REGISTER

            From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjwZ0eQlyjNoDdLg6UG-Osr8gZFdkQ05JL

            Content-Length: 0





            --end msg--

            16:00:26.966           pjsua_core.c  .RX 339 bytes Response msg 100/INVITE/cseq=13359 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 100 Trying

            Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO

            CSeq: 13359 INVITE

            From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY

            To: < <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr>

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc

            Content-Length: 0





            --end msg--

            16:00:26.966           pjsua_core.c  .RX 379 bytes Response msg 403/INVITE/cseq=13359 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 403 not registered

            Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO

            CSeq: 13359 INVITE

            From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY

            To: < <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr>;tag=02-22581-7130a9fb-6f8a0a441

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc

            Content-Length: 0





            --end msg--

            16:00:26.966           pjsua_core.c  ..TX 377 bytes Request msg ACK/cseq=13359 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060:

            ACK  <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc

            Max-Forwards: 70

            From:  <sip:0033972nnnnnn@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY> sip:0033972nnnnnn@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY

            To:  <sip:0033661nnnnnn@sip3.ovh.fr;tag=02-22581-7130a9fb-6f8a0a441> sip:0033661nnnnnn@sip3.ovh.fr;tag=02-22581-7130a9fb-6f8a0a441

            Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO

            CSeq: 13359 ACK

            Content-Length:  0





            --end msg--

            16:00:26.967            pjsua_app.c  .....Call 0 is DISCONNECTED [reason=403 (not registered)]

            16:00:26.967     pjsua_app_common.c  .....

              [DISCONNCTD] To:  <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr

                Call time: 00h:00m:00s, 1st res in 25 ms, conn in 0ms

            16:00:26.967          pjsua_media.c  .....Call 0: deinitializing media..

            16:00:26.967          pjsua_media.c  ......Call 0: cleaning up provisional media, prov_med_cnt=1, med_cnt=0

            16:00:26.969           pjsua_core.c  .RX 549 bytes Response msg 401/REGISTER/cseq=20718 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 401 Unauthorized

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            CSeq: 20718 REGISTER

            From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=00-07686-08f654bc-4d18b7a46

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjwZ0eQlyjNoDdLg6UG-Osr8gZFdkQ05JL

            WWW-Authenticate: Digest realm="sip3.ovh.fr",nonce="08f64a24258ffbd7790be25e506a8b45",opaque="08f232dd5578250",stale=false,algorithm=MD5

            Server: Cirpack/v4.76 (gw_sip)

            Content-Length: 0





            --end msg--

            16:00:26.970           pjsua_core.c  ....TX 788 bytes Request msg REGISTER/cseq=20719 (tdta0x55ffcb151698) to UDP 91.121.129.159:5060:

            REGISTER  <sip:sip3.ovh.fr> sip:sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjUpk6GULmUTzkGVjYXebYbqOKZo3mjF83

            Max-Forwards: 70

            From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To: < <sip:0033972nnnnnnn@sip3.ovh.fr> sip:0033972nnnnnnn@sip3.ovh.fr>

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            CSeq: 20719 REGISTER

            User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

            Contact: < <sip:0033972nnnnnn@192.168.105.26:5060;ob> sip:0033972nnnnnn@192.168.105.26:5060;ob>

            Expires: 300

            Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

            Authorization: Digest username="0033972nnnnnnnn", realm="sip3.ovh.fr", nonce="08f64a24258ffbd7790be25e506a8b45", uri=" <sip:sip3.ovh.fr> sip:sip3.ovh.fr", response="1aa4dc5667db77e63ab8d15817a95474", algorithm=MD5, opaque="08f232dd5578250"

            Content-Length:  0





            --end msg--

            16:00:26.993           pjsua_core.c  .RX 341 bytes Response msg 100/REGISTER/cseq=20719 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 100 Trying

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            CSeq: 20719 REGISTER

            From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjUpk6GULmUTzkGVjYXebYbqOKZo3mjF83

            Content-Length: 0





            --end msg--

            16:00:27.045           pjsua_core.c  .RX 514 bytes Response msg 200/REGISTER/cseq=20719 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 200 OK

            Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV

            Contact: < <sip:0033972nnnnnn@192.168.105.26:5060;ob> sip:0033972nnnnnn@192.168.105.26:5060;ob>;expires=300

            CSeq: 20719 REGISTER

            From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa

            To: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=00-07755-08f654c7-0470b8783

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjUpk6GULmUTzkGVjYXebYbqOKZo3mjF83

            P-Associated-URI: < <sip:097nnnnnn@sip3.ovh.fr> sip:097nnnnnn@sip3.ovh.fr>

            Server: Cirpack/v4.76 (gw_sip)

            Content-Length: 0





            --end msg--

            16:00:27.045            pjsua_acc.c  ....SIP outbound status for acc 1 is not active

            16:00:27.045            pjsua_acc.c  ....sip:0033972nnnnnn@sip3.ovh.fr: registration success, status=200 (OK), will re-register in 300 seconds

            16:00:27.045            pjsua_acc.c  ....Keep-alive timer started for acc 1, destination:91.121.129.159:5060:15, interval:0s

            16:00:27.942            pjsua_aud.c  Closing sound device after idle for 1 second(s)

            16:00:27.942            pjsua_app.c  .Turning sound device -99 -99 OFF

            16:00:27.942            pjsua_aud.c  .Closing null sound device..

I fact I wonder if pjsua takes care to register before calling the given URI.

So to make another test, once in pjsua I hit m, and enter sip:0033661nnnnnn@sip3.ovh.fr, and I get the following result:

            16:03:31.129           pjsua_call.c !Making call with acc #1 to  <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr

            16:03:31.129            pjsua_aud.c  .Set sound device: capture=-99, playback=-99

            16:03:31.129            pjsua_aud.c  ..Setting null sound device..

            16:03:31.129            pjsua_app.c  ...Turning sound device -99 -99 ON

            16:03:31.129            pjsua_aud.c  ...Opening null sound device..

            16:03:31.129          pjsua_media.c  .Call 2: initializing media..

            16:03:31.129          pjsua_media.c  ..RTP socket reachable at 192.168.105.26:4002

            16:03:31.129          pjsua_media.c  ..RTCP socket reachable at 192.168.105.26:4003

            16:03:31.129          pjsua_media.c  ..Media index 0 selected for audio call 2

            16:03:31.130           pjsua_core.c  ....TX 1197 bytes Request msg INVITE/cseq=25951 (tdta0x55ffcb14daa8) to UDP 91.121.129.159:5060:

            INVITE  <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Max-Forwards: 70

            From:  <sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv> sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To:  <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr

            Contact: < <sip:0033972nnnnnn@192.168.105.26:5060;ob> sip:0033972nnnnnn@192.168.105.26:5060;ob>

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

            Supported: replaces, 100rel, timer, norefersub

            Session-Expires: 1800

            Min-SE: 90

            User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

            Content-Type: application/sdp

            Content-Length:   520



            v=0

            o=- 3752492611 3752492611 IN IP4 192.168.105.26

            s=pjmedia

            b=AS:84

            t=0 0

            a=X-nat:0

            m=audio 4002 RTP/AVP 98 97 99 104 3 0 8 9 96

            c=IN IP4 192.168.105.26

            b=TIAS:64000

            a=rtcp:4003 IN IP4 192.168.105.26

            a=sendrecv

            a=rtpmap:98 speex/16000

            a=rtpmap:97 speex/8000

            a=rtpmap:99 speex/32000

            a=rtpmap:104 iLBC/8000

            a=fmtp:104 mode=30

            a=rtpmap:3 GSM/8000

            a=rtpmap:0 PCMU/8000

            a=rtpmap:8 PCMA/8000

            a=rtpmap:9 G722/8000

            a=rtpmap:96 telephone-event/8000

            a=fmtp:96 0-16

            a=ssrc:281817610 cname:6551173f0b0e5f0f



            --end msg--

            16:03:31.130            pjsua_app.c  .......Call 2 state changed to CALLING

16:03:31.155          pjsua_core.c  .RX 339 bytes Response msg 100/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 100 Trying

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To: < <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr>

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Content-Length: 0





            --end msg--

            16:03:31.155           pjsua_core.c  .RX 379 bytes Response msg 403/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 403 not registered

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To: < <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr>;tag=02-24827-7134b08a-07f4e44f1

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Content-Length: 0





            --end msg--

            16:03:31.155           pjsua_core.c  ..TX 377 bytes Request msg ACK/cseq=25951 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060:

            ACK  <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Max-Forwards: 70

            From:  <sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv> sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To:  <sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1> sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 ACK

            Content-Length:  0





            --end msg--

            16:03:31.155            pjsua_app.c  .....Call 2 is DISCONNECTED [reason=403 (not registered)]

            16:03:31.155     pjsua_app_common.c  .....

              [DISCONNCTD] To:  <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr

                Call time: 00h:00m:00s, 1st res in 26 ms, conn in 0ms

            16:03:31.155          pjsua_media.c  .....Call 2: deinitializing media..

            16:03:31.155          pjsua_media.c  ......Call 2: cleaning up provisional media, prov_med_cnt=1, med_cnt=0

            16:03:32.156            pjsua_aud.c  Closing sound device after idle for 1 second(s)

            16:03:32.156            pjsua_app.c  .Turning sound device -99 -99 OFF

            16:03:32.156            pjsua_aud.c  .Closing null sound device..

                           16:03:31.129           pjsua_call.c !Making call with acc #1 to  <sip:00336619nnnnnn@sip3.ovh.fr> sip:00336619nnnnnn@sip3.ovh.fr

            16:03:31.129            pjsua_aud.c  .Set sound device: capture=-99, playback=-99

            16:03:31.129            pjsua_aud.c  ..Setting null sound device..

            16:03:31.129            pjsua_app.c  ...Turning sound device -99 -99 ON

            16:03:31.129            pjsua_aud.c  ...Opening null sound device..

            16:03:31.129          pjsua_media.c  .Call 2: initializing media..

            16:03:31.129          pjsua_media.c  ..RTP socket reachable at 192.168.105.26:4002

            16:03:31.129          pjsua_media.c  ..RTCP socket reachable at 192.168.105.26:4003

            16:03:31.129          pjsua_media.c  ..Media index 0 selected for audio call 2

            16:03:31.130           pjsua_core.c  ....TX 1197 bytes Request msg INVITE/cseq=25951 (tdta0x55ffcb14daa8) to UDP 91.121.129.159:5060:

            INVITE  <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Max-Forwards: 70

            From:  <sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv> sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To:  <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr

            Contact: < <sip:0033972nnnnnn@192.168.105.26:5060;ob> sip:0033972nnnnnn@192.168.105.26:5060;ob>

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

            Supported: replaces, 100rel, timer, norefersub

            Session-Expires: 1800

            Min-SE: 90

            User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27

            Content-Type: application/sdp

            Content-Length:   520



            v=0

            o=- 3752492611 3752492611 IN IP4 192.168.105.26

            s=pjmedia

            b=AS:84

            t=0 0

            a=X-nat:0

            m=audio 4002 RTP/AVP 98 97 99 104 3 0 8 9 96

            c=IN IP4 192.168.105.26

            b=TIAS:64000

            a=rtcp:4003 IN IP4 192.168.105.26

            a=sendrecv

            a=rtpmap:98 speex/16000

            a=rtpmap:97 speex/8000

            a=rtpmap:99 speex/32000

            a=rtpmap:104 iLBC/8000

            a=fmtp:104 mode=30

            a=rtpmap:3 GSM/8000

            a=rtpmap:0 PCMU/8000

            a=rtpmap:8 PCMA/8000

            a=rtpmap:9 G722/8000

            a=rtpmap:96 telephone-event/8000

            a=fmtp:96 0-16

            a=ssrc:281817610 cname:6551173f0b0e5f0f



            --end msg--

            16:03:31.130            pjsua_app.c  .......Call 2 state changed to CALLING

16:03:31.155          pjsua_core.c  .RX 339 bytes Response msg 100/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 100 Trying

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To: < <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr>

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Content-Length: 0





            --end msg--

            16:03:31.155           pjsua_core.c  .RX 379 bytes Response msg 403/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060:

            SIP/2.0 403 not registered

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 INVITE

            From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To: < <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr>;tag=02-24827-7134b08a-07f4e44f1

            Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Content-Length: 0





            --end msg--

            16:03:31.155           pjsua_core.c  ..TX 377 bytes Request msg ACK/cseq=25951 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060:

            ACK  <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0

            Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8

            Max-Forwards: 70

            From:  <sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv> sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv

            To:  <sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1> sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1

            Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw

            CSeq: 25951 ACK

            Content-Length:  0





            --end msg--

            16:03:31.155            pjsua_app.c  .....Call 2 is DISCONNECTED [reason=403 (not registered)]

            16:03:31.155     pjsua_app_common.c  .....

              [DISCONNCTD] To:  <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr

                Call time: 00h:00m:00s, 1st res in 26 ms, conn in 0ms

            16:03:31.155          pjsua_media.c  .....Call 2: deinitializing media..

            16:03:31.155          pjsua_media.c  ......Call 2: cleaning up provisional media, prov_med_cnt=1, med_cnt=0

            16:03:32.156            pjsua_aud.c  Closing sound device after idle for 1 second(s)

            16:03:32.156            pjsua_app.c  .Turning sound device -99 -99 OFF

            16:03:32.156            pjsua_aud.c  .Closing null sound device..



            

What is this Call 2 is DISCONNECTED [reason=403 (not registered)] message?

Could you tell me what's wrong?

Regards ,

Alain

Ok thanks for your answer but it’s exactly what I’d like to understand : Here is what I exactly did after starting pjsua : First I register, i’ts done successfully and than I make a call which fails and tells ‘not registered’ : $ ./pjsua-x86_64-unknown-linux-gnu 16:43:53.666 os_core_unix.c !pjlib 2.8 for POSIX initialized 16:43:53.668 sip_endpoint.c .Creating endpoint instance... 16:43:53.669 pjlib .select() I/O Queue created (0x55ab4f4d27f0) 16:43:53.669 sip_endpoint.c .Module "mod-msg-print" registered 16:43:53.669 sip_transport.c .Transport manager created. 16:43:53.669 pjsua_core.c .PJSUA state changed: NULL --> CREATED 16:43:53.670 sip_endpoint.c .Module "mod-pjsua-log" registered 16:43:53.670 sip_endpoint.c .Module "mod-tsx-layer" registered 16:43:53.670 sip_endpoint.c .Module "mod-stateful-util" registered 16:43:53.670 sip_endpoint.c .Module "mod-ua" registered 16:43:53.670 sip_endpoint.c .Module "mod-100rel" registered 16:43:53.670 sip_endpoint.c .Module "mod-pjsua" registered 16:43:53.670 sip_endpoint.c .Module "mod-invite" registered 16:43:53.754 alsa_dev.c ..ALSA driver found 32 devices 16:43:53.755 alsa_dev.c ..ALSA initialized 16:43:53.755 pjlib ..select() I/O Queue created (0x55ab4f55bc88) 16:43:53.758 sip_endpoint.c .Module "mod-evsub" registered 16:43:53.758 sip_endpoint.c .Module "mod-presence" registered 16:43:53.758 sip_endpoint.c .Module "mod-mwi" registered 16:43:53.758 sip_endpoint.c .Module "mod-refer" registered 16:43:53.758 sip_endpoint.c .Module "mod-pjsua-pres" registered 16:43:53.758 sip_endpoint.c .Module "mod-pjsua-im" registered 16:43:53.758 sip_endpoint.c .Module "mod-pjsua-options" registered 16:43:53.758 pjsua_core.c .1 SIP worker threads created 16:43:53.758 pjsua_core.c .pjsua version 2.8 for Linux-4.15.0.39/x86_64/glibc-2.27 initialized 16:43:53.758 pjsua_core.c .PJSUA state changed: CREATED --> INIT 16:43:53.758 sip_endpoint.c Module "mod-default-handler" registered 16:43:53.758 pjsua_core.c SIP UDP socket reachable at 192.168.105.26:5060 16:43:53.758 udp0x55ab4f53c450 SIP UDP transport started, published address is 192.168.105.26:5060 16:43:53.758 pjsua_acc.c Adding account: id=<sip:192.168.105.26:5060> 16:43:53.758 pjsua_acc.c .Account <sip:192.168.105.26:5060> added with id 0 16:43:53.758 pjsua_acc.c Modifying account 0 16:43:53.758 pjsua_acc.c Acc 0: setting online status to 1.. 16:43:53.758 tcptp:5060 SIP TCP listener ready for incoming connections at 192.168.105.26:5060 16:43:53.758 pjsua_acc.c Adding account: id=<sip:192.168.105.26:5060;transport=TCP> 16:43:53.758 pjsua_acc.c .Account <sip:192.168.105.26:5060;transport=TCP> added with id 1 16:43:53.758 pjsua_acc.c Modifying account 1 16:43:53.758 pjsua_acc.c Acc 1: setting online status to 1.. 16:43:53.758 pjsua_core.c PJSUA state changed: INIT --> STARTING 16:43:53.758 sip_endpoint.c .Module "mod-unsolicited-mwi" registered 16:43:53.758 pjsua_core.c .PJSUA state changed: STARTING --> RUNNING 16:43:53.758 main.c Ready: Success >>>> Account list: [ 0] <sip:192.168.105.26:5060>: does not register Online status: Online *[ 1] <sip:192.168.105.26:5060;transport=TCP>: does not register 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 | 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 | | +-----------------------------------------------------------------------------+ | q QUIT L ReLoad sleep MS echo [0|1|txt] n: detect NAT type | +=============================================================================+ You have 0 active call >>> +a Your SIP URL: (empty to cancel): sip:0033972nnnnnn@sip3.ovh.fr URL of the registrar: (empty to cancel): sip:sip3.ovh.fr Auth Realm: (empty to cancel): * Auth Username: (empty to cancel): 0033972nnnnnn Auth Password: (empty to cancel): mypasswd 16:44:38.922 pjsua_acc.c Adding account: id=sip:0033972nnnnnn@sip3.ovh.fr 16:44:38.922 pjsua_acc.c .Account sip:0033972nnnnnn@sip3.ovh.fr added with id 2 16:44:38.922 pjsua_acc.c .Acc 2: setting registration.. 16:44:38.950 pjsua_core.c ...TX 568 bytes Request msg REGISTER/cseq=32229 (tdta0x55ab4f542bc8) to UDP 91.121.129.159:5060: REGISTER sip:sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjIR29GPvvEm8AWC5s1qV4EKMviO-3wRim Max-Forwards: 70 From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb To: <sip:0033972nnnnnn@sip3.ovh.fr> Call-ID: EZarPAaegxJWYDDaUFn8IMS.fT1ynipE CSeq: 32229 REGISTER User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Contact: <sip:0033972nnnnnn@192.168.105.26:5060;ob> Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Content-Length: 0 --end msg-- 16:44:38.950 pjsua_acc.c ..Acc 2: Registration sent >>> 16:44:38.974 pjsua_core.c .RX 341 bytes Response msg 100/REGISTER/cseq=32229 (rdata0x55ab4f53ded8) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: EZarPAaegxJWYDDaUFn8IMS.fT1ynipE CSeq: 32229 REGISTER From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb To: <sip:0033972nnnnnn@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjIR29GPvvEm8AWC5s1qV4EKMviO-3wRim Content-Length: 0 --end msg-- 16:44:38.996 pjsua_core.c .RX 549 bytes Response msg 401/REGISTER/cseq=32229 (rdata0x7f9b84009988) from UDP 91.121.129.159:5060: SIP/2.0 401 Unauthorized Call-ID: EZarPAaegxJWYDDaUFn8IMS.fT1ynipE CSeq: 32229 REGISTER From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb To: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=00-08027-0ae69417-6950486d5 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjIR29GPvvEm8AWC5s1qV4EKMviO-3wRim WWW-Authenticate: Digest realm="sip3.ovh.fr",nonce="0ae6882d0ce42861705875534fdfc7d4",opaque="0ae410ed63e0dd3",stale=false,algorithm=MD5 Server: Cirpack/v4.76 (gw_sip) Content-Length: 0 --end msg-- 16:44:38.996 pjsua_core.c ....TX 788 bytes Request msg REGISTER/cseq=32230 (tdta0x55ab4f542bc8) to UDP 91.121.129.159:5060: REGISTER sip:sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPj-vQTwMT-eq-zheaUxY7-qZAnQdFKL7ed Max-Forwards: 70 From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb To: <sip:0033972nnnnnn@sip3.ovh.fr> Call-ID: EZarPAaegxJWYDDaUFn8IMS.fT1ynipE CSeq: 32230 REGISTER User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Contact: <sip:0033972nnnnnn@192.168.105.26:5060;ob> Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Authorization: Digest username="0033972nnnnnn", realm="sip3.ovh.fr", nonce="0ae6882d0ce42861705875534fdfc7d4", uri="sip:sip3.ovh.fr", response="e70170dacab9d6f6f4d079c3d2a7165a", algorithm=MD5, opaque="0ae410ed63e0dd3" Content-Length: 0 --end msg-- 16:44:39.020 pjsua_core.c .RX 341 bytes Response msg 100/REGISTER/cseq=32230 (rdata0x7f9b84009988) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: EZarPAaegxJWYDDaUFn8IMS.fT1ynipE CSeq: 32230 REGISTER From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb To: <sip:0033972nnnnnn@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPj-vQTwMT-eq-zheaUxY7-qZAnQdFKL7ed Content-Length: 0 --end msg-- 16:44:39.055 pjsua_core.c .RX 514 bytes Response msg 200/REGISTER/cseq=32230 (rdata0x7f9b84009988) from UDP 91.121.129.159:5060: SIP/2.0 200 OK Call-ID: EZarPAaegxJWYDDaUFn8IMS.fT1ynipE Contact: <sip:0033972nnnnnn@192.168.105.26:5060;ob>;expires=300 CSeq: 32230 REGISTER From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb To: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=00-07606-0ae69433-66effe766 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPj-vQTwMT-eq-zheaUxY7-qZAnQdFKL7ed P-Associated-URI: <sip:0972617378@sip3.ovh.fr> Server: Cirpack/v4.76 (gw_sip) Content-Length: 0 --end msg-- 16:44:39.055 pjsua_acc.c ....SIP outbound status for acc 2 is not active 16:44:39.056 pjsua_acc.c ....sip:0033972nnnnnn@sip3.ovh.fr: registration success, status=200 (OK), will re-register in 300 seconds 16:44:39.056 pjsua_acc.c ....Keep-alive timer started for acc 2, destination:91.121.129.159:5060:15, interval:0s +=============================================================================+ | 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 | | +-----------------------------------------------------------------------------+ | q QUIT L ReLoad sleep MS echo [0|1|txt] n: detect NAT type | +=============================================================================+ You have 0 active call >>> 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: sip:0033661nnnnnn@sip3.ovh.fr 16:45:20.251 pjsua_call.c !Making call with acc #2 to sip:0033661nnnnnn@sip3.ovh.fr 16:45:20.251 pjsua_aud.c .Set sound device: capture=-1, playback=-2 16:45:20.251 pjsua_app.c ..Turning sound device -1 -2 ON 16:45:20.251 pjsua_aud.c ..Opening sound device (speaker + mic) PCM@16000/1/20ms 16:45:20.290 ec0x55ab4f4fdc80 ...AEC created, clock_rate=16000, channel=1, samples per frame=320, tail length=200 ms, latency=0 ms 16:45:20.290 pjsua_media.c .Call 0: initializing media.. 16:45:20.290 pjsua_media.c !..RTP socket reachable at 192.168.105.26:4000 16:45:20.290 pjsua_media.c !..RTCP socket reachable at 192.168.105.26:4001 16:45:20.290 pjsua_media.c ..Media index 0 selected for audio call 0 16:45:20.291 pjsua_core.c ....TX 1197 bytes Request msg INVITE/cseq=12436 (tdta0x55ab4f597c58) to UDP 91.121.129.159:5060: INVITE sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjLV1XZ.poXUu0e6ret.J4DNdX74yIG7Qk Max-Forwards: 70 From: sip:0033972nnnnnn@sip3.ovh.fr;tag=5k7dKtZTZPpoK56fFkhEYkfhFPWEO8gd To: sip:0033661nnnnnn@sip3.ovh.fr Contact: <sip:0033972nnnnnn@192.168.105.26:5060;ob> Call-ID: cN.De5mv.0UqSrDLEYaDomHf498ySfMr CSeq: 12436 INVITE Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Supported: replaces, 100rel, timer, norefersub Session-Expires: 1800 Min-SE: 90 User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Content-Type: application/sdp Content-Length: 520 v=0 o=- 3752495120 3752495120 IN IP4 192.168.105.26 s=pjmedia b=AS:84 t=0 0 a=X-nat:0 m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 9 96 c=IN IP4 192.168.105.26 b=TIAS:64000 a=rtcp:4001 IN IP4 192.168.105.26 a=sendrecv a=rtpmap:98 speex/16000 a=rtpmap:97 speex/8000 a=rtpmap:99 speex/32000 a=rtpmap:104 iLBC/8000 a=fmtp:104 mode=30 a=rtpmap:3 GSM/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:9 G722/8000 a=rtpmap:96 telephone-event/8000 a=fmtp:96 0-16 a=ssrc:472429953 cname:6d08069e32850a6a --end msg-- 16:45:20.291 pjsua_app.c .......Call 0 state changed to CALLING >>> 16:45:20.314 pjsua_core.c .RX 339 bytes Response msg 100/INVITE/cseq=12436 (rdata0x7f9b84009988) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: cN.De5mv.0UqSrDLEYaDomHf498ySfMr CSeq: 12436 INVITE From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=5k7dKtZTZPpoK56fFkhEYkfhFPWEO8gd To: <sip:0033661nnnnnn@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjLV1XZ.poXUu0e6ret.J4DNdX74yIG7Qk Content-Length: 0 --end msg-- 16:45:20.314 pjsua_core.c .RX 379 bytes Response msg 403/INVITE/cseq=12436 (rdata0x7f9b84009988) from UDP 91.121.129.159:5060: SIP/2.0 403 not registered Call-ID: cN.De5mv.0UqSrDLEYaDomHf498ySfMr CSeq: 12436 INVITE From: <sip:0033972nnnnnn@sip3.ovh.fr>;tag=5k7dKtZTZPpoK56fFkhEYkfhFPWEO8gd To: <sip:0033661nnnnnn@sip3.ovh.fr>;tag=02-21423-716b2aa4-5cfb38d43 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjLV1XZ.poXUu0e6ret.J4DNdX74yIG7Qk Content-Length: 0 --end msg-- 16:45:20.314 pjsua_core.c ..TX 377 bytes Request msg ACK/cseq=12436 (tdta0x7f9b84007268) to UDP 91.121.129.159:5060: ACK sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjLV1XZ.poXUu0e6ret.J4DNdX74yIG7Qk Max-Forwards: 70 From: sip:0033972nnnnnn@sip3.ovh.fr;tag=5k7dKtZTZPpoK56fFkhEYkfhFPWEO8gd To: sip:0033661nnnnnn@sip3.ovh.fr;tag=02-21423-716b2aa4-5cfb38d43 Call-ID: cN.De5mv.0UqSrDLEYaDomHf498ySfMr CSeq: 12436 ACK Content-Length: 0 --end msg-- 16:45:20.314 pjsua_app.c .....Call 0 is DISCONNECTED [reason=403 (not registered)] 16:45:20.315 pjsua_app_common.c ..... [DISCONNCTD] To: sip:0033661nnnnnn@sip3.ovh.fr Call time: 00h:00m:00s, 1st res in 24 ms, conn in 0ms 16:45:20.315 pjsua_media.c .....Call 0: deinitializing media.. 16:45:20.315 pjsua_media.c ......Call 0: cleaning up provisional media, prov_med_cnt=1, med_cnt=0 16:45:21.315 pjsua_aud.c !Closing sound device after idle for 1 second(s) 16:45:21.315 pjsua_app.c .Turning sound device -1 -2 OFF 16:45:21.315 pjsua_aud.c .Closing default sound playback device and default sound capture device ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- , may be because sip client is not registered ? This is from you log: ".... 16:00:26.966 pjsua_core.c .RX 379 bytes Response msg 403/INVITE/cseq=13359 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 403 not registered ......" _____ From: pjsip <pjsip-bounces@lists.pjsip.org <mailto:pjsip-bounces@lists.pjsip.org> > on behalf of alain.bonnefoy@ponant-technologies.com <mailto:alain.bonnefoy@ponant-technologies.com> <alain.bonnefoy@ponant-technologies.com <mailto:alain.bonnefoy@ponant-technologies.com> > Sent: Thursday, November 29, 2018 17:23 To: pjsip@lists.pjsip.org <mailto:pjsip@lists.pjsip.org> Subject: [pjsip] How to use pjsua to make a phone call? Hello, I try to use pjsua to call a phone number a play a wav file. I looked at this tuto( <http://aminastaneh.net/2012-05-06/fun-with-command-line-sip.html> http://aminastaneh.net/2012-05-06/fun-with-command-line-sip.html) which seems to do it successfully, but with a quite old version. If I try to do like this tuto, I cannot register to my sip account. Here is the command I use: ./pjsua --config-file ./pjsua_config <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr The config file is: --id <sip:0033972nnnnnnnn@sip3.ovh.fr> sip:0033972nnnnnnnn@sip3.ovh.fr --registrar <sip:sip3.ovh.fr> sip:sip3.ovh.fr --username 0033972nnnnnnnn --password myPasswd --realm * --null-audio --auto-play --play-file ./test.wav and the result is: 16:00:26.844 os_core_unix.c !pjlib 2.8 for POSIX initialized 16:00:26.845 sip_endpoint.c .Creating endpoint instance... 16:00:26.845 pjlib .select() I/O Queue created (0x55ffcb0d37f0) 16:00:26.845 sip_endpoint.c .Module "mod-msg-print" registered 16:00:26.845 sip_transport.c .Transport manager created. 16:00:26.845 pjsua_core.c .PJSUA state changed: NULL --> CREATED 16:00:26.845 sip_endpoint.c .Module "mod-pjsua-log" registered 16:00:26.845 sip_endpoint.c .Module "mod-tsx-layer" registered 16:00:26.845 sip_endpoint.c .Module "mod-stateful-util" registered 16:00:26.845 sip_endpoint.c .Module "mod-ua" registered 16:00:26.845 sip_endpoint.c .Module "mod-100rel" registered 16:00:26.845 sip_endpoint.c .Module "mod-pjsua" registered 16:00:26.846 sip_endpoint.c .Module "mod-invite" registered 16:00:26.938 alsa_dev.c ..ALSA driver found 32 devices 16:00:26.938 alsa_dev.c ..ALSA initialized 16:00:26.939 pjlib ..select() I/O Queue created (0x55ffcb0ed158) 16:00:26.941 sip_endpoint.c .Module "mod-evsub" registered 16:00:26.941 sip_endpoint.c .Module "mod-presence" registered 16:00:26.941 sip_endpoint.c .Module "mod-mwi" registered 16:00:26.941 sip_endpoint.c .Module "mod-refer" registered 16:00:26.941 sip_endpoint.c .Module "mod-pjsua-pres" registered 16:00:26.941 sip_endpoint.c .Module "mod-pjsua-im" registered 16:00:26.941 sip_endpoint.c .Module "mod-pjsua-options" registered 16:00:26.941 pjsua_core.c .1 SIP worker threads created 16:00:26.941 pjsua_core.c .pjsua version 2.8 for Linux-4.15.0.39/x86_64/glibc-2.27 initialized 16:00:26.941 pjsua_core.c .PJSUA state changed: CREATED --> INIT 16:00:26.941 sip_endpoint.c Module "mod-default-handler" registered 16:00:26.941 pjsua_aud.c Creating file player: ./test.wav.. 16:00:26.941 wav_player.c .File player './test.wav' created: samp.rate=16000, ch=1, bufsize=4KB, filesize=163KB 16:00:26.941 pjsua_aud.c .Player created, id=0, slot=1 16:00:26.941 pjsua_core.c SIP UDP socket reachable at 192.168.105.26:5060 16:00:26.941 udp0x55ffcb14bd90 SIP UDP transport started, published address is 192.168.105.26:5060 16:00:26.942 pjsua_acc.c Adding account: id=< <sip:192.168.105.26:5060> sip:192.168.105.26:5060> 16:00:26.942 pjsua_acc.c .Account < <sip:192.168.105.26:5060> sip:192.168.105.26:5060> added with id 0 16:00:26.942 pjsua_acc.c Modifying account 0 16:00:26.942 pjsua_acc.c Acc 0: setting online status to 1.. 16:00:26.942 pjsua_acc.c Adding account: id=sip:0033972617378@sip3.ovh.fr 16:00:26.942 pjsua_acc.c .Account <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr added with id 1 16:00:26.942 pjsua_acc.c .Acc 1: setting registration.. 16:00:26.942 pjsua_core.c ...TX 568 bytes Request msg REGISTER/cseq=20718 (tdta0x55ffcb151698) to UDP 91.121.129.159:5060: REGISTER <sip:sip3.ovh.fr> sip:sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjwZ0eQlyjNoDdLg6UG-Osr8gZFdkQ05JL Max-Forwards: 70 From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr> Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV CSeq: 20718 REGISTER User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Contact: < <sip:0033972nnnnnn@192.168.105.26:5060;ob> sip:0033972nnnnnn@192.168.105.26:5060;ob> Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Content-Length: 0 --end msg-- 16:00:26.942 pjsua_acc.c ..Acc 1: Registration sent 16:00:26.942 pjsua_acc.c Acc 1: setting online status to 1.. 16:00:26.942 pjsua_pres.c Adding buddy: <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr 16:00:26.942 pjsua_pres.c .Buddy 0 added. 16:00:26.942 pjsua_pres.c ..Buddy 0: updating presence.. 16:00:26.942 pjsua_aud.c Setting null sound device.. 16:00:26.942 pjsua_app.c .Turning sound device -99 -99 ON 16:00:26.942 pjsua_aud.c .Opening null sound device.. 16:00:26.942 pjsua_core.c PJSUA state changed: INIT --> STARTING 16:00:26.942 sip_endpoint.c .Module "mod-unsolicited-mwi" registered 16:00:26.942 pjsua_core.c .PJSUA state changed: STARTING --> RUNNING 16:00:26.942 main.c Ready: Success 16:00:26.942 pjsua_call.c Making call with acc #1 to <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr 16:00:26.942 pjsua_media.c .Call 0: initializing media.. 16:00:26.942 pjsua_media.c ..RTP socket reachable at 192.168.105.26:4000 16:00:26.942 pjsua_media.c ..RTCP socket reachable at 192.168.105.26:4001 16:00:26.942 pjsua_media.c ..Media index 0 selected for audio call 0 16:00:26.942 pjsua_core.c ....TX 1198 bytes Request msg INVITE/cseq=13359 (tdta0x55ffcb16b4a8) to UDP 91.121.129.159:5060: INVITE <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc Max-Forwards: 70 From: <sip:0033972nnnnnn@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY> sip:0033972nnnnnn@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY To: <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr Contact: < <sip:003397nnnnnn@192.168.105.26:5060;ob> sip:003397nnnnnn@192.168.105.26:5060;ob> Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO CSeq: 13359 INVITE Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Supported: replaces, 100rel, timer, norefersub Session-Expires: 1800 Min-SE: 90 User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Content-Type: application/sdp Content-Length: 521 v=0 o=- 3752492426 3752492426 IN IP4 192.168.105.26 s=pjmedia b=AS:84 t=0 0 a=X-nat:0 m=audio 4000 RTP/AVP 98 97 99 104 3 0 8 9 96 c=IN IP4 192.168.105.26 b=TIAS:64000 a=rtcp:4001 IN IP4 192.168.105.26 a=sendrecv a=rtpmap:98 speex/16000 a=rtpmap:97 speex/8000 a=rtpmap:99 speex/32000 a=rtpmap:104 iLBC/8000 a=fmtp:104 mode=30 a=rtpmap:3 GSM/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:9 G722/8000 a=rtpmap:96 telephone-event/8000 a=fmtp:96 0-16 a=ssrc:1011957511 cname:75cedd633ab5e97d --end msg-- 16:00:26.942 pjsua_app.c .......Call 0 state changed to CALLING >>>> Account list: [ 0] < <sip:192.168.105.26:5060> sip:192.168.105.26:5060>: does not register Online status: Online *[ 1] <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr: 100/In Progress (expires=0) Online status: Online Buddy list: [ 1] <?> <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr +=============================================================================+ | 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 | | +-----------------------------------------------------------------------------+ | q QUIT L ReLoad sleep MS echo [0|1|txt] n: detect NAT type | +=============================================================================+ You have 1 active call Current call id=0 to <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr [CALLING] >>> 16:00:26.966 pjsua_core.c .RX 341 bytes Response msg 100/REGISTER/cseq=20718 (rdata0x55ffcb14d818) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV CSeq: 20718 REGISTER From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjwZ0eQlyjNoDdLg6UG-Osr8gZFdkQ05JL Content-Length: 0 --end msg-- 16:00:26.966 pjsua_core.c .RX 339 bytes Response msg 100/INVITE/cseq=13359 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO CSeq: 13359 INVITE From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY To: < <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc Content-Length: 0 --end msg-- 16:00:26.966 pjsua_core.c .RX 379 bytes Response msg 403/INVITE/cseq=13359 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 403 not registered Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO CSeq: 13359 INVITE From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY To: < <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr>;tag=02-22581-7130a9fb-6f8a0a441 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc Content-Length: 0 --end msg-- 16:00:26.966 pjsua_core.c ..TX 377 bytes Request msg ACK/cseq=13359 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060: ACK <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjM2z7W8MLQLAIH9yQkxNQUMwAYogM9rwc Max-Forwards: 70 From: <sip:0033972nnnnnn@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY> sip:0033972nnnnnn@sip3.ovh.fr;tag=XqE9aDLlGlo3gE22AK4QBJoF1UzKt5FY To: <sip:0033661nnnnnn@sip3.ovh.fr;tag=02-22581-7130a9fb-6f8a0a441> sip:0033661nnnnnn@sip3.ovh.fr;tag=02-22581-7130a9fb-6f8a0a441 Call-ID: hTnBJcrx44AvHW1SnBZVLKqHHxQ0otOO CSeq: 13359 ACK Content-Length: 0 --end msg-- 16:00:26.967 pjsua_app.c .....Call 0 is DISCONNECTED [reason=403 (not registered)] 16:00:26.967 pjsua_app_common.c ..... [DISCONNCTD] To: <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr Call time: 00h:00m:00s, 1st res in 25 ms, conn in 0ms 16:00:26.967 pjsua_media.c .....Call 0: deinitializing media.. 16:00:26.967 pjsua_media.c ......Call 0: cleaning up provisional media, prov_med_cnt=1, med_cnt=0 16:00:26.969 pjsua_core.c .RX 549 bytes Response msg 401/REGISTER/cseq=20718 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 401 Unauthorized Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV CSeq: 20718 REGISTER From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=00-07686-08f654bc-4d18b7a46 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjwZ0eQlyjNoDdLg6UG-Osr8gZFdkQ05JL WWW-Authenticate: Digest realm="sip3.ovh.fr",nonce="08f64a24258ffbd7790be25e506a8b45",opaque="08f232dd5578250",stale=false,algorithm=MD5 Server: Cirpack/v4.76 (gw_sip) Content-Length: 0 --end msg-- 16:00:26.970 pjsua_core.c ....TX 788 bytes Request msg REGISTER/cseq=20719 (tdta0x55ffcb151698) to UDP 91.121.129.159:5060: REGISTER <sip:sip3.ovh.fr> sip:sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjUpk6GULmUTzkGVjYXebYbqOKZo3mjF83 Max-Forwards: 70 From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: < <sip:0033972nnnnnnn@sip3.ovh.fr> sip:0033972nnnnnnn@sip3.ovh.fr> Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV CSeq: 20719 REGISTER User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Contact: < <sip:0033972nnnnnn@192.168.105.26:5060;ob> sip:0033972nnnnnn@192.168.105.26:5060;ob> Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Authorization: Digest username="0033972nnnnnnnn", realm="sip3.ovh.fr", nonce="08f64a24258ffbd7790be25e506a8b45", uri=" <sip:sip3.ovh.fr> sip:sip3.ovh.fr", response="1aa4dc5667db77e63ab8d15817a95474", algorithm=MD5, opaque="08f232dd5578250" Content-Length: 0 --end msg-- 16:00:26.993 pjsua_core.c .RX 341 bytes Response msg 100/REGISTER/cseq=20719 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV CSeq: 20719 REGISTER From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjUpk6GULmUTzkGVjYXebYbqOKZo3mjF83 Content-Length: 0 --end msg-- 16:00:27.045 pjsua_core.c .RX 514 bytes Response msg 200/REGISTER/cseq=20719 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 200 OK Call-ID: 4By1vMQV8lap2d6zrgKf33cHhz0Gd2vV Contact: < <sip:0033972nnnnnn@192.168.105.26:5060;ob> sip:0033972nnnnnn@192.168.105.26:5060;ob>;expires=300 CSeq: 20719 REGISTER From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=-WvjTZZ7327XIVuooUeqiwt8Jpsx1cMa To: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=00-07755-08f654c7-0470b8783 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjUpk6GULmUTzkGVjYXebYbqOKZo3mjF83 P-Associated-URI: < <sip:097nnnnnn@sip3.ovh.fr> sip:097nnnnnn@sip3.ovh.fr> Server: Cirpack/v4.76 (gw_sip) Content-Length: 0 --end msg-- 16:00:27.045 pjsua_acc.c ....SIP outbound status for acc 1 is not active 16:00:27.045 pjsua_acc.c ....sip:0033972nnnnnn@sip3.ovh.fr: registration success, status=200 (OK), will re-register in 300 seconds 16:00:27.045 pjsua_acc.c ....Keep-alive timer started for acc 1, destination:91.121.129.159:5060:15, interval:0s 16:00:27.942 pjsua_aud.c Closing sound device after idle for 1 second(s) 16:00:27.942 pjsua_app.c .Turning sound device -99 -99 OFF 16:00:27.942 pjsua_aud.c .Closing null sound device.. I fact I wonder if pjsua takes care to register *before* calling the given URI. So to make another test, once in pjsua I hit `m`, and enter `sip:0033661nnnnnn@sip3.ovh.fr`, and I get the following result: 16:03:31.129 pjsua_call.c !Making call with acc #1 to <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr 16:03:31.129 pjsua_aud.c .Set sound device: capture=-99, playback=-99 16:03:31.129 pjsua_aud.c ..Setting null sound device.. 16:03:31.129 pjsua_app.c ...Turning sound device -99 -99 ON 16:03:31.129 pjsua_aud.c ...Opening null sound device.. 16:03:31.129 pjsua_media.c .Call 2: initializing media.. 16:03:31.129 pjsua_media.c ..RTP socket reachable at 192.168.105.26:4002 16:03:31.129 pjsua_media.c ..RTCP socket reachable at 192.168.105.26:4003 16:03:31.129 pjsua_media.c ..Media index 0 selected for audio call 2 16:03:31.130 pjsua_core.c ....TX 1197 bytes Request msg INVITE/cseq=25951 (tdta0x55ffcb14daa8) to UDP 91.121.129.159:5060: INVITE <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Max-Forwards: 70 From: <sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv> sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr Contact: < <sip:0033972nnnnnn@192.168.105.26:5060;ob> sip:0033972nnnnnn@192.168.105.26:5060;ob> Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Supported: replaces, 100rel, timer, norefersub Session-Expires: 1800 Min-SE: 90 User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Content-Type: application/sdp Content-Length: 520 v=0 o=- 3752492611 3752492611 IN IP4 192.168.105.26 s=pjmedia b=AS:84 t=0 0 a=X-nat:0 m=audio 4002 RTP/AVP 98 97 99 104 3 0 8 9 96 c=IN IP4 192.168.105.26 b=TIAS:64000 a=rtcp:4003 IN IP4 192.168.105.26 a=sendrecv a=rtpmap:98 speex/16000 a=rtpmap:97 speex/8000 a=rtpmap:99 speex/32000 a=rtpmap:104 iLBC/8000 a=fmtp:104 mode=30 a=rtpmap:3 GSM/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:9 G722/8000 a=rtpmap:96 telephone-event/8000 a=fmtp:96 0-16 a=ssrc:281817610 cname:6551173f0b0e5f0f --end msg-- 16:03:31.130 pjsua_app.c .......Call 2 state changed to CALLING >>> 16:03:31.155 pjsua_core.c .RX 339 bytes Response msg 100/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: < <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Content-Length: 0 --end msg-- 16:03:31.155 pjsua_core.c .RX 379 bytes Response msg 403/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 403 not registered Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: < <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr>;tag=02-24827-7134b08a-07f4e44f1 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Content-Length: 0 --end msg-- 16:03:31.155 pjsua_core.c ..TX 377 bytes Request msg ACK/cseq=25951 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060: ACK <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Max-Forwards: 70 From: <sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv> sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: <sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1> sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1 Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 ACK Content-Length: 0 --end msg-- 16:03:31.155 pjsua_app.c .....Call 2 is DISCONNECTED [reason=403 (not registered)] 16:03:31.155 pjsua_app_common.c ..... [DISCONNCTD] To: <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr Call time: 00h:00m:00s, 1st res in 26 ms, conn in 0ms 16:03:31.155 pjsua_media.c .....Call 2: deinitializing media.. 16:03:31.155 pjsua_media.c ......Call 2: cleaning up provisional media, prov_med_cnt=1, med_cnt=0 16:03:32.156 pjsua_aud.c Closing sound device after idle for 1 second(s) 16:03:32.156 pjsua_app.c .Turning sound device -99 -99 OFF 16:03:32.156 pjsua_aud.c .Closing null sound device.. 16:03:31.129 pjsua_call.c !Making call with acc #1 to <sip:00336619nnnnnn@sip3.ovh.fr> sip:00336619nnnnnn@sip3.ovh.fr 16:03:31.129 pjsua_aud.c .Set sound device: capture=-99, playback=-99 16:03:31.129 pjsua_aud.c ..Setting null sound device.. 16:03:31.129 pjsua_app.c ...Turning sound device -99 -99 ON 16:03:31.129 pjsua_aud.c ...Opening null sound device.. 16:03:31.129 pjsua_media.c .Call 2: initializing media.. 16:03:31.129 pjsua_media.c ..RTP socket reachable at 192.168.105.26:4002 16:03:31.129 pjsua_media.c ..RTCP socket reachable at 192.168.105.26:4003 16:03:31.129 pjsua_media.c ..Media index 0 selected for audio call 2 16:03:31.130 pjsua_core.c ....TX 1197 bytes Request msg INVITE/cseq=25951 (tdta0x55ffcb14daa8) to UDP 91.121.129.159:5060: INVITE <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Max-Forwards: 70 From: <sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv> sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr Contact: < <sip:0033972nnnnnn@192.168.105.26:5060;ob> sip:0033972nnnnnn@192.168.105.26:5060;ob> Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Supported: replaces, 100rel, timer, norefersub Session-Expires: 1800 Min-SE: 90 User-Agent: PJSUA v2.8 Linux-4.15.0.39/x86_64/glibc-2.27 Content-Type: application/sdp Content-Length: 520 v=0 o=- 3752492611 3752492611 IN IP4 192.168.105.26 s=pjmedia b=AS:84 t=0 0 a=X-nat:0 m=audio 4002 RTP/AVP 98 97 99 104 3 0 8 9 96 c=IN IP4 192.168.105.26 b=TIAS:64000 a=rtcp:4003 IN IP4 192.168.105.26 a=sendrecv a=rtpmap:98 speex/16000 a=rtpmap:97 speex/8000 a=rtpmap:99 speex/32000 a=rtpmap:104 iLBC/8000 a=fmtp:104 mode=30 a=rtpmap:3 GSM/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:9 G722/8000 a=rtpmap:96 telephone-event/8000 a=fmtp:96 0-16 a=ssrc:281817610 cname:6551173f0b0e5f0f --end msg-- 16:03:31.130 pjsua_app.c .......Call 2 state changed to CALLING >>> 16:03:31.155 pjsua_core.c .RX 339 bytes Response msg 100/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 100 Trying Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: < <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr> Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Content-Length: 0 --end msg-- 16:03:31.155 pjsua_core.c .RX 379 bytes Response msg 403/INVITE/cseq=25951 (rdata0x7f414c009ae8) from UDP 91.121.129.159:5060: SIP/2.0 403 not registered Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 INVITE From: < <sip:0033972nnnnnn@sip3.ovh.fr> sip:0033972nnnnnn@sip3.ovh.fr>;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: < <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr>;tag=02-24827-7134b08a-07f4e44f1 Via: SIP/2.0/UDP 192.168.105.26:5060;received=192.168.105.26;rport=5060;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Content-Length: 0 --end msg-- 16:03:31.155 pjsua_core.c ..TX 377 bytes Request msg ACK/cseq=25951 (tdta0x7f414c00bab8) to UDP 91.121.129.159:5060: ACK <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjnPUSaSErQ5cB3NwXli7DykVXR4Yf.qa8 Max-Forwards: 70 From: <sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv> sip:0033972nnnnnn@sip3.ovh.fr;tag=V56CnDzA6IA17NcOZzndfBnUeGMyLDvv To: <sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1> sip:0033661nnnnnn@sip3.ovh.fr;tag=02-24827-7134b08a-07f4e44f1 Call-ID: Xl0e9hCHf5QIF7lhEajqnDIWLVHt8ECw CSeq: 25951 ACK Content-Length: 0 --end msg-- 16:03:31.155 pjsua_app.c .....Call 2 is DISCONNECTED [reason=403 (not registered)] 16:03:31.155 pjsua_app_common.c ..... [DISCONNCTD] To: <sip:0033661nnnnnn@sip3.ovh.fr> sip:0033661nnnnnn@sip3.ovh.fr Call time: 00h:00m:00s, 1st res in 26 ms, conn in 0ms 16:03:31.155 pjsua_media.c .....Call 2: deinitializing media.. 16:03:31.155 pjsua_media.c ......Call 2: cleaning up provisional media, prov_med_cnt=1, med_cnt=0 16:03:32.156 pjsua_aud.c Closing sound device after idle for 1 second(s) 16:03:32.156 pjsua_app.c .Turning sound device -99 -99 OFF 16:03:32.156 pjsua_aud.c .Closing null sound device.. What is this `Call 2 is DISCONNECTED [reason=403 (not registered)]` message? Could you tell me what's wrong? Regards , Alain