PJSIP Signaling Question

Home » Asterisk Users » PJSIP Signaling Question
Asterisk Users 8 Comments

Greetings.

I am using the PJSIP driver with TLS transport, and my endpoints are SIP mobile apps operating in environments that I do not control.

I would like Asterisk to default to sending INVITES and all other SIP signals to endpoints via the existing SIP TLS connection which is already established, rather than trying to create a new TLS connection to an endpoint which is likely behind a NAT which will not allow a new inbound TCP/TLS connection.

My experience with chan_sip suggest to me that this was the default behavior, or more likely a fallback behavior, because I never had this issue before with endpoints not receiving INVITES so long as they were registered and had an open SIP control connection.

I thought that I could avoid these failed outbound connections by commenting out the “transport” option on my endpoint configurations, but tcpdump is showing me that asterisk is still trying to create *new* TLS outbound connections to my endpoints, which are failing.

Thank you for your time

Kevin

My simple pjsip config file:

[transport-tls]
type=transport protocol=tls bind=0.0.0.0:5061
local_net=10.50.55.0/24
external_media_address=x.x.x.x external_signaling_address=x.x.x.x cert_file=/etc/asterisk/keys/dev1.crt priv_key_file=/etc/asterisk/keys/dev1.key ca_list_file=/etc/asterisk/keys/ca.crt cipher=AES256-SHA
method=tlsv1

;===============EXTENSION 6001

[6000]
type=endpoint context=internal disallow=all allow=ulaw
;transport=transport-tls auth=auth6000
aors=6000
direct_media=no rewrite_contact=yes ; necessary if endpoint does not know/register public ip:port ice_support=no force_rport=yes rtp_symmetric=yes media_encryption=sdes

[auth6000]
type=auth auth_type=userpass password=6000
username=6000

[6000]
type=aor max_contacts=1
remove_existing=yes

;===============EXTENSION 6001

[6001]
type=endpoint context=internal disallow=all
allow=ulaw
;transport=transport-tls auth=auth6001
aors=6001
direct_media=no rewrite_contact=yes ; necessary if endpoint does not know/register public ip:port ice_support=no force_rport=yes rtp_symmetric=yes media_encryption=sdes

[auth6001]
type=auth auth_type=userpass password=6001
username=6001

[6001]
type=aor max_contacts=1
remove_existing=yes

