SIP API Developer's Guide

VIA Functions

int sip_get_num_via(sip_msg_t sip_msg, int *error);

The sip_get_num_via() function returns the number of VIA headers that are in the SIP message.

The value of the error parameter is set to zero when this function completes successfully. When this function completes unsuccessfully, it sets the value of the error parameter to the appropriate error value.

char *sip_get_branchid(sip_msg_t sip_msg, int *error);

The *sip_get_branchid() function returns the value of the branch parameter in the topmost VIA header in the SIP message. The calling thread must free the string that this function returns.