Dialogic Support Helpweb
Dialogic® Host Media Processing (HMP) Software
Record-Route and Dialogic® Global Call Software/SIP
Summary
Unintended side effects may occur when adding a Record-Route header to a Dialogic® Global Call Software SIP message Symptom:
Any generic SIP header may now be added to a SIP message using Dialogic Global Call Software. Although this is very convenient, there may occasionally be unintended consequences, particularly while in third party call control (3PCC) mode.
An example of this is the use of the Record-Route header. It is set in a SIP message to guarantee that replies to the message are routed through the IP address specified in the Record-Route. Its usual use is in SIP proxy-like functionality, where it is necessary that SIP messages flow through the proxy so they can be examined and routed appropriately. Thus, it is possible that a Global Call application's designer wants the application to act as a proxy and add a Record-Route header. This is easily done in the following way:
Assume this was added to the SIP INVITE before a gc_MakeCall() was done. SIP signaling will proceed normally until the application needs to send an ACK to the OK'ing system that is being INVITE'd. This must be done "manually" in 3PCC, with gc_SipAck(). At that point, the ACK will seemingly disappear, and the outbound call will never be completed.
// Insert record route header.
char RecordRoute[128] = {0};
// 192.168.1.109 is the IP address of this system
sprintf(RecordRoute, "Record-Route: <sip:%s;lr>", "192.168.1.109");
int rrlen = strlen(lRecordRoute) + 1;
int Res = gc_util_insert_parm_ref_ex(&gcParmBlk,
IPSET_SIP_MSGINFO,
IPPARM_SIP_HDR,
(unsigned char) rrlen,
RecordRoute);
if (Res != 0) {
printf("Error when setting record route header\n");
}
What is actually happening is that the ACK generated by gc_SipAck() is being record-routed to the same system that sent it. It is not expecting an ACK, so it is simply dropped. It never reaches its intended destination.
It is possible to get the ACK to reach its destination by adding a second Record-Route that specifies the INVITE'ing system. But, this may not be a legitimate use of Record-Route, so, think carefully before adding Record-Route to a SIP header. It may not be necessary to have a system act as a proxy if it is initiating a call leg itself rather than simply proxying another system's request.


