Ok, here again I answer my question related to pjsip. I want this library to have proper documentation where function calls are explained in the best way they work.
One thing that confused me was that in this developer guide: http://www.pjsip.org/release/0.5.4/PJSIP-Dev-Guide.pdf
There are 2 topics. 1 - these are message elements and how to create a request. Another is instant messaging. I was not exactly sure what is required for SMS. Turns out it's instant messaging.
The only required function:
pjsua_im_send(pjsua_acc_id acc_id, const pj_str_t *to, const pj_str_t *mime_type, const pj_str_t *content, const pjsua_msg_data *msg_data, void *user_data);
The 1st variable acc_id is what is initialized at the beginning of SIP application registration.
The second variable is the number to which you want to send the message. I initialized it as such:
"sip: 16476804556@sipserverdomain.com "
The third variable is for sending MIME. I have not used this. so this is NULL.
The fourth variable is the body of the message.
For example:
pj_str_t text; const char *msgText = [@"Hello there!" UTF8String]; text = pj_str((char*)msgText);
then I passed: &text function.
The fifth variable is msg data. Again, he did not use it. This is NULL.
6th - user data. I did not use this either. NULL
And finally, the function call looked like this:
pjsua_im_send(app._sip_acc_id, &to, NULL, &text, NULL, NULL);
Hope this helps someone who has a similar problem! -c0d3Junk13