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 8506495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:36:25+00:00 2026-06-11T02:36:25+00:00

So I have a compiled and running Siphon app but it just won’t make

  • 0

So I have a compiled and running Siphon app but it just won’t make the calls.
I get:

registration error – default error message.

Full error is this:

15:04:02.032 pjsua_call.c Making call with acc #0 to sip:6476805821@voip5-2.acanac.com
15:04:02.032 pjsua_call.c .Unable to make call because account is not valid: Invalid operation (PJ_EINVALIDOP) [status=70013]
15:04:05.580 call.m Error making call: Invalid operation (PJ_EINVALIDOP) [status=70013]

But when I use the same account on a different SIP app, it works perfectly fine.

When pjsip calls sip_dial_with_uri(_sip_acc_id, [url UTF8String], &call_id);

_sip_acc_id is 0 since I believe it’s the 0th account that’s in the settings for siphon.
url is the correct phone number I’m trying to dial but shows something like:
sip:62304892@url.com
and call id is just a reference so I dunno if it’s important.

When I look at other voip apps, they have a registration process. Where you enter you username, password, and sip server domain or ip.

For Siphon, this is done in the settings file. However, if “register or login” is done in Siphon’s code or not, I’m not sure.
Could that be the problem?

This is the code that tries to make an actual call:

/** FIXME plutôt à mettre dans l'objet qui gère les appels **/
-(void) dialup:(NSString *)phoneNumber number:(BOOL)isNumber
{
  pjsua_call_id call_id;
  pj_status_t status;
  NSString *number;

  UInt32 hasMicro, size;

  // Verify if microphone is available (perhaps we should verify in another place ?)
  size = sizeof(hasMicro);
  AudioSessionGetProperty(kAudioSessionProperty_AudioInputAvailable,
                          &size, &hasMicro);
  /*if (!hasMicro)
  {
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"No Microphone Available", @"SiphonApp")
                                                    message:NSLocalizedString(@"Connect a microphone to phone", @"SiphonApp")
                                                   delegate:nil 
                                          cancelButtonTitle:NSLocalizedString(@"OK", @"SiphonApp")
                                          otherButtonTitles:nil];
    [alert show];
    [alert release];
    return;
  }*/

  if (isNumber)
    number = [self normalizePhoneNumber:phoneNumber];
  else
    number = phoneNumber;

  if ([[NSUserDefaults standardUserDefaults] boolForKey:@"removeIntlPrefix"])
  {
    number = [number stringByReplacingOccurrencesOfString:@"+"
                                               withString:@"" 
                                                     options:0 
                                                       range:NSMakeRange(0,1)];
  }
  else
  {
  NSString *prefix = [[NSUserDefaults standardUserDefaults] stringForKey:
                      @"intlPrefix"];
  if ([prefix length] > 0)
  {
    number = [number stringByReplacingOccurrencesOfString:@"+"
                                                   withString:prefix 
                                                      options:0 
                                                        range:NSMakeRange(0,1)];
  }
  }

  // Manage pause symbol
  NSArray * array = [number componentsSeparatedByString:@","];
  [callViewController setDtmfCmd:@""];
  if ([array count] > 1)
  {
    number = [array objectAtIndex:0];
    [callViewController setDtmfCmd:[array objectAtIndex:1]];
  }

  if (!isConnected && [self wakeUpNetwork] == NO)
  {
    _phoneNumber = [[NSString stringWithString: number] retain];
    if (isIpod)
    {
      UIAlertView *alertView = [[[UIAlertView alloc] initWithTitle:nil 
                                                           message:NSLocalizedString(@"You must enable Wi-Fi or SIP account to place a call.",@"SiphonApp") 
                                                          delegate:nil 
                                                 cancelButtonTitle:NSLocalizedString(@"OK",@"SiphonApp")
                                                 otherButtonTitles:nil] autorelease];
      [alertView show];
    }
    else
    {
      UIActionSheet *actionSheet = [[[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"The SIP server is unreachable!",@"SiphonApp") 
                                                               delegate:self 
                                                      cancelButtonTitle:NSLocalizedString(@"Cancel",@"SiphonApp") 
                                                 destructiveButtonTitle:nil 
                                                      otherButtonTitles:NSLocalizedString(@"Cellular call",@"SiphonApp"),
                                     nil] autorelease];
      actionSheet.actionSheetStyle = UIActionSheetStyleDefault;
      [actionSheet showInView: self.window];
    }
    return;
  }

  if ([self sipConnect])
  {
    NSRange range = [number rangeOfString:@"@"];
      NSLog(@"%i", _sip_acc_id);
    if (range.location != NSNotFound)
    {
      status = sip_dial_with_uri(_sip_acc_id, [[NSString stringWithFormat:@"sip:%@", number] UTF8String], &call_id);
    }
    else
    status = sip_dial(_sip_acc_id, [number UTF8String], &call_id);
    if (status != PJ_SUCCESS)
    {
      // FIXME
      //[self displayStatus:status withTitle:nil];
      const pj_str_t *str = pjsip_get_status_text(status);
      NSString *msg = [[NSString alloc]
                       initWithBytes:str->ptr 
                       length:str->slen 
                       encoding:[NSString defaultCStringEncoding]];
      [self displayError:msg withTitle:@"registration error"];
    }
  }
}

