Coder Social home page Coder Social logo

pj-nat64's People

Contributors

johanlantz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pj-nat64's Issues

Help to intergation client pjsip ipv6

Hi johanlantz,
Many thanks for your code. But can you give me some instructions to integrate your code with my client pjsip to solve ipv6 problems.

Thanks for your help !

Failed parsing outgoing INVITE request for some networks

We are not able to make a call to some networks on their LTE network.

Call-ID: CwFphy4PUdJxcLeCutjML81MSAB2Aj3a
CSeq: 5523 INVITE
Route: sip:udp9000.azhsbc.solint.net:9000;transport=udp;lr
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 7200
Min-SE: 90
User-Agent: CrexmoUA iOS v3.1.3
Proxy-Authorization: Digest username="3141", realm="486709.crexendo.com", nonce="39689fa8-22e6-450a-83b9-e4406d25a4af", uri="sip:[email protected]", response="92edb72701fc29ab2acf82a539de1145", algorithm=MD5, cnonce="BzzyCmhWkRkL4esDmhsgcFgBQIyVR9Ti", qop=auth, nc=00000001
Content-Type: application/sdp
Content-Length: 432

v=0
o=- 3823177254 3823177254 IN IP4 192.168.1.1
s=pjmedia
b=AS:117
t=0 0
a=X-nat:0
m=audio 11780 RTP/AVP 0 125 97 105 101
c=IN IP4 192.168.1.1
b=TIAS:96000
a=rtcp:11781 IN IP4 192.168.1.1
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:125 opus/48000/2
a=fmtp:125 useinbandfec=1
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:105 SILK/8000
a=fmtp:105 useinbandfec=0
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16

ipv6_mod_on_tx
Outgoing INVITE or 200 OK. If it contains IPv6 addresses, we need to change to ipv4
Outgoing INVITE or 200 with IPv6 address***
Scanner syntax error at
error: Parsing of the outgoing INVITE/200 OK failed at . Leave incoming buffer as is
SIPUA_CallStateChanged sipstate=6 status=408
IPUA call state change from 1 to 7 on 0x<CallLogWrapper: 0x283130480>

This is what we are getting in logs. This happens only in some of the network providers (e.g TMobile) with rest of the network it works fine. Please help me to understand what went wrong.

Failed parsing outgoing INVITE request

2016-08-03 15:59:10.368 White Calling[1363:589121] void pjsua_log_cb(int, const char *, int) line 300 $ 4: 15:59:10.365 pjsua_core.c ....TX 1118 bytes Request msg INVITE/cseq=1296 (tdta0x13d988800) to TLS 64:ff9b::c308:60ac:5061:
INVITE sip:[email protected] SIP/2.0

Via: SIP/2.0/TLS [2001:2::aab1:4054:c5e0:9ec0:f674]:50099;rport;branch=z9hG4bKPjmsE4Ooa4hGK9AxKNRxeuqrXfingP-iBq;alias

Max-Forwards: 70

From: sip:[email protected];tag=4b07VI3HOfXQZK8A81.wlsAO7vY9liSk

To: sip:[email protected]

Contact: sip:2c0e447a7ac1b493bbbcd1a21_447800000005@[2001:2::aab1:4054:c5e0:9ec0:f674]:50099;transport=TLS;ob

Call-ID: PkuGH24FhF6BxkGpRL5y-he1vRnXdHn9

CSeq: 1296 INVITE

Route: sip:[64:ff9b::c308:60ac]:5061;transport=tls;lr

Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

Supported: replaces, 100rel, norefersub

Content-Type: application/sdp

Content-Length: 346

v=0

o=- 3679243150 3679243150 IN IP4 25.96.255.115

s=pjmedia

b=AS:84

t=0 0

a=X-nat:0

m=audio 4000 RTP/AVP 104 0 8 96

c=IN IP4 25.96.255.115

b=TIAS:64000

a=rtcp:4001 IN IP4 25.96.255.115

a=sendrecv

a=rtpmap:104 iLBC/8000

a=fmtp:104 mode=30

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:96 telephone-event/8000

a=fmtp:96 0-16

