Exemplo n.º 1
0
struct Header *BuildResponseContactHeader(MESSAGE *request)
{
    CONTACT_HEADER *c = CreateContactHeader();
    URI *uri = CreateUri(URI_SCHEME_SIP, "88001", GetLocalIpAddr(), LOCAL_PORT);

    ContactHeaderSetUri(c, uri);

    return (struct Header *)c;
}
Exemplo n.º 2
0
struct Header *BuildRequestContactHeader(MESSAGE *message, struct Dialog *dialog)
{
    struct UserAgent *ua = DialogGetUserAgent(dialog);
    URI *uri = CreateUri(URI_SCHEME_SIP, UaGetUserName(ua), GetLocalIpAddr(), 0);
    UriAddParameter(uri, "line", "6c451db26592505");
    CONTACT_HEADER *contact = CreateContactHeader();

    ContactHeaderSetUri(contact, uri);
    return  (struct Header *)contact;
}
Exemplo n.º 3
0
struct Header *BuildRequestViaHeader(MESSAGE *message, struct Dialog *dialog)
{
    URI *uri = CreateUri("", "", GetLocalIpAddr(), LOCAL_PORT);
    VIA_HEADER *via = CreateViaHeader(uri);    
    struct Parameters *ps = ViaHeaderGetParameters(via);
    char branch[32];

    AddParameter(ps, "rport", "");
    GenerateBranch(branch);
    AddParameter(ps, VIA_BRANCH_PARAMETER_NAME, branch); 

    return (struct Header *)via;
}
Exemplo n.º 4
0
CDemoAadjure::CDemoAadjure()
{
	GetLocalIpAddr(m_localIp);
	m_localSocketId = CreateSocketForRtpc(m_localIp, LOCALPORT);
}