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

  • Home
  • SEARCH
  • 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 8715333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:49:13+00:00 2026-06-13T05:49:13+00:00

I have followed PJSIP tutorial and I have successfully build apjsua sample application. When

  • 0

I have followed PJSIP tutorial and I have successfully build apjsua sample application.

When I try to add account by +a it ask me for Sip Url, Url of the Registrar, Auth Realm, username, Password

I entered

  • Sip Url : sip:140@122.252.232.5
  • Registrar : sip:122.252.232.5
  • Auth Realm : *
  • Username : 140
  • Password : example

After that it gave me following error

    10-17 19:57:27.165: I/apjsua(920): 19:57:27.165  sip_resolve.c  ...Failed to resolve '122.252.232.532.5'. Err=70018 (gethostbyname() has returned error (PJ_ERESOLVE))
10-17 19:57:27.174: I/apjsua(920): 19:57:27.174    tsx0x223a5c  ...Failed to send Request msg REGISTER/cseq=54907 (tdta0x1eb9a0)! err=70018 (gethostbyname() has returned error (PJ_ERESOLVE))
10-17 19:57:27.185: I/apjsua(920): 19:57:27.185    pjsua_acc.c  .....SIP registration failed, status=502 (gethostbyname() has returned error (PJ_ERESOLVE))
10-17 19:57:27.199: I/apjsua(920): 19:57:27.199    pjsua_acc.c  .....Scheduling re-registration retry for acc 2 in 6 seconds..
10-17 19:57:27.212: I/apjsua(920): 19:57:27.212      sip_reg.c  ..Error sending request, status=70018
10-17 19:57:27.226: I/apjsua(920): 19:57:27.226    pjsua_acc.c  ..Unable to create/send REGISTER: gethostbyname() has returned error (PJ_ERESOLVE) [status=70018]

Does any body know where I am getting wrong???

Or does anybody know any other way to use pjsip library for android???

  • 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-13T05:49:13+00:00Added an answer on June 13, 2026 at 5:49 am

    You’re in luck. I was sitting with this problem a few days ago and it just looked like a simple initialization error. You should really get to grips with debugging c code else you’re gonna have a hard time understanding the pjsip stack. Anyway here’s what you do:

    Make the “setInput” method under /pjsip-apps/src/pjsua/main_android.c look like this:

    void setInput(char *s)
    {
      int i = 0;
    
      for (i = 0; i < sizeof(app_var.line); i++)
      {
          app_var.line[i]=NULL;
      }
    
      /* app_var.line[0] = 0; */
    
      if (strlen(s) < sizeof(app_var.line))
          strncpy(app_var.line, s, strlen(s));
      pj_sem_post(app_var.input_sem);
    }
    

    Looking at the code changes, you should be able to see that the app_var.line char variable was not being cleared properly. Now go to the /pjsip-apps/build/ folder and execute “make”. Then go to the /pjsip-apps/src/apjsua/ folder and execute “make”. Thereafter refresh your eclipse project and run. That should do the trick.

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

Sidebar

Related Questions

I have followed this tutorial for building my chat application. When I try to
Hi have followed this tutorial using Core plot framework http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application My project compiles, but
I have followed a tutorial to create a simple blog writing application in PHP
I have followed this tutorial http://blogs.wrox.com/article/creating-a-simple-ipad-application-table-view/ (creating a uitableview and populating it). I want
I have followed a tutorial on how to use the youtube gdata. Populating a
I have followed the tutorial for getting a Thunderbird extention going and succeeded in
I have followed his popular tutorial to connect Android to MySQL: http://www.helloandroid.com/tutorials/connecting-mysql-database It is
I have followed this tutorial which allowed me to create a Silverlight DataGrid that
I have followed this tutorial: http://www.shawngrimes.me/2011/04/custom-map-pins-for-mapkit/#comment-193 but I can't add a title and description
I have followed this blog post: url to integrate less with Umbraco. Also, while

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.