Need help intercepting incoming calls in FreePBX for Zoiper Android SDK push proxy
Hello,
I’m implementing a softphone feature inside my own Android application using the Zoiper Android SDK.
I’m not using the Zoiper softphone app itself — I’m only integrating their SDK inside my custom app.
For incoming calls to work reliably on mobile without keeping a constant SIP registration (to save battery), I want to implement push notifications similar to Zoiper’s Push Proxy flow:
- Intercept the incoming SIP INVITE on the PBX.
- Trigger my push notification service (using Zoiper SDK methods on the app side).
- Wait for the mobile client to wake up and register.
- Deliver the call once registration is complete.
My current challenge is step 1 — intercepting incoming calls in FreePBX.
I want to:
- Catch all calls for certain extensions (initially for testing, e.g., extension
1114
). - Log them in
/var/log/asterisk/full
to confirm interception works. - Later, replace the log step with an HTTP POST to my push server.
Test Dialplan Attempt
I tried creating a custom context in /etc/asterisk/extensions_custom.conf
:
[from-push-test-1114]
exten => 1114,1,NoOp(*** PUSH PROXY TEST - Call to 1114 from ${CALLERID(num)} ***)
same => n,Verbose(1,*** Interception worked for EXTEN=1114 ***)
same => n,Wait(1)
same => n,Dial(PJSIP/1114,30) ; Ring extension for 30 sec
same => n,Hangup()
Then I attempted to route calls to this context via Custom Destinations, but the call often disconnects after 1 second.
**Questions**
* What’s the best FreePBX-friendly way to hook into the dialplan for a specific extension (and later all extensions) without breaking call flow?
* Should I override contexts in extensions_override_freepbx.conf or use a -custom context in extensions_custom.conf?
* Is there a standard or recommended approach to insert interception before the extension is rung?
* Any examples of how others have implemented push proxy or similar logic with FreePBX + PJSIP?
System details:
* 1. FreePBX
* 2. Using PJSIP extensions
* 3. Zoiper Android SDK (not the app)
Any advice, working examples, or documentation references would be greatly appreciated.
Thanks,