What is the max number of headers that can be pushed in pj_list_push_back?

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

 



Hello

I am trying to push some headers through with?pjsua_call_make_call()
as below but for some reason when i send 4 headers the method hangs
for a while then PJSIP gets destroyed. If i send 3 headers it works
well. I tried sending the sets {Header1, Header2, Header3}, and
{Header1, Header2, Header4} and they went through. However sending
{Header1, Header2, Header3, Header4} or {Header1, Header2, Header4,
Header3} fails. Any ideas?

// Header 1
pj_str_t hname = pj_str("Header 1");
pj_str_t hvalue = pj_str("Value 1");
pjsua_msg_data msg_data;
pjsua_msg_data_init(&msg_data);
pjsip_generic_string_hdr my_hdr;
pjsip_generic_string_hdr_init2(&my_hdr, &hname, &hvalue);
pj_list_push_back(&msg_data.hdr_list, &my_hdr);

// Header 2
hname = pj_str("Header 2");
hvalue = pj_str("Value 2");
pjsip_generic_string_hdr my_hdr2;
pjsip_generic_string_hdr_init2(&my_hdr2, &hname, &hvalue);
pj_list_push_back(&msg_data.hdr_list, &my_hdr2);

// Heade 3
hname = pj_str("Header 3");
hvalue =  pj_str("Value 3");
pjsip_generic_string_hdr my_hdr3;
pjsip_generic_string_hdr_init2(&my_hdr3, &hname, &hvalue);
pj_list_push_back(&msg_data.hdr_list, &my_hdr3);

// Header 4
hname = pj_str("Header 4");
hvalue =  pj_str("Value 4");
pjsip_generic_string_hdr my_hdr4;
pjsip_generic_string_hdr_init2(&my_hdr4, &hname, &hvalue);
pj_list_push_back(&msg_data.hdr_list, &my_hdr4);

status = pjsua_call_make_call( current_acc, &tmp, 0, NULL, &msg_data, NULL);
if (status != PJ_SUCCESS)
    pjsua_perror(THIS_FILE, "Error making call", status);


And this is what i get on the console:

10:12:33.340    dlg0xb20464  Transaction tsx0xb1cc64 state changed to Calling
10:12:33.340 callhandling.m  Call 0 state changed to CALLING
2011-10-14 10:12:33.340 iPhoneAppName[8921:9103] current_call -1
10:12:33.840    tsx0xb1cc64  Retransmit timer event
10:12:33.840    tsx0xb1cc64  Retransmiting Request msg
INVITE/cseq=21404 (tdta0xb29200), count=0, restart?=1
10:12:34.841    tsx0xb1cc64  Retransmit timer event
10:12:34.841    tsx0xb1cc64  Retransmiting Request msg
INVITE/cseq=21404 (tdta0xb29200), count=1, restart?=1
10:12:36.844    tsx0xb1cc64  Retransmit timer event
10:12:36.845    tsx0xb1cc64  Retransmiting Request msg
INVITE/cseq=21404 (tdta0xb29200), count=2, restart?=1
10:12:40.845    tsx0xb1cc64  Retransmit timer event
10:12:40.845    tsx0xb1cc64  Retransmiting Request msg
INVITE/cseq=21404 (tdta0xb29200), count=3, restart?=1
10:12:48.845    tsx0xb1cc64  Retransmit timer event
10:12:48.850    tsx0xb1cc64  Retransmiting Request msg
INVITE/cseq=21404 (tdta0xb29200), count=4, restart?=1
10:13:04.853    tsx0xb1cc64  Retransmit timer event
10:13:04.854    tsx0xb1cc64  Retransmiting Request msg
INVITE/cseq=21404 (tdta0xb29200), count=5, restart?=1
10:13:05.340    tsx0xb1cc64  Timeout timer event
10:13:05.341    tsx0xb1cc64  State changed from Calling to Terminated,
event=TIMER
10:13:05.341    dlg0xb20464  Transaction tsx0xb1cc64 state changed to Terminated
10:13:05.341 callhandling.m  Call 0 is DISCONNECTED [reason=408
(Request Timeout)]
10:13:05.346    dlg0xb20464  Session count dec to 1 by mod-invite
10:13:05.352    tsx0xb2b264  Timeout timer event
.. then destroy message go here



[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