Very sorry for inconveniences , it was not the stock r5110 I was patch it as below
84a85,86 > #define SHORT_CODE_MAX_LEN 6 > #define SHORT_CODE_MIN_LEN 4 895,896c897,904 < } < } --- > } // Handle short code > }else if(octstr_len(pdu->u.submit_sm.source_addr) <= > SHORT_CODE_MAX_LEN && octstr_len(pdu->u.submit_sm.source_addr) >= > SHORT_CODE_MIN_LEN){ > pdu->u.submit_sm.source_addr_ton = > GSM_ADDR_TON_ABBREVIATED ; > pdu->u.submit_sm.source_addr_npi = > GSM_ADDR_NPI_UNKNOWN ; > }else { //Handle not start with + and is_digit i.e. > international sender > pdu->u.submit_sm.source_addr_ton = > GSM_ADDR_TON_INTERNATIONAL; > pdu->u.submit_sm.source_addr_npi = > GSM_ADDR_NPI_UNKNOWN ; > } From: Ahmed Shabana Sent: Monday, July 11, 2016 4:19 PM To: 'amal...@kannel.org' <amal...@kannel.org> Cc: devel@kannel.org Subject: RE: source-add-autodetect not working properly in lastest svn r5164' I found some diff , but seem all regard force getting values from meta-data svn diff -r 5110:5164 https://svn.kannel.org/gateway/trunk/gw/smsc/smsc_smpp.c Br , Shabana From: Alexander Malysh [mailto:malys...@gmail.com] On Behalf Of amal...@kannel.org<mailto:amal...@kannel.org> Sent: Monday, July 11, 2016 3:08 PM To: Ahmed Shabana <a.shab...@cequens.com<mailto:a.shab...@cequens.com>> Cc: devel@kannel.org<mailto:devel@kannel.org> Subject: Re: source-add-autodetect not working properly in lastest svn r5164' Hi, I don’t see any changes regarding source autodetect feature and btw. ton=2 (national), npi=1 (isdn) is correct for this msisdn. You always can overwrite ton/npi setting, see Kannel userguide. Alex Am 11.07.2016 um 09:52 schrieb Ahmed Shabana <a.shab...@cequens.com<mailto:a.shab...@cequens.com>>: Find below logs Source address “14692088376” { source_addr_ton: 2 = 0x00000002, source_addr_npi: 1 = 0x00000001 } For latest svn 2016-07-10 13:47:58 [22613] [170] DEBUG: SMPP PDU 0x7fecc4009050 dump: 2016-07-10 13:47:58 [22613] [170] DEBUG: type_name: submit_sm 2016-07-10 13:47:58 [22613] [170] DEBUG: command_id: 4 = 0x00000004 2016-07-10 13:47:58 [22613] [170] DEBUG: command_status: 0 = 0x00000000 2016-07-10 13:47:58 [22613] [170] DEBUG: sequence_number: 382 = 0x0000017e 2016-07-10 13:47:58 [22613] [170] DEBUG: service_type: NULL 2016-07-10 13:47:58 [22613] [170] DEBUG: source_addr_ton: 2 = 0x00000002 2016-07-10 13:47:58 [22613] [170] DEBUG: source_addr_npi: 1 = 0x00000001 2016-07-10 13:47:58 [22613] [170] DEBUG: source_addr: "14692088376" 2016-07-10 13:47:58 [22613] [170] DEBUG: dest_addr_ton: 1 = 0x00000001 2016-07-10 13:47:58 [22613] [170] DEBUG: dest_addr_npi: 1 = 0x00000001 2016-07-10 13:47:58 [22613] [170] DEBUG: destination_addr: "201003325373" 2016-07-10 13:47:58 [22613] [170] DEBUG: esm_class: 3 = 0x00000003 2016-07-10 13:47:58 [22613] [170] DEBUG: protocol_id: 0 = 0x00000000 2016-07-10 13:47:58 [22613] [170] DEBUG: priority_flag: 0 = 0x00000000 2016-07-10 13:47:58 [22613] [170] DEBUG: schedule_delivery_time: NULL 2016-07-10 13:47:58 [22613] [170] DEBUG: validity_period: NULL 2016-07-10 13:47:58 [22613] [170] DEBUG: registered_delivery: 1 = 0x00000001 2016-07-10 13:47:58 [22613] [170] DEBUG: replace_if_present_flag: 0 = 0x00000000 2016-07-10 13:47:58 [22613] [170] DEBUG: data_coding: 0 = 0x00000000 2016-07-10 13:47:58 [22613] [170] DEBUG: sm_default_msg_id: 0 = 0x00000000 2016-07-10 13:47:58 [22613] [170] DEBUG: sm_length: 6 = 0x00000006 2016-07-10 13:47:58 [22613] [170] DEBUG: short_message: "hi2222" 2016-07-10 13:47:58 [22613] [170] DEBUG: SMPP PDU dump ends. 2016-07-10 13:47:58 [22613] [170] WARNING: SMPP: PDU NULL terminated string (message_id) has no NULL. 2016-07-10 13:47:58 [22613] [170] DEBUG: SMPP PDU 0x7fecc400a140 dump: 2016-07-10 13:47:58 [22613] [170] DEBUG: type_name: submit_sm_resp 2016-07-10 13:47:58 [22613] [170] DEBUG: command_id: 2147483652 = 0x80000004 2016-07-10 13:47:58 [22613] [170] DEBUG: command_status: 72 = 0x00000048 2016-07-10 13:47:58 [22613] [170] DEBUG: sequence_number: 382 = 0x0000017e 2016-07-10 13:47:58 [22613] [170] DEBUG: message_id: NULL 2016-07-10 13:47:58 [22613] [170] DEBUG: SMPP PDU dump ends. For svn-r5110 “Source address “14692088376” { source_addr_ton: 1 = 0x00000001, source_addr_npi: 0 = 0x00000000 } ” 2016-07-10 13:48:49 [17695] [170] DEBUG: type_name: submit_sm 2016-07-10 13:48:49 [17695] [170] DEBUG: command_id: 4 = 0x00000004 2016-07-10 13:48:49 [17695] [170] DEBUG: command_status: 0 = 0x00000000 2016-07-10 13:48:49 [17695] [170] DEBUG: sequence_number: 3 = 0x00000003 2016-07-10 13:48:49 [17695] [170] DEBUG: service_type: NULL 2016-07-10 13:48:49 [17695] [170] DEBUG: source_addr_ton: 1 = 0x00000001 2016-07-10 13:48:49 [17695] [170] DEBUG: source_addr_npi: 0 = 0x00000000 2016-07-10 13:48:49 [17695] [170] DEBUG: source_addr: "14692088376" 2016-07-10 13:48:49 [17695] [170] DEBUG: dest_addr_ton: 1 = 0x00000001 2016-07-10 13:48:49 [17695] [170] DEBUG: dest_addr_npi: 1 = 0x00000001 2016-07-10 13:48:49 [17695] [170] DEBUG: destination_addr: "201003325373" 2016-07-10 13:48:49 [17695] [170] DEBUG: esm_class: 3 = 0x00000003 2016-07-10 13:48:49 [17695] [170] DEBUG: protocol_id: 0 = 0x00000000 2016-07-10 13:48:49 [17695] [170] DEBUG: priority_flag: 0 = 0x00000000 2016-07-10 13:48:49 [17695] [170] DEBUG: schedule_delivery_time: NULL 2016-07-10 13:48:49 [17695] [170] DEBUG: validity_period: NULL 2016-07-10 13:48:49 [17695] [170] DEBUG: registered_delivery: 1 = 0x00000001 2016-07-10 13:48:49 [17695] [170] DEBUG: replace_if_present_flag: 0 = 0x00000000 2016-07-10 13:48:49 [17695] [170] DEBUG: data_coding: 0 = 0x00000000 2016-07-10 13:48:49 [17695] [170] DEBUG: sm_default_msg_id: 0 = 0x00000000 2016-07-10 13:48:49 [17695] [170] DEBUG: sm_length: 6 = 0x00000006 2016-07-10 13:48:49 [17695] [170] DEBUG: short_message: "hi2222" 2016-07-10 13:48:49 [17695] [170] DEBUG: SMPP PDU dump ends. 2016-07-10 13:48:49 [17695] [170] DEBUG: SMPP PDU 0x7ff948005330 dump: 2016-07-10 13:48:49 [17695] [170] DEBUG: type_name: submit_sm_resp 2016-07-10 13:48:49 [17695] [170] DEBUG: command_id: 2147483652 = 0x80000004 2016-07-10 13:48:49 [17695] [170] DEBUG: command_status: 0 = 0x00000000 2016-07-10 13:48:49 [17695] [170] DEBUG: sequence_number: 3 = 0x00000003 2016-07-10 13:48:49 [17695] [170] DEBUG: message_id: 2016-07-10 13:48:49 [17695] [170] DEBUG: Octet string at 0x7ff948000e70: 2016-07-10 13:48:49 [17695] [170] DEBUG: len: 22 2016-07-10 13:48:49 [17695] [170] DEBUG: size: 23 2016-07-10 13:48:49 [17695] [170] DEBUG: immutable: 0 2016-07-10 13:48:49 [17695] [170] DEBUG: data: 36 30 30 30 34 32 38 64 35 38 65 35 38 30 66 37 6000428d58e580f7 2016-07-10 13:48:49 [17695] [170] DEBUG: data: 30 62 35 39 33 32 0b5932 2016-07-10 13:48:49 [17695] [170] DEBUG: Octet string dump ends. 2016-07-10 13:48:49 [17695] [170] DEBUG: SMPP PDU dump ends. Br , Shabana From: Alexander Malysh [mailto:malys...@gmail.com] On Behalf Of amal...@kannel.org<mailto:amal...@kannel.org> Sent: Monday, July 11, 2016 10:29 AM To: Ahmed Shabana <a.shab...@cequens.com<mailto:a.shab...@cequens.com>> Cc: devel@kannel.org<mailto:devel@kannel.org> Subject: Re: source-add-autodetect not working properly in lastest svn r5164' Hi, it would be more helpful to have detailed description what is in your opinion is not working and some debug logs to this issue. Thanks, Alex Am 10.07.2016 um 13:53 schrieb Ahmed Shabana <a.shab...@cequens.com<mailto:a.shab...@cequens.com>>: Dears at devel, When I run test using the lastest svn version I found that source addr autodetect no working properly . I revert back to Kannel bearerbox version `svn-r5110' and it worked properly . ./bearerbox --version Kannel bearerbox version `svn-r5164'. Build `Jul 10 2016 12:33:09', compiler `4.8.2 20131212 (Red Hat 4.8.2-7)'. System Linux, release 3.10.53-56.140.amzn1.x86_64, version #1 SMP Thu Aug 14 22:00:02 UTC 2014, machine x86_64. Hostname ip-10-164-116-170.ec2.internal, IP 10.164.116.170. Libxml version 2.9.1. Using OpenSSL 1.0.1k-fips 8 Jan 2015. Compiled with MySQL 5.5.38, using MySQL 5.5.38. Using native malloc. Br , Shabana