Open ai-ls opened 7 years ago
I can only advice you do debug what is going on in your specific case. We use this in production since a couple of month but I know others have had to to minor adaptations to make it work in their environments (especially for the Route-Record rewriting that I have not implemented since it was not needed for us).
pjsip_transport* active_transport;
if (active_transport->factory->type & PJSIP_TRANSPORT_IPV6) {
PJ_LOG(2,(THIS_FILE, "New transport is ipv6, activate ipv6 media"));
pjsua_var.acc[your_active_account].cfg.ipv6_media_use = PJSUA_IPV6_ENABLED;
if (your_config.nat_64_bitmap) {
PJ_LOG(4,(THIS_FILE, "Activating NAT64 rewriting with value=%d", your_config.nat_64_bitmap));
pj_nat64_set_options(your_config.nat_64_bitmap);
}
}
thanks, which callback function we should call above code? in on_call_media_state(pjsua_call_id call_id)
or on_call_state(pjsua_call_id call_id, pjsip_event *e)
?
Hi, do you have some simple code that I can refer?
Sorry, the module is shared as is. I can not share more production code. I know several other projects has integrated it but you might have to do some tweaks. I have the module activation in the on_reg_state callback since at that state you do not yet care about media but signalling has completed and you can figure out if you are on ipv6 or not. (This code just assumes that you are behind NAT64 if the transport is ipv6).
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.