Also if anyone has a link to the Siphon app’s code that’s newer and maybe works better, I’d appreciate that as well.

More info:

in call.m file essentially this gets called:

status = pjsua_call_make_call(acc_id, &pj_uri, 0, NULL, NULL, call_id);

and here

acc_id = 0

pj_uri = char *-> “sip:6476805821@voip5-2.acanac.com”
pj_ssize_t -> 33

call_id = 803203976

  • 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-11T02:36:27+00:00Added an answer on June 11, 2026 at 2:36 am

    I figured this out. Turns out, the siphon app wasn’t registering the account.
    The code below is important:

    pj_status_t sip_connect(pj_pool_t *pool, pjsua_acc_id *acc_id)
    {
    
    // ID
      acc_cfg.id.ptr = (char*) pj_pool_alloc(/*app_config.*/pool, PJSIP_MAX_URL_SIZE);
      if (contactname && strlen(contactname))
        acc_cfg.id.slen = pj_ansi_snprintf(acc_cfg.id.ptr, PJSIP_MAX_URL_SIZE, 
                                           "\"%s\"<sip:%s@%s>", contactname, uname, server);
      else
        acc_cfg.id.slen = pj_ansi_snprintf(acc_cfg.id.ptr, PJSIP_MAX_URL_SIZE, 
                                           "sip:%s@%s", uname, server);
      if ((status = pjsua_verify_sip_url(acc_cfg.id.ptr)) != 0) 
      {
        PJ_LOG(1,(THIS_FILE, "Error: invalid SIP URL '%s' in local id argument", 
          acc_cfg.id));
        [app displayParameterError: @"Invalid value for username or server."];
        return status;
      }
    
      // Registrar
      acc_cfg.reg_uri.ptr = (char*) pj_pool_alloc(/*app_config.*/pool, 
        PJSIP_MAX_URL_SIZE);
      acc_cfg.reg_uri.slen = pj_ansi_snprintf(acc_cfg.reg_uri.ptr, 
        PJSIP_MAX_URL_SIZE, "sip:%s", server);
      if ((status = pjsua_verify_sip_url(acc_cfg.reg_uri.ptr)) != 0) 
      {
        PJ_LOG(1,(THIS_FILE,  "Error: invalid SIP URL '%s' in registrar argument",
          acc_cfg.reg_uri));
        [app displayParameterError: @"Invalid value for server parameter."];
        return status;
      }
    
      ...
      more code here
      ...
    }
    

    This is where your account gets registered to a SIP server.
    Make sure the sip_connect function gets called from the main application itself shown below:

    /* */
    - (BOOL)sipConnect
    {
      pj_status_t status;
    
      if (![self sipStartup])
        return FALSE;
    
      //if ([self wakeUpNetwork] == NO)
      //  return NO;
        NSLog(@"%i", _sip_acc_id);
      //if (_sip_acc_id == PJSUA_INVALID_ID)
      //{
        self.networkActivityIndicatorVisible = YES;
        if ((status = sip_connect(_app_config.pool, &_sip_acc_id)) != PJ_SUCCESS)
        {
          self.networkActivityIndicatorVisible = NO;
          return FALSE;
        }
      //}
    
      return TRUE;
    }
    

    in my case _sip_acc_id wasn’t equal to PJSUA_INVALID_ID therefore sip_connect was never getting called.

    Thanks for all of those who tried to solve it in their head? 🙂

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

Sidebar

Related Questions

I have a Win32 C++ application I have compiled on a PC running Windows
I have been trying to build an online java compiler. But running the clients
I have compiled a simple win32 app successfully with bc++ (2 lines excerpt only):
I have compiled this using Visual Studio 2010 compiler and it has compiler error
I'm running 64-bit Solaris 10, and I have self-compiled Perl 5.10 and Postgresql 8.4.1
I have a C++ application cross-compiled for Linux running on an ARM CortexA9 processor
I have just compiled this code: http://www.win32developer.com/tutorial/winsock/winsock_tutorial_2.shtm I have added some codes so it
I have a .NET 4.0 console application running on a production server. The app
I have a corba server compiled and running on JVM 1.2 . I am
I have multiple apps compiled with g++, running in Ubuntu. I'm using named semaphores

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.