Authorization with User ID and Auth ID

24 views
Skip to first unread message

e.ab...@wentor.ru

unread,
Apr 24, 2014, 6:30:59 AM4/24/14
to si...@googlegroups.com
Can I register on SIP server with both (and different) User Id and Auth ID using sipxtapi ? Environement: Microsoft Visual Studio 2005 (MSVS 8.0). How can this be done?

Daniel Petrie

unread,
Apr 24, 2014, 12:32:53 PM4/24/14
to si...@googlegroups.com
Yes you can.
Use sipxLineAdd to create a line.  The second argument takes an AOR/URI of the form sip:user@domain.  See:

To set the auth ID and password for the line use sipxLineAddCredential.   The second argument is the authId (typically of the form user or user@domain) and the 3rd argument is the password.  The authId may differ from the line AOR/URI.  See:

There is an overview of sipXtapi here:

With the API reference here:

You will want to also look at the state change events to track call, line and perhaps media state changes defined here:

Cheers,
Dan

On Thursday, April 24, 2014 6:31 AM, "e.ab...@wentor.ru" <e.ab...@wentor.ru> wrote:
Can I register on SIP server with both (and different) User Id and Auth ID using sipxtapi ? Environement: Microsoft Visual Studio 2005 (MSVS 8.0). How can this be done?
--
You received this message because you are subscribed to the Google Groups "sipX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sipx+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


e.ab...@wentor.ru

unread,
Apr 28, 2014, 4:17:26 AM4/28/14
to si...@googlegroups.com, Daniel Petrie
Okay, thank you. I will try.

четверг, 24 апреля 2014 г., 23:32:53 UTC+7 пользователь Dan Petrie написал:

e.ab...@wentor.ru

unread,
Sep 26, 2014, 5:38:38 AM9/26/14
to si...@googlegroups.com, dpe...@sipez.com
Hello,
There is a small problem:
I use: 
sipxLineAdd (hInstance, '<sip:101@domain>' , &hLine);  <- 101 is UserId
sipxLineAddCredential (hLine, '555', PwdA, NULL);   <- 555 is AuthId

I receive an error: No credentials found for:   lineId:<sip:101@domain>;

This is because in the file SipLineProvider AuthId = 555 is compared with UserId=101 of a first message REGISTER.

Code from file SipLineProvider.cpp:

if (!sipCredential.getUserId().compareTo (userId, UtlString::matchCase)) {  // userid match, return this credential
      lineCredential = sipCredential;
      result = TRUE;
}

Here: sipCredential.getUserId() - AuthId = 555 and userId = 101 from first message REGISTER.
How can I fix it?

Sorry for my english.

Reply all
Reply to author
Forward
0 new messages