make a call using pjsip

Hello

-Example of VOIP application using pjsip, in my application correctly registered with the server iptel, I created
-I want to make a call, but I'm not able to call. I get no error but nothing is happning.

Reference to this: http://208.74.204.192/t5/Native-Development/Porting-PJSIP-PJMEDIA-and-PJLIB-to-BlackBerry-10/ta-p/20...

Thank you all,

My Code is

status = pjsua_create();

    if (status != PJ_SUCCESS) {
        handleError("Error creating pjsua", status);
        return status;
    }

    {
        pjsua_config cfg;
        pjsua_logging_config log_cfg;

        pjsua_config_default(&cfg);

        // Set up the two static callbacks for session up session down
        // This is where all callbacks are initialized. See PJSIP documentation
        // session up
        cfg.cb.on_reg_started = &on_reg_started;
        // traps session down
        cfg.cb.on_transport_state = &on_tp_state_changed;

        // accept incomming call
        cfg.cb.on_incoming_call = &on_incoming_call;
        // Callback called by the library when call's media state has changed
        cfg.cb.on_call_media_state = &on_call_media_state;
        // Callback called by the library when call's state has changed
        cfg.cb.on_call_state = &on_call_state;

        pjsua_logging_config_default(&log_cfg);
        log_cfg.console_level = 4;

        pjsua_media_config media_cfg;

        pjsua_media_config_default(&media_cfg);

        status = pjsua_init(&cfg, &log_cfg, &media_cfg);

        qDebug() << "2. PJ_SUCCESS :" << PJ_SUCCESS << " status : " << status;

        if (status != PJ_SUCCESS) {
            handleError("Error initializing pjsua", status);
            return status;
        }

    }

    /* Add UDP transport. */
    {
        pjsua_transport_config cfg;

        pjsua_transport_config_default(&cfg);
        cfg.port = 5060;
        status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &cfg, NULL);
        if (status != PJ_SUCCESS) {
            handleError("Error creating transport", status);
            return status;
        }
    }

    /* Initialization is done, now start pjsua */
    status = pjsua_start();

    qDebug() << "3. PJ_SUCCESS :" << PJ_SUCCESS << " status : " << status;
    if (status != PJ_SUCCESS) {
        handleError("Error starting pjsua", status);
        return status;
    }

    /* Register to SIP server by creating SIP account. */
    {
        pjsua_acc_config cfg;

        pjsua_acc_config_default(&cfg);

        std::string id(sipPrefix + sipUser + atSymbol + sipDomain);
        cfg.id = pj_str((char *) id.c_str());
        std::string uri(sipPrefix + sipDomain);
        cfg.reg_uri = pj_str((char*) uri.c_str());
        cfg.cred_count = 1;
        cfg.cred_info[0].realm = pj_str((char *) sipDomain.c_str());
        cfg.cred_info[0].scheme = pj_str((char*) digest.c_str());
        cfg.cred_info[0].username = pj_str((char*) sipUser.c_str());
        cfg.cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
        cfg.cred_info[0].data = pj_str((char *) sipPassword.c_str());
        qDebug() << "Register to SIP server by creating SIP account ";

        status = pjsua_acc_add(&cfg, PJ_TRUE, &acc_id);

        qDebug() << "3. PJ_SUCCESS :" << PJ_SUCCESS << " status : " << status;

        if (status != PJ_SUCCESS) {
            handleError("Error adding account", status);
            return status;
        }

           pj_str_t uri = pj_str("iptel.org");
           status = pjsua_call_make_call(101, &uri, 0, NULL, NULL, NULL);
           if (status != PJ_SUCCESS) {
               handleError("Error making Call", status);
           }

    }

Hello

In your uri you lack the prefix Sip: ' sip: ' here's a good example

pj_str_t uri = pj_str ("sip:[email protected]");
status = pjsua_call_make_call (acc_id, & uri, 0, NULL, NULL, NULL);
If (status! = PJ_SUCCESS) {}
handleError ("Error using", status);
}

Gaelle Sandhu

Tags: BlackBerry Developers

