[asterisk-bugs] [JIRA] (ASTERISK-23994) PJSIP falils to inerop with many switches
Matt Jordan (JIRA)
noreply at issues.asterisk.org
Fri Jul 4 14:11:56 CDT 2014
[ https://issues.asterisk.org/jira/browse/ASTERISK-23994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=220275#comment-220275 ]
Matt Jordan commented on ASTERISK-23994:
----------------------------------------
A few things before we get to the meat of this issue:
# Just because no one replies to you on a mailing list does not make your issue a bug. That's not quite how it works. Filing an issue here when you don't get a 24-hour response on the mailing list may force a response, but it's hardly likely to endear you to anyone in the project.
# Please don't file issues as blockers. Whether or not an issue is a blocker for a release is a decision made by the branch maintainers (plus, we'll just change it to Critical or something else). As it is, the fact that your provider doesn't like the SDP being generated from your machine does not make this a blocker.
Your provider is wrong. At the very minimum, a fully qualified domainname is allowable in the origin line of an SDP. From [RFC 4566, Section 5.2|http://tools.ietf.org/html/rfc4566.html#section-5.2]:
{quote}
5.2. Origin ("o=")
o=<username> <sess-id> <sess-version> <nettype> <addrtype>
<unicast-address>
The "o=" field gives the originator of the session (her username and
the address of the user's host) plus a session identifier and version
number:
<snip>
<addrtype> is a text string giving the type of the address that
follows. Initially "IP4" and "IP6" are defined, but other values
MAY be registered in the future (see Section 8).
<unicast-address> is the address of the machine from which the
session was created. For an address type of IP4, this is either
the fully qualified domain name of the machine or the dotted-
decimal representation of the IP version 4 address of the machine.
For an address type of IP6, this is either the fully qualified
domain name of the machine or the compressed textual
representation of the IP version 6 address of the machine. For
both IP4 and IP6, the fully qualified domain name is the form that
SHOULD be given unless this is unavailable, in which case the
globally unique address MAY be substituted. A local IP address
MUST NOT be used in any context where the SDP description might
leave the scope in which the address is meaningful (for example, a
local address MUST NOT be included in an application-level
referral that might leave the scope).
{quote}
Now then, what is Asterisk doing?
Asterisk uses the hostname to set the origin address in the SDP:
{code}
local->origin.addr_type = session->endpoint->media.rtp.ipv6 ? STR_IP6 : STR_IP4;
local->origin.addr = *hostname;
{code}
Where hostname is retrieved from PJSIP:
{code}
hostname = pj_gethostname();
{code}
Generally, this will map to [gethostname|http://linux.die.net/man/2/gethostname] - so whatever it is returning is based on your system configuration.
In conclusion:
# Your provider is wrong. A fully qualified hostname is acceptable.
# If your machine is returning the wrong name, that would be a configuration error on your machine.
> PJSIP falils to inerop with many switches
> -----------------------------------------
>
> Key: ASTERISK-23994
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-23994
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_pjsip
> Affects Versions: 12.3.2
> Environment: Linux any version
> Reporter: Private Name
> Severity: Blocker
>
> I already asked this question to the list and nobody answered, therefore it is a bug. The SDP-Owner section is wrong. This is what my client said:
> "That OK message from 1.1.1.1 can not be parsed by our switch due to
> address representation in their SDP:
> Owner/Creator, Session Id (o): Pitcom 2723451647 2723451649 IN IP4 Pitcomlxc
> Such address representation not supported, there should be IP address
> instead of domain name.
> Example:
> Owner/Creator, Session Id (o): Pitcom 2723451647 2723451649 IN IP4 1.1.1.1
> In fact, I traced it in the SDP packet, I see
> o=Pitcom 3991413436 3 IN IP4 pitcomlxc
> where pitcomlxc is the host name.
> How do I make PJSIP use an IP address there instead of the host name?
> My /etc/hosts.com has an entry for pitcomlxc, but it makes no difference.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list