[Home]

Summary:ASTERISK-27079: PJSIP puts invalid data in SDP when using external_media_address
Reporter:snuffy (snuffy)Labels:
Date Opened:2017-06-22 05:30:40Date Closed:2020-06-30 15:57:30
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:GIT Frequency of
Occurrence
Constant
Related
Issues:
is related toASTERISK-28973 Malformed IP address in SDP of 2nd SIP timer triggered INVITE when NAT is active (UDP transport with external_media_address)
Environment:Debian 8.1, ESXi VM, 2 network interfaces Asterisk GIT-master-db5e269Attachments:( 0) answer33.pcap
( 1) answer-debug22.pcap
( 2) answer-fail-5.pcap
( 3) answer-new11.pcap
( 4) ast-full-2min.log
( 5) my-test.log
( 6) pjsip-trimmed.conf
Description:I am getting an issue when SIP timers are turned on, could be related to use of external_signal_address

session_expires=1800 (30min)

According to my PCAP output:
* INVITE created for outbound call (session starts with timer set at 1800)
  * Correct SDP IP information is set
* 15 minutes in, new INVITE is send out
  * Correct SDP IP information is set
* Session timer expires (30 minutes), new INVITE is sent out
  * Garbage is set for SDP IP
  * Other side replies with 488 - Invalid SDP information
  * Call is terminated 15 minutes later by Asterisk

The invalid SDP:

{noformat}
INVITE sip:0410551660@202.10.4.137:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 10.237.181.230:5060;rport;branch=z9hG4bKPjdea05bde-0e5a-4bae-bc3d-79ca37a53680
From: <sip:0383708000@10.21.16.253>;tag=62136bf6-1bf5-494c-9a30-19cdc11e91b0
To: <sip:0410551660@202.10.4.137>;tag=97615
Contact: <sip:asterisk@10.237.181.230:5060>
Call-ID: e22eb82b-b822-4c84-bb1b-8d045e9848c2
CSeq: 15537 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 120;refresher=uac
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX GIT-master-db5e269
Content-Type: application/sdp
Content-Length:   171

v=0
o=- 1615031026 1615031026 IN IP4
{noformat}

Comments:By: Asterisk Team (asteriskteam) 2017-06-22 05:30:41.300-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: snuffy (snuffy) 2017-06-22 05:42:36.691-0500

Versions Tested:
Master from 2 days ago.

Date:   Tue Jun 20 18:18:19 2017 -0500



By: Sean Bright (seanbright) 2017-06-26 10:24:58.774-0500

Can you attach your PJSIP configuration please? Redact as needed.

By: snuffy (snuffy) 2017-06-26 20:26:12.795-0500

Now attached pjsip.conf

Internal person is from the 3230 number on IP of 10.21.16.103

Asterisk is on the 10.21.16.253 address /24 subnet.

Exists routes for forwarding traffic out to the SIP provider listed, default GW is for reaching other local site ip addresses which are not listed in this config.

0.0.0.0         10.21.16.254    0.0.0.0         UG    0      0        0 eth0
10.21.16.0      0.0.0.0         255.255.255.0   U     0      0        0 eth0
10.236.2.0      10.237.181.229  255.255.255.0   UG    0      0        0 eth1
10.237.181.228  0.0.0.0         255.255.255.252 U     0      0        0 eth1
202.10.4.0      10.237.181.229  255.255.255.0   UG    0      0        0 eth1
202.92.72.0     10.237.181.229  255.255.255.0   UG    0      0        0 eth1
210.87.44.6     10.237.181.229  255.255.255.255 UGH   0      0        0 eth1



By: Rusty Newton (rnewton) 2017-06-28 08:54:37.229-0500

Can you include a debug log that has pjsip logging enabled as well? It is a little easier to correlate debug with the SIP flow when they are together. Having the pcap is nice too, so thanks for that.

By: snuffy (snuffy) 2017-06-28 22:23:08.866-0500

Debug log from pjsip?

I thought my-test.log had pjsip debug info in it?

Or are you looking for something else ?

By: Rusty Newton (rnewton) 2017-06-29 09:45:54.093-0500

I was looking for the PJSIP logger output, that is, the SIP traffic.

You've got the pcap which shows that side of it, but it is nice to have the SIP traffic in the debug log to help identify the chronology and relationship of debug messages to specific points in the call flow.

By: snuffy (snuffy) 2017-06-29 11:10:38.953-0500

new upload

By: snuffy (snuffy) 2017-06-29 11:11:14.576-0500

new upload 'pjsip set logger host xxxx'

By: Rusty Newton (rnewton) 2017-07-01 13:20:58.928-0500

Perfect, thanks.

By: Joshua C. Colp (jcolp) 2020-06-30 15:57:30.625-0500

Closing out in favor of ASTERISK-28973.