pjsua getting wrong IP address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ah, I see. It looks like there was a misunderstanding there.

The transport config that you specified is only used to create the 
SIP (udp) transport, but not the media transports. Since the 
application doesn't specify the transport config for the media 
transports, the media transports were created using the default 
configuration (which retrieves the IP address from the hostname).

To override the published address of the media transports, you need 
to initialize another pjsua_media_config, and call 
pjsua_media_transports_create() before pjsua_start().

cheers,
  -benny

tloginbr-pjsip at yahoo.com.br wrote:
> I'm sending my sample code. just to be clear: My real
> IP address is 10.100.0.143, I put in my /etc/hosts
> file the ip 10.100.0.199, and in the application I set
> the public_addr to 10.100.0.14. Bellow is a piece of
> the log output (level 4):
> 
> 14:54:06.944   udp0x83dc09c SIP UDP transport started,
> published address is 10.100.0.14:5090
>  14:54:06.944  pjsua_media.c RTP socket reachable at
> 10.100.0.199:4000
>  14:54:06.944  pjsua_media.c RTCP socket reachable at
> 10.100.0.199:4001
>  14:54:06.945  pjsua_media.c RTP socket reachable at
> 10.100.0.199:4002
>  14:54:06.945  pjsua_media.c RTCP socket reachable at
> 10.100.0.199:4003
>  14:54:06.945  pjsua_media.c RTP socket reachable at
> 10.100.0.199:4004
>  14:54:06.945  pjsua_media.c RTCP socket reachable at
> 10.100.0.199:4005
>  14:54:06.945  pjsua_media.c RTP socket reachable at
> 10.100.0.199:4006
>  14:54:06.945  pjsua_media.c RTCP socket reachable at
> 10.100.0.199:4007
>  14:54:06.945    pjsua_acc.c Account
> <sip:10.100.0.14:5090;transport=UDP> added with id 0
> 
> I'm using the api version 0.8.0 from the site (not
> svn) and I compiled it with the options for
> PJ_CONFIG_MAXIMUM_SPEED inside config_site.h.
> 
> thanks again,
> 
> Thiago
>> tloginbr-pjsip at yahoo.com.br wrote:
>>> Thanks a lot. I didn't enable stun, so maybe there
>> is
>>> a little problem here... But I also didn't disable
>> it,
>>> so if it comes enabled by default thats how it is.
>> In that case, it should work. I've checked the
>> source code and I 
>> couldn't find any problem with it. Could you post a
>> simple sample to 
>> reproduce it?
>>
>> cheers,
>>   -benny





[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux