But while i have to do configure it on every extension, i want it for all extensions for in- and outbound calls, never mind on status of the extension.
Can anybody point me to the right path to configure it?
hooking the dialplan seems the right way, but do you (or anybody) know how to solve this:
When my iPhone-App goes to background, it’s derigistered on freepbx. In this case the callers seen “call ended” immediately. So, it seems freepbx means there is no endpoint registered, and quit the call.
Asterisk should not drop an ongoing call because the other party unregisters. REGISTER should only apply to new calls in the reverse direction to the registration. Please provide the full log with protocol debugging on (e.g. pjsip set logger on) demonstrating that Asterisk closes the call in response to the un-REGISTER, and not in response to a BYE, or session timer or RTP timeout.
thanks for reply. I tried to investigate as good as i can. With sngrep i can see an INVITE from my extension 15 to 7 (7 is the mobile device). After this i’ll get an TRYING and then a “503 Service unavailable” back to ext. 15 (as i wrote “call ended”).
In the Logs i have this:
OPTIONS sip:[email protected]:62166;pn-prid=B0A9AE68135C1882-STRIPPED-DEVICE-ID-BD51D3B2CC6C4BAE045AA00062B:voip;pn-provider=apns.dev;pn-param=ABCD1234.com.company.esilphone.voip;pn-silent=1;pn-timeout=0;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-groupchat-str=GC_MSG;pn-call-snd=notes_of_the_optimistic.caf;pn-msg-snd=msg.caf SIP/2.0
From: <sip:[email protected]>;tag=22f5c4d8-d182-4a02-9d3f-d9eb793cde5f
To: <sip:[email protected];pn-prid=B0A9AE68135C1882-STRIPPED-DEVICE-ID-BD51D3B2CC6C4BAE045AA00062B:voip;pn-provider=apns.dev;pn-param=ABCD1234.com.company.esilphone.voip;pn-silent=1;pn-timeout=0;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-groupchat-str=GC_MSG;pn-call-snd=notes_of_the_optimistic.caf;pn-msg-snd=msg.caf>
I don’t know what asterisk is trying here every 2 seconds. But what i see is, asterisk knows my App (com.company.esilphone.voip : esilphone is the name of the App) and has a knowledge about the device token of my App
The mobile has aborted the call, independently of any un-REGISTER. That’s not within Asterisk’s control.
The call is unanswered, at this stage, so I wouldn’t describe it as having started. When I talked about BYE, I was assuming it had started. (been answered).
As I think all apps have to be approved by Apple, and have to come from their store, the app implementor may have no choice other than abort the call set up, without violating the conditions for being available through their store. However, I’m an Android user and haven’t investigate Apple’s rules for apps in their store.
What is the callee doing that is causing the app to go into the background during an incoming call set up?
Asterisk has no implementation of push services or knowledge of it. Those can be in the Contact header, but Asterisk won’t do a thing with them itself. They’ll just get sent to whatever Asterisk is sending the SIP request to.
Asterisk has no implementation of push services or knowledge of it
Yes, i know. Thats why i have a script that triggers a push via APNS to the mobile on an incoming call. But because of “Service unavailable” immediately there is no chance to bring that call up.
I will check the peers after a time my App goes in background. There must be a reason why it’s not registered anymore or, like @david55 guessed, the mobile cancel the call.
I just investigate it a bit, and it seems because of app backgrounding the connection to asterisk is gone after a short time. Seems for me normal, because of battery drain. Here is the state of the peer:
To establish a call i have to send a push notification to the phone (type: voip). If i do so, my peer becomes available again, but it will not work as long asterisk shows the extension is not available for the caller…