Similar Questions

  • How to make a call using the ip address

    Hello! I'm very new to telepresence system and wanted to know about calls of one endpoint (Te MX300) to another (Fe SX20) using their IP addresses (public or private). I saw in the configuration guide they make calls through IDs or URIS, and they need to guard/SIP proxy for that, but how can we establish the connection through their ip addresses without additional devices, of the right endpoints?

    Thank you

    Hi Zhomart,

    I assume you want to directly (without using the gatekeeper) call the other end points using the IP addresses.

    It's very simple.

    Use the remote control and punch in the IP address that you want to dial, make sure you only select as a H323 Protocol.

    The composed IP address should also be accessible.

    Kind regards
    Sagar

  • How to make Conference calls using FaceTime

    I want to video chat with my two brothers... in New York, another in MY.

    Is this possible?  We all iPhones, but I'm the only one with a Mac.

    I'm used to be able to do this using iChat (the predecessor of iMessage).

    You can't do it with iChat, but you can talk to them two messages to group on.

  • EX90 two autonomous with the public IP address can make video calls among them self on the Internet or not?

    Dear expert;

    I am very new to VCS and TP Cisco.

    We implement now presence Cisco TV with VCS - C, VCS-E TMS, TCS, MCUS and endpoints with Jabber in a single edit.

    and in another configuration CUCM 10.5, UCCX 10.5 IM & P, Jabber with some 10 officers.

    Now the question is in our building on the 2nd floor we have an EX90 and on the 5th floor an EX90 and on local network, we can make video calls using the IP address.

    In the same way is it possible to make a video call between 2 devices EX90 (both have public IP) present in a location different in the same city on the Internet without the participation of VCS - C and VCS-E.

    It's the client request :)

    Concerning

    Paiva

    Yes, but leaving these systems outside in nature with public IP addresses, leaving you are vulnerable to a number of questions. See for example http://www.videonationsltd.co.uk/2014/11/h-323-cisco-spam-calls/

    https://supportforums.Cisco.com/discussion/12336591/sourceh323idcisco-incomingcalls

    https://supportforums.Cisco.com/discussion/12340591/nuisance-h323-calls-SX20

    The offers above with H.323 calls, in addition to this, you will encounter similar problems using SIP where the systems will be analyzed by tools such as SIPVicious

    /Jens

    Please note the answers and mark questions as "answered" as appropriate

  • Impossible to make FaceTime calls on iPhone 7 using Siri

    I tried to use Siri to do a FaceTime call tonight and gave an unusual error: "I wish I could, but FaceTime is configured with me yet."

    I'm able to get Siri to open the FaceTime app, simply cannot access directly from my contacts and apart from this Siri works fine on the iPhone 7, including SMS and regular audio calls.

    I tried a FaceTime using Siri call on 3 old iPhone models (5s, 6 + and 6s), all running iOS 10, and it worked properly on each of them, she was with both iOS 9 and 10 on the same model of 6s for the past year, so this leads me to believe it's a problem iPhone 7 (or an individual defective unit) rather than a problem of iOS 10.

    I checked a number of settings on the iPhone 7 before coming here:

    • Siri is enabled.
    • FaceTime is activated.
    • Restrictions (general-> Restrictions) are completely shut down.
    • iCloud-> contact is activated.

    Hi there jsf23!

    Welcome to Apple Support communities, it's my pleasure to help you with your iPhone 7 issue of Siri is not able to make FaceTime calls.  I use Siri all the time and have his power making FaceTime calls is another great feature.  Looks like you have checked a lot of things I want to check too, if I fell on the same subject.

    At any time, that there is a problem with Siri or FaceTime, the first thing I recommend is to restart the iPhone and retest Siri and FaceTime.

    Restart your iPhone, iPad or iPod touch

    If Siri is still underway on issues from a FaceTime call, try to perform a reboot of the force.  Remember, this will be a little different on an iPhone 7.

    • On an iPhone 7 or iPhone 7 more: press and hold the sleep/wake and Volume buttons down for at least ten seconds, until you see the Apple logo.

    Test again and then try to check for updates.

    Update the software on your iPhone, iPad or iPod touch iOS

    Have a great day!

  • How can I fix the audio distortion when you make a video call using Windows Live Messenger

    When you make a video call using Windows Live Messenger I get audio distortion. How can I solve this problem

    Hello WayneMarkham,

    The best place to ask your question of Windows Live is inside Windows Live help forums. Experts specialize in all things, Windows Live, and would be delighted to help you with your questions. Please choose a product below to be redirected to the appropriate community:

    Windows Live Mail

    Windows Live Hotmail

    Windows Live Messenger

    Looking for a different product to Windows Live? Visit the home page Windows Live Help for the complete list of Windows Live forums to www.windowslivehelp.com.

  • Make a call from your car using bluetooth with M4 aqua Dual SIM

    If you call diretly from your phone, you have to choose the SIM card to make this call, right?

    If I try to do the same thing using my connection (free hand), bluetooth on my car, the conections seems to be done, but not his appeal and no connection is made (it end abruptly).

    On the other hand if I get a call, I can answer, normally on my car!

    Help, please!

    PS excuse my English is not my mother tongue.

    You need additional software to automatically choose which SIM card to use in outgoing calls. Currently Android 5.0 do not support this feature. There is a similar topic about problems with dual SIM Bluetooth hands-free/car connections and below. You can use 'real Phone Dialer and contracts' app - it work perfect with car and Bluetooth hands-free.

  • How to use or implement an ICS on my computer (or maybe Xbox) so that I can make calls using my phone VOI?

    My provider of VOI (BasicTalk) informed me that I could filter my phone via my computer using an ICS. My phone receives calls but I cannot be heard when I try to call. I live far, far in the glue... can't even get cell phone service and I had to get internet through flat (hughes aircraft). I mainly use the CAR phone as an answering machine... when a call comes in, I play back, the message, and then sink 25miles into our nearest town to get cell phone service and make my calls by cell phone. I have no other options available for the telephony service. It's obnoxious, but that's all I have right now. I knew that the CAR would work this way, but I decided that it was better than nothing. When I discovered that my son is able to use its earpiece via Xbox Live and has no trouble at all, I thought that there must be a way around this problem. So I called basic talking and they told me that it was no help... after that I begged for help, they finally checked around and advised I could use a VOI and gave me this address Windows. I found the site of ICS, but still don't know how to use the phone on this system... Any ideas or suggestions? Any help would be greatly appreciated!

    Hi Rhonda,

    You can, see the following Microsoft article and check if that helps.

    Using ICS (Internet Connection Sharing)

    Keep us updated on the State of the question

  • Sierra of MacOS - Siri cannot make voice calls.

    Hi guys,.

    Siri is supposed to be able to make phone calls via the iPhone, the Mac, in the Sierra de MacOS?

    Cause I can make phone calls (not the Facetime calls) fine if I use the Facetime on Mac app and click on the phone number, I want to call, or if I take a certain number of Contacts. But if I try to open Siri and make a voice command to "call X", he always tries to do through Facetime. Which means he's trying to make a Facetime call instead of a voice call normal.

    Is this a bug or missing feature? Is there a fix or a workaround for it? I wish I could use Siri on my Mac, just as I do on the iPhone.

    I observed the same behavior, so I think it's a missing feature.

    And page (below) which deals with Siri on Mac shows a command "FaceTime", but not a "Call" command  (As I say, I used the "Call" command and observed the same behavior you did.)

    Use Siri on your Mac - Apple Support

  • When I try my ipad FaceTime I get this massage iphone is not available your phone must be on the same WiFi that this ipad to make a call

    When I try my ipad FaceTime I get this massage iphone is not available your phone must be on the same WiFi that this ipad to make a call

    In your FaceTime settings, what you defined as "Caller ID"?  If you have set up the continuity (continuity use to connect your iPhone, iPod touch and Mac - Apple Support) and you have the iPad set to use your iPhone phone number to initiate calls, then you will need to have your iPhone and your iPad connected on the same wifi ntetwork.

    If you set the iPad caller ID to call from, for example, your iCloud email address, then this message should disappear.

  • I have a 6 s with Verizon iPhone. Can I send/receive calls (using this service and calls on other devices functionality) on my iPhone 5s, who was with AT &amp; T service, but has no service now since I switched to Verizon?

    I have a 6 s with Verizon iPhone. Can I send/receive calls (using this service and calls on other devices functionality) on my iPhone 5s, who was with AT & T service, but has no service now since I switched to Verizon?

    Note: I'm able to get two phones to ring with an incoming call, but the 5s consist not out. Whenever I dial a number, it says call failed.

    Do not dial a number. Try to choose a contact in the contacts App and tapping on telephone button.

    That said, I don't think that outgoing calls work on continuity since another iPhone. given that the iphone is designed to make calls through its own service.

    Document to support that you just did not mention calls from a secondary iPhone at all, it points to Mac, iPad and iPod touch, which leads me to believe that it won't work.

    It runs from devices such as iPads and Macs, who have no other way to place a cell call.

  • Can I make telephone calls via Satellite A100-233 modem?

    Hello
    Can I use my Modem A100-233 to call a phone, and what is the porgram should I use to make & receive calls?

    Thank you

    Hello

    Did you mean voice over IP?
    Well, I m not an expert but I think that it s a good idea to have an internet connection broadband to use voice over IP. I think that the modem data transfer is low use of these technologies. But I recommend you to check some particular voice over IP forums and websites. You will find detailed information about this technology.

    I googled around and found a few sites.

    Do you know Skype? It is a program that allows you to call trough the net.

  • can not make phone calls

    I use Skype for phone calls to phone numbers in the United States. After downloading a new version of Skype I can't make phone calls more. The call button is not active. The account is closed to date. Help, please.

    Is your login on Skype online status? The status icon next to your name should be green with a white check mark inside. Try to change the status by using the drop-down arrow next to this icon.

  • Skype crashing when I try to make a call 7.9.0.103

    Hello.

    I never had this problem before it started today. When I try to make a Skype call it always crashes. It works perfectly until I make a call. I tried to rename the Skype folder in %APPDATA%\microsoft\windows\sendto and deleted the db folder, but none of them seem to work because I still have the same question. I added my hope to report dxdiag that you guys can help me. Thanks in advance

    The Windows event log:

    Log name:      Application
    Source: Application error
    Date: 5.9.2015 01:22:44
    Event ID: 1000
    Task category: (100)
    Level: error
    Key words: Classic
    User: n/a
    Computer: Skynet
    Description:
    Name of the failing application: Skype.exe, version: 7.9.0.103, time stamp: 0x55ddec34
    Name of the failed module: KERNELBASE.dll, version: 6.2.9200.16384, time stamp: 0x5010ac2f
    Exception code: 0xe0fafac1
    Offset: 0x00014b32
    Process ID vulnerabilities: 0x15dc
    Start time of application vulnerabilities: 0x01d0e7602bd05ad6
    The failing application path: C:\Program Files (x86)\Skype\Phone\Skype.exe
    Path of the failing module: C:\Windows\SYSTEM32\KERNELBASE.dll
    Report ID: 7640be1c-5353-11e5-bfb7-54a05052abbd
    Faulting full name of the package:
    ID of the failed package-parent application:
    The event XML:



    1000
    2
    100
    0 x 80000000000000

    1594832
    Application
    Skynet



    Skype.exe
    7.9.0.103
    55ddec34
    KERNELBASE.dll
    6.2.9200.16384
    5010ac2f
    e0fafac1
    00014b 32
    15dc
    01d0e7602bd05ad6
    C:\Program Files (x86)\Skype\Phone\Skype.exe
    C:\Windows\SYSTEM32\KERNELBASE.dll
    7640be1c-5353-11e5-bfb7-54a05052abbd





    Edit: added Windows event log

    Try to uninstall the currently installed version of 7.9 and install the older version of Skype 7.8.0.102 using this Setup program:

    http://download.Skype.com/MSI/SkypeSetup_7.8.0.102.msi

  • A K1 with 3G can make phone calls?

    I would like to know if the K1 with the 3G (available in europe and Asia) make telephone calls?

    calls can be made threw the internet with the correct application. Like gtalk, for example. GTalk is free right now to make calls within the United States. There is an application that uses your gtalk account to allow you to make calls. So it depends just on the place where you stand.

    With regard to the telephone service, probably not. As it is a Tablet OS and not a phone OS.

