INT-8910: Add SRV resolutions callback to pjsua2, app uses to add iptables entry to allow outbound TCP traffic on resolved port#12
Merged
darshan-verkada merged 1 commit intoApr 3, 2026
Conversation
…results - Add pjsip_on_resolved_cb typedef and on_resolved field to pjsip_resolver_t - Add pjsip_resolver_set_on_resolved_cb() to set the callback on the resolver - Add pjsip_endpt_get_sip_resolver() returning the correct pjsip_resolver_t* (pjsip_endpt_get_resolver() returns the inner pj_dns_resolver* which caused struct corruption and a crash in pj_atomic_get when used incorrectly) - Invoke the callback in srv_resolver_cb with NULL guards - Wire on_srv_resolved through pjsua_callback and pjsua_core.c bridge - Expose onSrvResolved virtual method in pjsua2 Endpoint with SrvResolvedAddress and OnSrvResolvedParam parameter types; register static bridge in libInit Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 tasks
MattMacGregor
approved these changes
Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pjsip_on_resolved_cbtypedef andon_resolvedfield topjsip_resolver_tpjsip_resolver_set_on_resolved_cb()to register the callbackpjsip_endpt_get_sip_resolver()returning the correctpjsip_resolver_t*(vspjsip_endpt_get_resolver()which returns the innerpj_dns_resolver*causing struct corruption/crash)srv_resolver_cbwith NULL guardson_srv_resolvedthroughpjsua_callbackandpjsua_core.cbridgeonSrvResolvedvirtual in pjsua2EndpointwithSrvResolvedAddress/OnSrvResolvedParamtypesTest plan
onSrvResolvedinVEndpoint, verify it fires with resolved port/type after SIP registration🤖 Generated with Claude Code