[SIPForum-discussion] undefined reference to 'input' && undefined reference to 'pjsua_invite'

Rachel Baskaran rachelbaskaran at gmail.com
Wed Sep 9 18:48:50 UTC 2009


When I run this below script it shows the above error:( this is just a part
of script )

static void ui_console_main(void)
{
char buf[128];
pjsip_inv_session *inv;

//ui_help();

for(;;)
{

ui_help();
fgets(buf, sizeof(buf), stdin);

switch (buf[0]) {

case 'm':
if(inv_session != NULL) {
puts("Can not make call while another one is in progress");
fflush(stdout);
continue;
}

#if 1

   /* Make call!: */
if(!input("Enter URL to call", buf, sizeof(buf)))
continue;
pjsua_invite(buf, &inv);

#else

pjsua_invite("sip:alice at example.com:5061", &inv);

case 'a':

if(inv_session == NULL || inv_session->role != PJSIP_ROLE_UAS ||
inv_session->state >= PJSIP_INV_STATE_CONNECTING)
{
puts("No pending incoming call");
fflush(stdout);
continue;
}

else
{
pj_status_t status;
pjsip_tx_data *tdata;

if(!input("Answer with code (100-699)", buf, sizeof(buf)))
continue;



status = pjsip_inv_answer(inv_session, atoi(buf) ,NULL,NULL, &tdata);
if(status == PJ_SUCCESS)
status = pjsip_inv_send_msg(inv_session, tdata);

if(status != PJ_SUCCESS)
error_exit("Unable to create/send response", status);
}

break;

The script registers and displays the console keys, I want the script to
make a call either by entering the URL or call the URL specified in
pjsua_invite(sip:alice at example.com:5061), when press a ( answer the call )
and h( to hangup the call )

guess this answer and hangup work once I make the call part work. But I'm
struck with this error, how do I solve this?

Any help!

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sipforum.org/pipermail/discussion/attachments/20090909/1e23fb0f/attachment-0002.html>


More information about the discussion mailing list