How to bridge a call to real phone from a sip phone in Freeswitch. I have used following command but it didn’t work
<action application="bridge" data="sofia/gateway/ytel.com/xxxxxx#ip"/>
Thanks in advance
If you have the gateway ytel.com set up, then you shouldn't have #ip, it should be:
<action application="bridge" data="sofia/gateway/ytel.com/xxxxxx"/>
You either use sofia/gateway/$myCarrier/$number OR sofia/$profile/$number#$IPorDomain
Related
Edit
I erased everything for clarity. as i am going to simplify my request for information:
What is best way to handle receiving messages from a wear on a mobile when the mobile is asleep or if app is not in the foreground?
During both these circumstances even though i send messages to the mobile from the wear, the mobile does not receive or process them. i do not know which.
if have read the following:
1) partial wakelocks - no good i dont want to really keep CPU awake
2) handler
3) broadcastreceiver
4) service
i do not know exactly what i should do in order to process messages with my app when app is not in the foreground and/or asleep.
If the onMessageReceieved() SHOULD process during sleep and or when app is not in foreground letting me know that would also be beneficial as right now i think it should not based on what i am seeing in my app.
Also i am using livelisteners instead of a listener service. is this my problem? if i instead switch to a wearablelistenerservice class will that solve my issues and work correctly?
i do this
#Override
public void onConnected(Bundle connectionHint) {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "Connected to Google Api Service");
}
Wearable.MessageApi.addListener(mGoogleApiClient, this);
}
instead of if i do this:
public class DataLayerListenerService extends WearableListenerService{
and put all my codes in there and then do this:
<service android:name=".DataLayerListenerService">
<intent-filter>
<action android:name="com.google.android.gms.wearable.DATA_CHANGED" />
<data android:scheme="wear" android:host="*"
android:path="/start-activity" />
</intent-filter>
</service>
will that solve my not receiving messages problem when not in foreground and when phone is asleep? as this intent will act as a service that runs in the background?
You might want to check Keeping the Device Awake wherein it discussed different approaches that you can use such as keeping the CPU on.
As mentioned,
If you need to keep the CPU running in order to complete some work before the device goes to sleep, you can use a PowerManager system service feature called wake locks. Wake locks allow your application to control the power state of the host device.
You may find more tips and information in the use of wake locks from the given documentation.
Using a class that extends WearableListenerService and adding service to manifest worked for working while phone is off. Now i just need to implement and interact into the main feed to update data on the main screen
Can somebody tell me how to prevent my freeswitch extension from hangup after playing some music?
Here is my extension:
<include>
<extension name="welcome_ivr" continue="true">
<condition field="destination_number" expression="^411$">
<action application="answer" />
<action application="playback" data="/usr/local/funny.wav"/>
</condition>
</extension>
</include>
and to this extension i call a script which look likes this:
def handler(session, args):
logging.basicConfig(filename='/tmp/test.log',level=logging.INFO)
while session.ready():
logging.info("string")
return
So after the song is played it hangup. How can i prevent that. I want the channel stay open also after the song is played and only hangup if i want to hangup (session.hangup())
Hope somebody can help me.
Yes, once the song is over it's "done" so it hangs up.
Have it go to park after, then it will stay open until the park timeout.
<action application="park" />
It was very simple. I just change the extension to play the song endless.
<action application="endless_playback" data="/usr/local/funny.wav"/>
So i can do stuff how long i want.
I have been develop Phonegap android App. I put folder www in remote server, and in MainActivity(DroidGap) i loadUrl from server. I had config in Phonegap and App running in device ( load and show page from server). But problem when i send request by Ajax to server then it fail. It could not connect to any host. Please help me? Thanh you so much.
- MainActivity
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.loadUrl("http://172.16.3.198:8080/ServerMail/index.html");
}
- Config.xml
<access origin="*"/>
<content src="http://172.16.3.198:8080/ServerMail/index.html" />
the app does not have the internet permission. you can edit AndroidManifest.xml, and something like below:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.petro"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET"/>
Usually you have your 'site' files local to the app, not on a remote server, otherwise there is little point to Phonegap.
Here you might find that your URL is simply not reachable. A 172.16.x.x address is local to the network the server is hosted on, perhaps your phone is not on that network, especially if you are using 3G to connect.
Also, bare in mind that depending on the phone you use, you may be using an old version of webkit. As I've developed Phonegap apps, I have run into problems with jQuery 2 and older Android releases (2.1 for example). It seems to me that what you're doing is not a good use of Phonegap, and you might be better off using a shortcut instead.
I have included the AccountManager code in my app to enable the user to create and manage their account from inside their Settings application.
I linked in the "accountPreferences" preferences file inside my account-authenticator definition, and the options show properly in the Settings > Accounts > My App screen. When I tap on one of them, instead of getting the activity I linked in, I get:
01-14 14:47:27.304: ERROR/AndroidRuntime(27708): FATAL EXCEPTION: main
android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
at android.app.ContextImpl.startActivity(ContextImpl.java:944)
at android.app.ContextImpl.startActivity(ContextImpl.java:931)
at android.preference.Preference.performClick(Preference.java:967)
at android.preference.PreferenceScreen.onItemClick(PreferenceScreen.java:215)
I have the intents inside my PreferenceScreen defined as:
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="com.myapp.android"
android:targetClass="com.myapp.android.activities.AccountForwardingActivity"/>
And the target activity is also defined as you'd expect, with no special flags other than an intent-filter to match that action (I have other custom actions listed as well).
<activity android:name=".activities.AccountForwardingActivity"
android:theme="#style/Theme.MyApp"
android:launchMode="singleTask">
<intent-filter>
<action android:name="com.myapp.android.PAYMENT_TYPES"/>
<action android:name="com.myapp.android.ADDRESS_LIST"/>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
What am I doing wrong? How can I mark this intent, launched from Settings.apk, to be a new task?
My problem was putting the Preference Screens inside my PreferenceCategory.
This works fine:
<PreferenceCategory android:title="General Settings" />
<PreferenceScreen
android:title="Account Settings"
android:summary="Favorites, Orders, and more.">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="com.myapp.android"
android:targetClass="com.myapp.android.activities.AccountForwardingActivity"/>
</PreferenceScreen>
Nesting that PreferenceScreen inside the PreferenceCategory does not work, and results in the error above.
I'm writing a Rhomobile application targeted at iPhone and Android.
I need to create a custom url scheme, so that i can create urls that look like test://some-params that will launch my program and will pass it the params.
As far as I understand this is done in build.yml through the BundleURLScheme parameter, and then System.get_start_params() to get those parameters.
However, this works on the iPhone only as far as I understand.
Is there any way to make this work on Android too?
Thanks alot!
OKay, I've found the answer myself, in case anybody needs this too:
Create an extension to the application as explained here:
http://docs.rhomobile.com/rhodes/extensions#generating-a-native-extension-template
Add an android_manifest_changes file, as decribed in the above link.
In that file add the following lines:
<manifest xmlns:android='http://schemas.android.com/apk/res/android'
android:versionName='1.0' package='com.rhomobile.webbrowserpoc'
android:versionCode='10000' android:installLocation='auto'>
<application android:name='com.rhomobile.rhodes.RhodesApplication'
android:label='#string/app_name' android:icon='#drawable/icon'
android:debuggable='true'>
<activity android:name='com.rhomobile.rhodes.RhodesActivity'
android:label='#string/app_name' android:launchMode='singleTask'
android:configChanges='orientation|keyboardHidden'
android:screenOrientation='unspecified'>
<intent-filter>
<action android:name='android.intent.action.VIEW' />
<category android:name='android.intent.category.BROWSABLE' />
<category android:name='android.intent.category.DEFAULT' />
<data android:pathPrefix='' android:scheme=''
android:host='' />
</intent-filter>
</activity>
</application>
Only the <data android:pathPrefix='' android:scheme='' android:host='' /> line should be filled in with correct properties.