| CONTACT | DEVELOPER CENTER | PARTNERS | SITEMAP
GO
Useful Links
  • Search Helpweb
    
    

Dialogic Support Helpweb

Dialogic® Host Media Processing (HMP) Software

How to Register HMP IP devices to a SIP Registrar

Problem Description:
In order to register an HMP device to a SIP registrar, all necessary fields must be initialized prior to the registration attempt. Understanding what to initialize the registration fields has been a problem in the field.

Affected System Release: HMP1.0 and all subsequent HMP releases.

Solution Summary:
When attempting to register an HMP IP device to a SIP Registrar special attention must given to the IP_REGISTER_ADDRESS structure and the LOCAL_ALIAS. The code example below shows how to register to a SIP registrar.

Note: The registrar dictates the rules for registration and therefore specific instructions for each manufacture may vary. For the most part this is the standard method used.

// The URL used may have the following two formats:
// HMP_IP_user1@domain.com
// or HMP_IP_user1@xxx.xxx.127.133

dlgcBoard.Register("HMP_IP_user1@xxx.xxx.127.133","xxx.xxx.127.133");

void CDlgBoard::Register(string Client, string Server, bool Register)
{
     GC_PARM_BLK *parmblkp = NULL;
     GC_INFO gc_error_info; /* GlobalCall error information data */

     /* Set up GC_PARM_BLK */
     if ( gc_util_insert_parm_val(&parmblkp, GCSET_SERVREQ,
        PARM_REQTYPE, sizeof( char ),IP_REQTYPE_REGISTRATION ) !=
        GC_SUCCESS )
     {
          gc_ErrorInfo( &gc_error_info );
          /* Process error */
      }
      if ( gc_util_insert_parm_val(&parmblkp,GCSET_SERVREQ,
         PARM_ACK,sizeof(char),1) != GC_SUCCESS )
      {
           gc_ErrorInfo( &gc_error_info );
           /* Process error */
      }
      if ( gc_util_insert_parm_val(&parmblkp,IPSET_PROTOCOL,
         IPPARM_PROTOCOL_BITMASK,sizeof(char),IP_PROTOCOL_SIP) !=
         GC_SUCCESS )
      {
           gc_ErrorInfo( &gc_error_info );
           /* Process error */
      }

      if ( gc_util_insert_parm_val(&parmblkp,IPSET_REG_INFO,Register ?
         IPPARM_OPERATION_REGISTER : IPPARM_OPERATION_DEREGISTER,
         sizeof(char),IP_REG_SET_INFO) != GC_SUCCESS )
      {
           gc_ErrorInfo( &gc_error_info );
           /* Process error */
      }
      IP_REGISTER_ADDRESS registerAddress;
      strcpy(registerAddress.reg_server,Server.c_str());
      strcpy(registerAddress.reg_client,Client.c_str());

      registerAddress.max_hops = 3; //regMulticastHops;
      registerAddress.time_to_live = 3600; //regUnicastTTL;
      if ( gc_util_insert_parm_ref(&parmblkp, IPSET_REG_INFO,
         IPPARM_REG_ADDRESS, sizeof(IP_REGISTER_ADDRESS),
         ®isterAddress) != GC_SUCCESS )
      {
          gc_ErrorInfo( &gc_error_info );
           /* Process error */
      }

      if ( gc_util_insert_parm_ref(&parmblkp,IPSET_LOCAL_ALIA,(
         unsigned short)IPPARM_ADDRESS_EMAIL,( (Client.length())+1),
         (char *)Client.c_str()) != GC_SUCCESS )
      {
           gc_ErrorInfo( &gc_error_info );
           /* Process error */
      }

      if ( gc_ReqService(GCTGT_CCLIB_NETIF, m_BoardHandle,
         &m_ServiceID, parmblkp, NULL, EV_ASYNC) != GC_SUCCESS )
      {
           gc_ErrorInfo( &gc_error_info );
           /* Process error */
      }
      gc_util_delete_parm_blk(parmblkp);
}
 
Technical Discussion:



IP devices connected to a network may register to a local Registrar to inform about their current location. The IP device uses the register request to send the URL for which it wishes to receive calls. For example the HMP system may request to get phone calls directed to URL: HMP_SYSTEM@ domain.com. This allows for any IP device to contact the HMP system without knowing exactly what the IP address may be.

Product List:
N/A

Glossary of Acronyms/Terms:
N/A

Related Documentation:
N/A

First Published:
07/22/2004

Last Updated:
07/22/2004

Attachments
N/A





Feedback

Please rate the usefulness of this page:  

0 - not useful at all
1 - potentially useful
2 - quite useful
3 - very useful
4 - exactly the information I needed     

Please enter a comment about this page: