Can not set User-agent in header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

i experience a bug (i guess) when I try to set the User-Agent-Field on PjSUA:

I can reproduce the bug with both of the following code sippets to set the User-Agent fields inside the REGISTER-Header:

---Snippets---

this->voip_sip_agent = "Test/1";
this->voip_config.user_agent.ptr = new char[this->voip_sip_agent.length() + 1];
this->voip_config.user_agent.slen = this->voip_sip_agent.length();
strcpy(this->voip_config.user_agent.ptr, this->voip_sip_agent.c_str());

---or---

char tmp[80];
pj_ansi_snprintf(tmp, sizeof (tmp), "Unt/%s", "55");
pj_strdup2_with_null(pool, &this->voip_config.user_agent, tmp);

---End Snippets---

in both cases the REGISTER-Header / Package does not contain the new line:

REGISTER sip:**** SIP/2.0
Via: SIP/2.0/UDP ****:5060;rport;branch=z9hG4bKPj9338855d-7017-491e-9052-8a445fd00260
Max-Forwards: 70
From: <sip:****>;tag=a72705df-aded-4696-9a7c-371783d427ba
To: <sip:****>
Call-ID: 4132f410-f284-4790-8de5-79ecd9fd9192
CSeq: 49685 REGISTER
Contact: <sip:****;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Authorization: Digest username="****", realm="****", nonce="W59vEFufbeT9+qTmACzJnP7zexkdSBJC", uri="****", response="3fa79f6a1570cd7204822014780b3e2b"
Content-Length:  0


--end msg--


Does anyone has an advice, why this error occours or can anyone point me the PjSIP source code where the REGISTER-Header-String is generated?

Thanks,

Simon

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux