how to enable IPv6 address calling

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

 



On Wed, May 21, 2008 at 12:52 PM, TARUN CHAPLOT <tarunchaplot at yahoo.com> wrote:
> Hello Everyone
>
> I am using pjproject-0.8.0 on Mac OS X and I tried to call a IPv6 address
> but it gives the below mentioned error:
>                   pjsua_app.c       Invalid URL: unknown error -1
> [status=-1]
>                    pjsua_call.c        unable to call : Invalid Request URI
> (PJSIP_EINVALIDREQUURI) [status=171042]
>
> I read that pjsip supports IPv6 but not able to find how.
> Can anybody tell what changes do I need to make to make enable IPv6 address
> calling.
>

We tested IPv6 (SIP and media) calls with another implementation and
it seems to be working fine, but you're right, the IPv6 support is
still experimental for now and some modifications to the application
are needed to get it going.

First of all you need to use SVN trunk version since 0.8 release
doesn't support IPv6. Then put this in your config_site.h:

  #define PJ_HAS_IPV6 1

Then you need to modify pjsua_app.c to create IPv6 SIP and media
transports. For the SIP transport, replace PJSIP_TRANSPORT_UDP with
PJSIP_TRANSPORT_UDP6 (and same for TCP, although I haven't tested with
TCP. But it should work).

For IPv6 media transports, you'd need to create the media transports
manualy with pjmedia_transport_udp_create3(), specifying pj_AF_INET6()
as "af" argument, then give the media transport instances in the array
to pjsua-lib with pjsua_media_transports_attach().

Then when making calls, don't forget to enclose the IPv6 host part of
the URI with square brackets (e.g. "sip:user@[::1]"), otherwise you'll
get the Invalid URI error. You may be able to resolve IPv6 hosts as
long as DNS resolver is disabled (i.e. don't use --nameserver option
in pjsua), but I haven't tried this.

Good luck. :)

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