Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8703751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:56:16+00:00 2026-06-13T02:56:16+00:00

I am experiencing a problem on Android when sending SIP packets over UDP to

  • 0

I am experiencing a problem on Android when sending SIP packets over UDP to the port 5060 using a device instead of the emulator. The exception is:

java.net.SocketException: sendto failed: EPERM(Opereation not permitted)

On some devices such as the Galaxy Nexus the same code works bot on other devices such as the Asus Transformer TF101 and the Galaxy Tab 2 I am experiencing these problems. I have the required permission android.permission.INTERNET. When sending the same SIP packet over another port (say 9876) the packet is sent successfully. Even when sending other content over port 5060 (not SIP packets) the packet is still sent successfully. It seems that the combination of SIP packets over port 5060 are not being permitted on some devices. I created a test program to replicate this problem:

try
{
    DatagramSocket clientSocket = new DatagramSocket();
    InetAddress IPAddress = InetAddress.getByName("10.111.110.6");
    byte[] sendData = new byte[1024];
    byte[] receiveData = new byte[1024];
    String sentence = "Register sip ...";
    sendData = sentence.getBytes();
    DatagramPacket sendPacket = new DatagramPacket(sendData, 
        sendData.length, IPAddress, 5060);
    clientSocket.send(sendPacket);
    DatagramPacket receivePacket = new DatagramPacket(receiveData, 
        receiveData.length);
    clientSocket.receive(receivePacket);
    int x = receivePacket.getLength();
    String modifiedSentence = new String(receivePacket.getData(), 0, x);
    ds_tv.setText("FROM SERVER:" + modifiedSentence + " Length: "+ x);
    clientSocket.close();
}
catch (Exception e)
{
    Log.e("Test", e.getMessage());
    ds_tv.setText(e.getMessage());
}

This test program consists just of a single button and the above code is called in its onClick() event. The packet consisting of the String sentence which contains the SIP registration packet is not sent over port 5060. If I modify the port, the packet is sent successfully and even if I modify the content of the string sentence. However if I send the SIP registration packet over port 5060 the SocketException occurs. I do not know what could be the problem or how to go about solving such an issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T02:56:16+00:00Added an answer on June 13, 2026 at 2:56 am

    The problem has been solved and the error was being caused from the payload of the SIP packet. The CSeq value in the SIP packet was being set to 0 initially. Instead it had to start from 1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am experiencing a problem with android emulator as described @ https://stackoverflow.com/questions/3986202/exception-after-starting-emulator-ddms-null Can someone
I am experiencing this problem with Node.js express framework 3.0: https://github.com/visionmedia/express/issues/1187 I've been using
I'm experiencing the problem described in this Android issue: http://code.google.com/p/android/issues/detail?id=4536 Simply put, after pressing
Some users of my application are experiencing a weird problem when using my application
I am experiencing a very strange phenomenon (test device: HTC Desire HD, Android 2.3.5).
I'm experiencing some problem loading a JSONArray on the Android. I've constructed the JSON
i am experiencing a problem with using the delay in jQuery's .animation function, when
I'm experiencing a weird problem after we've submitted our first app on the Android
I am experiencing problem to strem music from ios device to dlna device. How
i am currently experiencing a problem were i get *** glibc detected *** ./efit:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.