[asterisk-users] PJSIP ports, multiple IP addresses and wrong owner

Recursive lists at binarus.de
Fri Dec 26 03:06:06 CST 2014


>> So what is the meaning of the additional ports PJSIP is opening, and why does it open these on all IP addresses?
> 
> Using an extremely simple module.conf:
> 
> autoload = no
> load => pbx_config.so
> load => res_sorcery_config.so
> load => res_sorcery_memory.so
> load => res_sorcery_astdb.so
> load => chan_pjsip.so
> load => res_pjsip.so
> load => res_pjsip_session.so
> load => res_pjsip_sdp_rtp.so
> load => res_pjsip_t38.so
> load => res_rtp_asterisk.so
> 
> With a single UDP bind-all transport defined in pjsip.conf, I get the following:
> 
> udp        0      0 0.0.0.0:52678           0.0.0.0:*
>          3797/asterisk
> udp        0      0 0.0.0.0:5060            0.0.0.0:*
>          3797/asterisk
> 
> Removing the PJSIP modules does cause the other bindaddr to disappear.
> 
> Interesting.
> 
> Without a lot more investigation, I'm not sure where that one is
> coming from. I'll reply back here when I've had a chance to look
> deeper.
> 

Thank you very much for taking the time. At least, I now know that the third port in my case must be due to one of the other PJSIP modules which you didn't load. Nevertheless, I'll wait for your results before investigating further.

> First, it would be good to confirm with your provider that the owner
> line is actually the problem. Making arbitrary code changes based on
> guesses is never a good idea! :-)

Unfortunately, the providers in Germany don't have any clue what they are doing. They are not helpful when it comes to T.38; there is no chance to talk to somebody who knows about that matter. Even worse, some of them try to make you buy some hardware gateway which they claim to work flawlessly with their systems. I even suspect that they make their systems incompatible to standard T.38 by intention, hoping that they can force the customers to buy that crap that way.

So I don't seem to have any chance to find out if the wrong owner actually is a problem.

> The IP address in the SDP owner line will be one of the following:
> 
> (1) The same information from the SDP connection line if possible.
> Note that this is applied prior to NAT changes, which may be why the
> IP address in the owner line differs from the connection IP addresses.
> (2) The configured media address, if present
> (3) The IP address of ourself, which is obtained via a system call

I understand that the system call probably returns the respective NIC's main address. But wouldn't it be possible to use (one of) the configured address(es) from the transport(s) instead?

> This does not apply to a particular signalling transport, since the
> transport used for signalling does not necessarily equate to the
> transport information used for media.
> 
> From what I can tell in your trace, the only aspect here that may be
> incorrect is not applying the NAT'd IP address to the owner
> information. That is, in an ideal world, the owner information would
> match the IP address provided in the connection lines. Per RFC 4566,
> section 5.2, we shouldn't be sending a local IP address in the owner
> information, and it looks like we're still doing that here.

If I got you right, I can change the owner by configuring a media address. As soon as I have found out (still learning) how to do that, I'll test and configure my public IP as media address. Then we'll see if this has been the problem.

By the way, my IP address is pseudo-dynamic, meaning that it's dynamic in principle, but the provider will change it very rarely (every 180 days or so), so it would be possible to update the configuration and restart Asterisk every time when this happens. I could imagine to write a script for that.

[SNIP]
> You'll need to confirm this with your provider. If they are assigning
> semantic meaning beyond constructing a globally unique identifier to
> the IP address in the owner field, then they are taking a rather
> extreme view of the RFC.

Thanks to the hints you have given, if I find out how to configure the media address, I think I am able to change the owner line. Furthermore, I'll try to let Asterisk bind to all IP addresses or to the main one; that way, the owner address would still be a local one, but the right of the local ones. I'll report the results of these two tests.

Thank you very much,

Recursive



More information about the asterisk-users mailing list