8 thoughts on - PJSIP Signaling Question

  • This was actually an issue in pjproject which I just fixed last week. 🙂

    It’s in pjproject “trunk” so you’ll have to download and build it from their subversion repository.

    Now whether you use “transport=” or not, pjproject will look for an existing connection to the remote endpoint before attempting to create a new one.

    I tested it with the current Asterisk 13 branch and I *think* it’ll work with recent Asterisk releases as well. If it doesn’t, let me know.

  • Interesting, thanks George. I pulled Asterisk 13 from git and the new pjproject from the SVN and will test accordingly .

    I have a few more questions about PJSIP in Asterisk 13:

    1. Is there any way to list current ongoing calls and see what codecs are being used in the RTP streams? With chan_sip, “sip show channels” did this.

    2. Also with a PJSIP initiated call, is there a way to see how man RTP packets have been sent and received for the call , I am debugging some intermittent 1-way and no-way audio on calls , and I am having trouble figuring out fi it is the client, firewall, or Asterisk/pjsip that is the culprit .

    Regards,

    Kevin Long

  • ​Yeah, actually you do need Asterisk 13 from git because pjproject deprecated an api in trunk and we only handle that in the current git 13
    branch.​

    ​Unfortunately, no to both (at least that I’m aware of). I remember looking at the channel stats a long while back and for some reason didn’t go any further. I can re-look.

  • Thanks George I appreciate the info . Being able to see what codec is in use for call in progress is very handy sometimes.

    As far as the RTP stats goes, I see there is some info with “rtp” and “rtcp” commands which can be useful for troubleshooting. A running tally of # packets or bandwidth used would be awesome in along with the codec in “pjsip show channels” or something like that.

    Im not certain, but I think the TLS signalling problem from this email may be happening to me again after patching for another pjsip/NAT issue which was with the external_media_address not working and the internal IP being sent in the SDP from asterisk – I applied this patch to the codebase and recompiled I am seeing the TLS “new transport” issue again , I think.

    Regards,

    Kevin Long

  • ​I’ve lost track of who’s applying what patches to ​which codebase. 🙂

    Which patch did you apply for “external_media_address not working”?

  • –Apple-Mail-E86A02DC-6561-43BE-A2F5-49AB0BD7D046
    Content-Type: text/plain;
    charset=utf-8
    Content-Transfer-Encoding: base64

    SGkgR2VvcmdlIHRoZSBwYXRjaCB3YXMgZnJvbSBoZXJlICwgeW91IHdyb3RlIGl0IEkgYmVsaWV2
    ZSAuIEkgcHVsbGVkIGFzdGVyaXNrIDEzIGZyb20gZ2l0LCBhcHBseSB0aGlzIHBhdGNoIHdoaWNo IGZpeGVkIFJUUCBpc3N1ZSAsIGJ1dCBJIHRoaW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IGxpc3QNCj4+IFRv IFVOU1VCU0NSSUJFIG9yIHVwZGF0ZSBvcHRpb25zIHZpc2l0Og0KPj4gICAgaHR0cDovL2xpc3Rz LmRpZ2l1bS5jb20vbWFpbG1hbi9saXN0aW5mby9hc3Rlcmlzay11c2Vycw0KPiANCj4gLS0gDQo+
    IF9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fXw0KPiAtLSBCYW5kd2lkdGggYW5kIENvbG9jYXRpb24gUHJvdmlkZWQgYnkg aHR0cDovL3d3dy5hcGktZGlnaXRhbC5jb20gLS0NCj4gTmV3IHRvIEFzdGVyaXNrPyBKb2luIHVz IGZvciBhIGxpdmUgaW50cm9kdWN0b3J5IHdlYmluYXIgZXZlcnkgVGh1cnM6DQo+ICAgICAgICAg ICAgICAgaHR0cDovL3d3dy5hc3Rlcmlzay5vcmcvaGVsbG8NCj4gDQo+IGFzdGVyaXNrLXVzZXJz IG1haWxpbmcgbGlzdA0KPiBUbyBVTlNVQlNDUklCRSBvciB1cGRhdGUgb3B0aW9ucyB2aXNpdDoN
    Cj4gICBodHRwOi8vbGlzdHMuZGlnaXVtLmNvbS9tYWlsbWFuL2xpc3RpbmZvL2FzdGVyaXNrLXVz ZXJzDQo
    –Apple-Mail-E86A02DC-6561-43BE-A2F5-49AB0BD7D046
    Content-Type: text/html;
    charset=utf-8
    Content-Transfer-Encoding: base64

    PGh0bWw+PGhlYWQ+PG1ldGEgaHR0cC1lcXVpdj0iY29udGVudC10eXBlIiBjb250ZW50PSJ0ZXh0
    L2h0bWw7IGNoYXJzZXQ9dXRmLTgiPjwvaGVhZD48Ym9keSBkaXI9ImF1dG8iPjxkaXY+SGkgR2Vv cmdlIHRoZSBwYXRjaCB3YXMgZnJvbSBoZXJlICwgeW91IHdyb3RlIGl0IEkgYmVsaWV2ZSAuIEkg cHVsbGVkIGFzdGVyaXNrIDEzIGZyb20gZ2l0LCBhcHBseSB0aGlz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NwYW4+PGJyPjxz cGFuPjwvc3Bhbj48YnI+PHNwYW4+YXN0ZXJpc2stdXNlcnMgbWFpbGluZyBsaXN0PC9zcGFuPjxi cj48c3Bhbj5UbyBVTlNVQlNDUklCRSBvciB1cGRhdGUgb3B0aW9ucyB2aXNpdDo8L3NwYW4+PGJy PjxzcGFuPiAmbmJzcDsmbmJzcDs8YSBocmVmPSJodHRwOi8vbGlzdHMuZGlnaXVtLmNvbS9tYWls bWFuL2xpc3RpbmZvL2FzdGVyaXNrLXVzZXJzIj5odHRwOi8vbGlzdHMuZGlnaXVtLmNvbS9tYWls bWFuL2xpc3RpbmZvL2FzdGVyaXNrLXVzZXJzPC9hPjwvc3Bhbj48L2Rpdj48L2Jsb2NrcXVvdGU+
    PC9ib2R5PjwvaHRtbD4
    –Apple-Mail-E86A02DC-6561-43BE-A2F5-49AB0BD7D046

  • ​Oh, that one, OK. ​ It should be merged now so if you ‘git pull’ on 13
    now, you should get it. The transport re-use issue was in pjproject so is it possible that you’re not compiling against the latest trunk?

  • I can’t quite figure it out , I went ahead and pulled everything yet again, and I made sure to delete everything related to pjproject from my system, all the PJ lib and include files that were in /usr/lib/ , I pulled pjproject from svn , pulled asterisk code from gerrit, recompiled everything, but still I think new TLS transports are being made which fail in my NAT scenarios . I check with:

    tcpdump -i any src host 10.50.55.10 and ‘tcp[13] & 2 != 0’

    I see tcpdump print a new tcp SYN packet when I try to make a call between endpoints and also when Asterisk tries to send OPTIONS command to the endpoint .

    From my endpoints, I can call the “echo” applications and the call works fine, but I cannot call from one endpoint to another endpoint , even though they are both egistered. It does not say “unavailable’ or anything, I see in the pjsip log that an INVITE is “sent” , but I think the logger is just showing me that the INVITE message has been created, but it never reaches the endpoint because of the new TLS connection failing because of the NAT. Eventually, the call times out with a 408 error in the pjsip log.

    I also see some log entries:
    [Mar 4 12:29:10] DEBUG[16225] pjsip: tlsc0x7f311400 TLS connect() error: Connection timed out [code=120110]
    [Mar 4 12:29:29] DEBUG[16225] pjsip: tlsc0x7f311400 TLS connect() error: Connection timed out [code=120110]

    Just to be clear I am getting pjproject like so :
    svn co http://svn.pjsip.org/repos/pjproject/trunk

    and asterisk :
    git clone -b 13 http://gerrit.asterisk.org/asterisk

    then I go to pjproject directory, create a site_config.h file (to increase TLS connectors and set other options recommended on Wiki)

    configure pjproject with the following options:

    ./configure –prefix=/usr –enable-shared –disable-sound –disable-resample –disable-video –disable-opencore-amr –with-external-srtp

    Then go to asterisk directory

    make clean; make distclean; ./boostrap.sh ; ./configure; make menuselect; make; make install;