Maybe you are looking for

  • P870 satellite - cannot enable virtualization technology

    Hello I own a Satellite P870. Im trying to do some design app, but I can not activate the Vt - x whenever I start up after changing to "VT - x" only I get an error when I try to install Intel Haxm indicating this I don't have the visualization power.

  • Satellite A300 - new battery compatibility problem

    Hello My apologies if this question is in the wrong part of the forum but I need help with a problem of battery for my Toshiba laptop. I have a Satellite A300 and did it for about 4 years.Battery recently not to organize free and put this up to age s

  • X 220 i7 8 GB very slow WEI for processor

    Hi guys I searched and read many things on the limitation and the difference between 65W and 90W power provides all have an effect on the above topic. However, none of the fixes seem to work. Many of you report a 7.1 WEI while I can't get 3.4 with th

  • Sex cam keeps closing

    I'm running Microsoft 5000HD live cam 24-7 web or try to anyway, it keeps closing comment on limited resources. It's a dell PC running XP home sp3, processor 2.4 gig of ram to 2 GB.  He sometimes stops once a day and sometimes 6 - 8 times a day. Have

  • IOS AP 1240

    Hi all I need to IOS c1240-k9w7 - tar.124 - 25d.JA.tar anypeople anyone has and can available to me by email, ftp or here on the forum? [email protected] / * /. Thank you!