Hello, I encounter a problem I can’t understand with pjsua. I register succesfully to my SIP provider (OVH) and then when I make a call to a phone number, I get a `403 Not Registered` answer to INVITE request as displayed just after state changes to CALLING at 16:45:20.314. It ‘s like my provider tries to access a sip endpoint and doesn’t realize that the called number is in fact a phone number. $ ./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@xxxxxxxxxxx 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@xxxxxxxxxxx 16:44:38.922 pjsua_acc.c .Account sip:0033972nnnnnn@xxxxxxxxxxx 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@xxxxxxxxxxx>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb To: <sip:0033972nnnnnn@xxxxxxxxxxx> 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@xxxxxxxxxxx>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb To: <sip:0033972nnnnnn@xxxxxxxxxxx> 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@xxxxxxxxxxx>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb To: <sip:0033972nnnnnn@xxxxxxxxxxx>;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@xxxxxxxxxxx>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb To: <sip:0033972nnnnnn@xxxxxxxxxxx> 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@xxxxxxxxxxx>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb To: <sip:0033972nnnnnn@xxxxxxxxxxx> 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@xxxxxxxxxxx>;tag=V-2VX9ftcecN4RnSV7HZISLlDK5SSlsb To: <sip:0033972nnnnnn@xxxxxxxxxxx>;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@xxxxxxxxxxx> 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@xxxxxxxxxxx: 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@xxxxxxxxxxx 16:45:20.251 pjsua_call.c !Making call with acc #2 to sip:0033661nnnnnn@xxxxxxxxxxx 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@xxxxxxxxxxx SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjLV1XZ.poXUu0e6ret.J4DNdX74yIG7Qk Max-Forwards: 70 From: sip:0033972nnnnnn@xxxxxxxxxxx;tag=5k7dKtZTZPpoK56fFkhEYkfhFPWEO8gd To: sip:0033661nnnnnn@xxxxxxxxxxx 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@xxxxxxxxxxx>;tag=5k7dKtZTZPpoK56fFkhEYkfhFPWEO8gd To: <sip:0033661nnnnnn@xxxxxxxxxxx> 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@xxxxxxxxxxx>;tag=5k7dKtZTZPpoK56fFkhEYkfhFPWEO8gd To: <sip:0033661nnnnnn@xxxxxxxxxxx>;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@xxxxxxxxxxx SIP/2.0 Via: SIP/2.0/UDP 192.168.105.26:5060;rport;branch=z9hG4bKPjLV1XZ.poXUu0e6ret.J4DNdX74yIG7Qk Max-Forwards: 70 From: sip:0033972nnnnnn@xxxxxxxxxxx;tag=5k7dKtZTZPpoK56fFkhEYkfhFPWEO8gd To: sip:0033661nnnnnn@xxxxxxxxxxx;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@xxxxxxxxxxx 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 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- Using CSipSimple on the same network and calling the same phone number runs fine. Regards, Alain |
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org