Quantcast
Channel: Dialogic PowerMedia HMP GlobalCall and R4 API - Recent Threads
Viewing all articles
Browse latest Browse all 1151

SIP Instant Messaging via Dialogic HMP

$
0
0

Hi,

I am trying to use Dialogic HMP Win 3.0 to send SIP IM messages (RFC 3428).

I believe the code will look similar to this:


	long crn; // initialised by gc_MakeCall()
	GC_PARM_BLKP parameterBlock = nullptr;

	// Initialize the parameterBlock... but this is incomplete
	if (gc_util_insert_parm_val(&parameterBlock, IPSET_MSG_SIP, IPPARM_MSGTYPE, sizeof(int), IP_MSGTYPE_SIP_MESSAGE) < 0 || gc_util_insert_parm_ref_ex(&parameterBlock, IPSET_SIP_MSGINFO, IPPARM_TO_DISPLAY, (unsigned long)(message.length() + 1), (void *)message.c_str()) < 0)
	{
		// Log error
		if (parameterBlock != nullptr)
		{
			gc_util_delete_parm_blk(parameterBlock);
		}
		return false;
	}

	// Send the Request
	GC_PARM_BLKP returnBlock = nullptr;
	const unsigned long mode = EV_ASYNC;
	if (gc_Extension(GCTGT_GCLIB_CRN, crn, IPEXTID_SENDMSG, parameterBlock, &returnBlock, mode) == GC_SUCCESS)
	{
		// Success
		gc_util_delete_parm_blk(parameterBlock);
		return true;
	}

But can find no example in the documentation or online.

What additional parameters need to be set when using IP_MSGTYPE_SIP_MESSAGE?

Thanks for your help!


Viewing all articles
Browse latest Browse all 1151

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>