On 11/25/2013 12:20 AM, Alexander Heinrich wrote:
> Good evening dear developers,
>
> I’m currently stuck in another problem.
> I am able to retrieve incoming calls. So my nua_create should be right.
>
> In my nua_invite I’m trying to connect to an IP Address directly. I am using 
> IP4, but the computer which I try to call does run IP6, too.
> When I try to connect sofia sip is not able to find out the way to my 
> computer and I get a timeout in the end.
>
> I am still using an iOS Device for testing, so I am not able to use the DNS 
> resolver.
> Is it possible to deactivate the resolver directly in my code ?
>
> Here’s my invite:
>
>    url_string_t *url = URL_STRING_MAKE(“sip:alex@192.168.178.82:5060") ;
>      sip_to_t *to = sip_to_create(NULL, url);
>
>      op.handle = nua_handle(app.nua, NULL,SIPTAG_TO(to), TAG_END());
> //    op.leg = nta_leg_tcreate(app.agent,nta_callback, NULL, SIPTAG_TO(to), 
> TAG_END());
>
>      nua_invite(op.handle,SOATAG_USER_SDP_STR("m=audio 20000 RTP/AVP 0\n"
>                                               "a=rtpmap:0 PCMU/8000\n"
>                                               "v = 0\n"
>                                               "o=Alex\n"
>                                               "c=IN IP4 127.0.0.1\n"
>                                               "s=Audio"),
>                 TAG_END());
> Here’s my Log Output:
>
> ------- cut -------
>
>
> When I try using the SOATAG_ADDRESS Feature:
>
>    nua_invite(op.handle,SOATAG_USER_SDP_STR("m=audio 20000 RTP/AVP 0\n"
>                                               "a=rtpmap:0 PCMU/8000\n"
>                                               "v = 0\n"
>                                               "o=Alex\n"
>                                               "c=IN IP4 127.0.0.1\n"
>                                               "s=Audio"),
>                 SOATAG_ADDRESS("192.168.178.82")
>                 TAG_END());
>
>
>

You seem to be confusing addresses in the SIP header and media addresses.
With c= or SOATAG_ADDRESS you put an address in the SDP you're sending out;
that is: The address you want the remote peer to send media to (will 
most probably be the host you're calling from).

The other thing is the SIP URI you're trying to call which is a 
completely different story.
Creating a TO header works like this:

sip_to_t* to = sip_to_create( NULL, URL_STRING_MAKE( 
"sip:alex@192.168.178.82:5060" ) );
nua_invite( handle, SIPTAG_TO( to ), ..., TAG_END() );

Hope this helps,

Andreas


------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to