--end msg--
2016-08-03 15:59:10.371 White Calling[1363:589121] void pjsua_log_cb(int, const char , int) line 300 $ 4: 15:59:10.368 pj-nat64.c ....ipv6_mod_on_tx
2016-08-03 15:59:10.374 White Calling[1363:589121] void pjsua_log_cb(int, const char *, int) line 300 $ 4: 15:59:10.371 pj-nat64.c ....Outgoing INVITE or 200 OK. If it contains IPv6 addresses, we need to change to ipv4
2016-08-03 15:59:10.377 White Calling[1363:589121] void pjsua_log_cb(int, const char *, int) line 300 $ 4: 15:59:10.374 pj-nat64.c ....
******_Outgoing INVITE or 200 with IPv6 address_**********
2016-08-03 15:59:10.380 White Calling[1363:589121] void pjsua_log_cb(int, const char *, int) line 300 $ 4: 15:59:10.377 pj-nat64.c ....Scanner syntax error at
2016-08-03 15:59:10.383 White Calling[1363:589121] void pjsua_log_cb(int, const char *, int) line 300 $ 1: 15:59:10.380 pj-nat64.c ....Error: Parsing of the outgoing INVITE/200 OK failed at . Leave incoming buffer as is

how do I integrate the pj-nat64.c and pj-nat64.h file in my objective c project

Hi ,
I checked with this steps https://stackoverflow.com/questions/43915256/pjsip-registration-to-ipv4-server-from-nat64-network-in-ios
I had done :

  1. Download the pj-nat64 source from above link.

  2. Unzip the file and copy pj-nat64.c file paste into the pjproject (means pjsip source) (path is: pjsip/src/pjsua-lib)

  3. Copy pj-nat64.h file paste into the pjproject (means pjsip source) (path is: pjsip/include/pjsua-lib)

  4. Need to add the pj-nat64.o in the makefile of pjsip (Make file path is: pjsip/build) -- I am confused about this step. How should I add this into makefile in my objective C code.

on_reg_state callback activation

Hi

I'm trying to activate the nat64 module the way you recommend it, by checking the transport type in registration callback.

However, I cannot get pjsua to connect to IPv6 without explicitly specifying the IPv6 transport to the account
doing like the pjsip wiki, acc_cfg.transport_id = tcp6_tp_id before adding account

Do you manage to get pjsip to smart automatically select the IPv6 (or IPv4) transport ?

module integration issue

Hi.
I integrate your code with my pjsip project, but I have a issue.

I register module, but it doesn't work! And I need do some other setting? Here is my code.

status = pjsua_start();
if (status != PJ_SUCCESS) {
    CLog(@"pjsua_start error...");
    return ;
}
pj_nat64_enable_rewrite_module();

pjsua_acc_config acc_cfg;
pjsua_acc_config_default(&acc_cfg);
acc_cfg.reg_retry_interval = 10;
acc_cfg.id = pj_str((char *)[NSString stringWithFormat:@"sip:%@@%@", username, server].UTF8String);
acc_cfg.reg_uri = pj_str((char *)[NSString stringWithFormat:@"sip:%@", server].UTF8String);
acc_cfg.cred_count = 1;
acc_cfg.cred_info[0].scheme = pj_str("digest");
acc_cfg.cred_info[0].realm = pj_str("*");
acc_cfg.cred_info[0].username = pj_str((char *)username.UTF8String);
acc_cfg.cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
acc_cfg.cred_info[0].data = pj_str((char *)password.UTF8String);
acc_cfg.transport_id = tp_id;
acc_cfg.ipv6_media_use = PJSUA_IPV6_ENABLED;
pjsua_acc_add(&acc_cfg, PJ_TRUE, &acc_id);

integration issues

Hi

Many thanks for your code I'm trying to integrate !

I'm facing a first issue. I will go deeper by myself but here it is:

When receiving an incoming call
replace_sdp_ipv4_with_ipv6 is called,

-ipv4 addresses are correctly parsed detected
-IP4 gets replaced by IP6
but the ipv4 addresses are not replaced, ie I have in the modified message:

o=FreeSWITCH 1466244684 1466244685 IN IP6 192.168.1.124

s=FreeSWITCH

c=IN IP6 192.168.1.124

t=0 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.