pjsip_rx_data has no msg_info after change PJSIP_MAX_PKT_LEN on iPhone

JD
Jingyuan Dong
Fri, Feb 26, 2016 3:55 AM

Hi,

I come across with a problem when I change the PJSIP_MAX_PKT_LEN value
(increase/decrease) in config_site.h file, I will not get any information
from pjsip_rx_data. When there is packet coming in, on_rx_request() will
notify the application with the pjsip_rx_data has a length of 0 in msg_info
and there is no info in msg_info.buf.

In addition, I have put more debug info into the pjsip source code and
found in pjsip/src/pjsip/sip_endpoint.c
function pjsip_endpt_process_rx_data() is handling the rdata and make the
callbacks in this code.

883    if (msg->type == PJSIP_REQUEST_MSG) {
884    do {
885        if (mod->on_rx_request)
886        handled = (*mod->on_rx_request)(rdata);
887        if (handled)
888        break;
889        mod = mod->next;
890    } while (mod != &endpt->module_list);
891    } else {
892    do {
893        if (mod->on_rx_response)
894        handled = (*mod->on_rx_response)(rdata);
895        if (handled)
896        break;
897        mod = mod->next;
898    } while (mod != &endpt->module_list);
899    }

I verified that before the callback the rdata actually have a valid and
correct msg_info. While rdata pointer still matched with the pointer before
and after callback, the msg_info changes to all 0 when executing the
callback function.

Is this a known issue in PJSIP? Or is there something wrong with my change?
I do need to increase PJSIP_MAX_PKT_LEN in order to send out larger SIP
packets that is larger than 4000. Otherwise, I will get the message is too
long error as most folks already reported before.

Your help is greatly appreciated.
Justin

Hi, I come across with a problem when I change the PJSIP_MAX_PKT_LEN value (increase/decrease) in config_site.h file, I will not get any information from pjsip_rx_data. When there is packet coming in, on_rx_request() will notify the application with the pjsip_rx_data has a length of 0 in msg_info and there is no info in msg_info.buf. In addition, I have put more debug info into the pjsip source code and found in pjsip/src/pjsip/sip_endpoint.c function pjsip_endpt_process_rx_data() is handling the rdata and make the callbacks in this code. 883 if (msg->type == PJSIP_REQUEST_MSG) { 884 do { 885 if (mod->on_rx_request) 886 handled = (*mod->on_rx_request)(rdata); 887 if (handled) 888 break; 889 mod = mod->next; 890 } while (mod != &endpt->module_list); 891 } else { 892 do { 893 if (mod->on_rx_response) 894 handled = (*mod->on_rx_response)(rdata); 895 if (handled) 896 break; 897 mod = mod->next; 898 } while (mod != &endpt->module_list); 899 } I verified that before the callback the rdata actually have a valid and correct msg_info. While rdata pointer still matched with the pointer before and after callback, the msg_info changes to all 0 when executing the callback function. Is this a known issue in PJSIP? Or is there something wrong with my change? I do need to increase PJSIP_MAX_PKT_LEN in order to send out larger SIP packets that is larger than 4000. Otherwise, I will get the message is too long error as most folks already reported before. Your help is greatly appreciated. Justin