Dialogic Dialogic Global Call IP IP Phone User Manual


 
Dialogic
®
Global Call IP Technology Guide — November 2007 423
Dialogic Corporation
set IP authentication information — gc_SetAuthenticationInfo( )
void configureAuthQuadruplet (long boardDev)
{
GC_PARM_BLK *parmblkp = NULL;
char realm[] = "example.com";
char identity[] = "sip:bob@example.com";
char username[] = "bob";
char password [] = "password1";
IP_AUTHENTICATION authentication;
INIT_IP_AUTHENTICATION (&authentication);
authentication.realm = realm;
authentication.identity = identity;
authentication.username = username;
authentication.password = password;
gc_util_insert_parm_ref(&parmblkp,
IPSET_CONFIG,
IPPARM_AUTHENTICATION_CONFIGURE,
(unsigned char)(sizeof(IP_AUTHENTICATION)),
&authentication);
gc_SetAuthenticationInfo(GCTGT_CCLIB_NETIF, boardDev, parmblkp);
gc_util_delete_parm_blk(parmblkp);
}
The following code example illustrates how to remove a digest authentication quadruplet.
#include <gcip.h>
#include <gclib.h>
/* This example deletes the quadruplet with realm "example.com" and
* identity "sip:bob@example.com".
*/
void removeAuthQuadruplet (long boardDev)
{
GC_PARM_BLK *parmblkp = NULL;
char realm[] = "example.com";
char identity[] = "sip:bob@example.com";
IP_AUTHENTICATION authentication;
INIT_IP_AUTHENTICATION (&authentication);
authentication.realm = realm;
authentication.identity = identity;
gc_util_insert_parm_ref(&parmblkp,
IPSET_CONFIG,
IPPARM_AUTHENTICATION_REMOVE,
(unsigned char)(sizeof(IP_AUTHENTICATION)),
&authentication);
gc_SetAuthenticationInfo(GCTGT_CCLIB_NETIF, boardDev, parmblkp);
gc_util_delete_parm_blk(parmblkp);
}
See Also
None.