Re: [SR-Users] segfault when using sipt modifications

2016-08-01 Thread Sergey Basov
Hello,

try make dump packet after
append_body_part("\x01\x12\x49\x00\x0a\x03\x02\x0a\x08\x84\x90\x33\x41\x72\x17\x00\x06\x0a\x08\x04\x13\x93\x70\x21\x73\x23\x10\x08\x01\x00\x00","application/isup;version=itu-t92+","signal;handling=optional");
before sipt_destination($rU, 31, 4);

when i have done such conversion i found that kamailio from script
ignores all string content after symbol \x00 as this is end of line.

To avoid this i have replaces \x00 with \x01 in my initial ISUP string
and make changes into SIP-T module to replace it with \x00 while
processing message. before number/presentation/screening
modifications.

you have first \x00 as forth symbol in your ISUP string and after it
all have to be ignored. Look at dump using wireshark. I think you will
see mailformed ISUP incapsulated message.

--
Best regards,
Sergey Basov e-mail: sergey.v.ba...@gmail.com

tel: (+38067) 403-62-54


2016-08-01 8:21 GMT+03:00 Daniel-Constantin Mierla :
> Hello,
>
> would be good to get a core dump file and the backtrace from it in order to
> see where it crashes.
>
> For getting the coredump, try:
>
>  - stop kamailio
>
>  - do: ulimit -c unlimited
>
>  - start kamailio as root
>
>  - reproduce the issue
>
> A corefile should be generated in / or working directory. Use gdb to grab
> the output of 'bt full' from the corefile and send it here to the mailing
> list.
>
> Cheers,
> Daniel
>
>
> On 29/07/16 18:21, david wrote:
>
> hello all
>
>
>
> i'm trying to add a ISUP multipart in a regular call using the textops
> module, and despite seeing one previous issue int he mail list, i'm finding
> some issue here
>
> i'm using this commands
>
> msg_apply_changes();
> set_body_multipart(,"2123894789_1257887457");
> msg_apply_changes();
>
> append_body_part("\x01\x12\x49\x00\x0a\x03\x02\x0a\x08\x84\x90\x33\x41\x72\x17\x00\x06\x0a\x08\x04\x13\x93\x70\x21\x73\x23\x10\x08\x01\x00\x00","application/isup;version=itu-t92+","signal;handling=optional");
> msg_apply_changes();
> sipt_destination($rU, 31, 4);
> sipt_set_calling($fU, 4, 0, 3);
> msg_apply_changes();
>
> before the record_route command, and when using sipt_destination($rU, 31,
> 4); i'm getting asegfault
>
> here you have the logs
> could you please give me any clue about something i'm missing or doing
> wrong?
>
> thanks  alot and regards
> david
>
> 5(24552) DEBUG:  [parser/msg_parser.c:608]: parse_msg(): SIP Request:
> 5(24552) DEBUG:  [parser/msg_parser.c:610]: parse_msg():  method:
> 
> 5(24552) DEBUG:  [parser/msg_parser.c:612]: parse_msg():  uri:
> 
> 5(24552) DEBUG:  [parser/msg_parser.c:614]: parse_msg():  version:
> 
> 5(24552) DEBUG:  [parser/parse_via.c:1254]: parse_via_param(): Found
> param type 235,  = ; state=6
> 5(24552) DEBUG:  [parser/parse_via.c:1254]: parse_via_param(): Found
> param type 232,  = ; state=16
> 5(24552) DEBUG:  [parser/parse_via.c:2642]: parse_via(): end of header
> reached, state=5
> 5(24552) DEBUG:  [parser/msg_parser.c:496]: parse_headers():
> parse_headers: Via found, flags=2
> 5(24552) DEBUG:  [parser/msg_parser.c:498]: parse_headers():
> parse_headers: this is the first via
> 5(24552) DEBUG:  [receive.c:178]: receive_msg(): After parse_msg...
> 5(24552) DEBUG:  [receive.c:221]: receive_msg(): preparing to run
> routing scripts...
> 5(24552) DEBUG: maxfwd [mf_funcs.c:85]: is_maxfwd_present(): value = 65
> 5(24552) DEBUG:  [parser/parse_addr_spec.c:894]: parse_addr_spec():
> end of header reached, state=10
> 5(24552) DEBUG:  [parser/msg_parser.c:173]: get_hdr_field(): DEBUG:
> get_hdr_field:  [49];
> uri=[sip:34666988297@79.170.71.132:5060;user=phone]
> 5(24552) DEBUG:  [parser/msg_parser.c:175]: get_hdr_field(): DEBUG: to
> body [
> ]
> 5(24552) DEBUG:  [parser/msg_parser.c:153]: get_hdr_field():
> get_hdr_field: cseq : <94568362> 
> 5(24552) DEBUG:  [parser/msg_parser.c:187]: get_hdr_field(): DEBUG:
> get_hdr_body : content_length=104
> 5(24552) DEBUG:  [parser/msg_parser.c:89]: get_hdr_field(): found end
> of header
> 5(24552) DEBUG:  [parser/parse_addr_spec.c:172]: parse_to_param():
> DEBUG: add_param: tag=5jBBFae4D90rg
> 5(24552) DEBUG:  [parser/parse_addr_spec.c:894]: parse_addr_spec():
> end of header reached, state=29
> 5(24552) DEBUG: sanity [mod_sanity.c:248]: w_sanity_check(): sanity checks
> result: 1
> 5(24552) DEBUG: siputils [checks.c:97]: has_totag(): no totag
> 5(24552) DEBUG:  [socket_info.c:564]: grep_sock_info(): checking if
> host==us: 13==13 && [79.170.71.132] == [79.170.71.132]
> 5(24552) DEBUG:  [socket_info.c:567]: grep_sock_info(): checking if
> port 5060 (advertise 0) matches port 5060
> 5(24552) DEBUG: tm [t_lookup.c:1011]: t_check_msg(): DEBUG: t_check_msg: msg
> id=1 global id=0 T start=0x
> 5(24552) DEBUG: tm [t_lookup.c:466]: t_lookup_request(): t_lookup_request:
> start searching: hash=46859, isACK=0
> 5(24552) DEBUG: tm [t_lookup.c:424]: matching_3261(): DEBUG: RFC3261
> transaction matching failed
> 5(24552) DEBUG: tm [t_lookup.c:648]: 

Re: [SR-Users] Fail to register at trunk through UAC

2016-08-01 Thread Yuriy Gorlichenko
Hi.Unfortunattely Probles still exists.
Will be very grateful if someone will help me to understand what is wrong
there...
thnk you


2016-07-29 15:23 GMT+03:00 Yuriy Gorlichenko :

> Also checked all credentians 3 times.
> It worked on another platfoms
> I tried read sources uac_reg.c
> found that it takes form hash credentmans about this trunk but not found
> where and what it checks.
>
> So i suppose it is difference at MD5 but i can not check it.
>
> 2016-07-29 15:03 GMT+03:00 Yuriy Gorlichenko :
>
>> Hi. All trunks works fine ony one not works
>>
>> Kamailio sends REGISTER with proxy auth
>> provider answers with 407
>> Kamailio not send any REGISTER
>> Just answers in log
>>
>> uac_reg_tm_callback(): authentication failed for 
>>
>> At attachement kamialio debug 3 log and sip log
>>
>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] segfault when using sipt modifications

2016-08-01 Thread Daniel-Constantin Mierla
Hello,

I am not familiar with isup and no testbed around at this moment. That's
why I asked for backtrace from the coredump file, based on the
guidelines I did in my previous email.

Cheers,
Daniel


On 01/08/16 09:07, Sergey Basov wrote:
> Hello,
>
> try make dump packet after
> append_body_part("\x01\x12\x49\x00\x0a\x03\x02\x0a\x08\x84\x90\x33\x41\x72\x17\x00\x06\x0a\x08\x04\x13\x93\x70\x21\x73\x23\x10\x08\x01\x00\x00","application/isup;version=itu-t92+","signal;handling=optional");
> before sipt_destination($rU, 31, 4);
>
> when i have done such conversion i found that kamailio from script
> ignores all string content after symbol \x00 as this is end of line.
>
> To avoid this i have replaces \x00 with \x01 in my initial ISUP string
> and make changes into SIP-T module to replace it with \x00 while
> processing message. before number/presentation/screening
> modifications.
>
> you have first \x00 as forth symbol in your ISUP string and after it
> all have to be ignored. Look at dump using wireshark. I think you will
> see mailformed ISUP incapsulated message.
>
> --
> Best regards,
> Sergey Basov e-mail: sergey.v.ba...@gmail.com
>
> tel: (+38067) 403-62-54
>
>
> 2016-08-01 8:21 GMT+03:00 Daniel-Constantin Mierla :
>> Hello,
>>
>> would be good to get a core dump file and the backtrace from it in order to
>> see where it crashes.
>>
>> For getting the coredump, try:
>>
>>  - stop kamailio
>>
>>  - do: ulimit -c unlimited
>>
>>  - start kamailio as root
>>
>>  - reproduce the issue
>>
>> A corefile should be generated in / or working directory. Use gdb to grab
>> the output of 'bt full' from the corefile and send it here to the mailing
>> list.
>>
>> Cheers,
>> Daniel
>>
>>
>> On 29/07/16 18:21, david wrote:
>>
>> hello all
>>
>>
>>
>> i'm trying to add a ISUP multipart in a regular call using the textops
>> module, and despite seeing one previous issue int he mail list, i'm finding
>> some issue here
>>
>> i'm using this commands
>>
>> msg_apply_changes();
>> set_body_multipart(,"2123894789_1257887457");
>> msg_apply_changes();
>>
>> append_body_part("\x01\x12\x49\x00\x0a\x03\x02\x0a\x08\x84\x90\x33\x41\x72\x17\x00\x06\x0a\x08\x04\x13\x93\x70\x21\x73\x23\x10\x08\x01\x00\x00","application/isup;version=itu-t92+","signal;handling=optional");
>> msg_apply_changes();
>> sipt_destination($rU, 31, 4);
>> sipt_set_calling($fU, 4, 0, 3);
>> msg_apply_changes();
>>
>> before the record_route command, and when using sipt_destination($rU, 31,
>> 4); i'm getting asegfault
>>
>> here you have the logs
>> could you please give me any clue about something i'm missing or doing
>> wrong?
>>
>> thanks  alot and regards
>> david
>>
>> 5(24552) DEBUG:  [parser/msg_parser.c:608]: parse_msg(): SIP Request:
>> 5(24552) DEBUG:  [parser/msg_parser.c:610]: parse_msg():  method:
>> 
>> 5(24552) DEBUG:  [parser/msg_parser.c:612]: parse_msg():  uri:
>> 
>> 5(24552) DEBUG:  [parser/msg_parser.c:614]: parse_msg():  version:
>> 
>> 5(24552) DEBUG:  [parser/parse_via.c:1254]: parse_via_param(): Found
>> param type 235,  = ; state=6
>> 5(24552) DEBUG:  [parser/parse_via.c:1254]: parse_via_param(): Found
>> param type 232,  = ; state=16
>> 5(24552) DEBUG:  [parser/parse_via.c:2642]: parse_via(): end of header
>> reached, state=5
>> 5(24552) DEBUG:  [parser/msg_parser.c:496]: parse_headers():
>> parse_headers: Via found, flags=2
>> 5(24552) DEBUG:  [parser/msg_parser.c:498]: parse_headers():
>> parse_headers: this is the first via
>> 5(24552) DEBUG:  [receive.c:178]: receive_msg(): After parse_msg...
>> 5(24552) DEBUG:  [receive.c:221]: receive_msg(): preparing to run
>> routing scripts...
>> 5(24552) DEBUG: maxfwd [mf_funcs.c:85]: is_maxfwd_present(): value = 65
>> 5(24552) DEBUG:  [parser/parse_addr_spec.c:894]: parse_addr_spec():
>> end of header reached, state=10
>> 5(24552) DEBUG:  [parser/msg_parser.c:173]: get_hdr_field(): DEBUG:
>> get_hdr_field:  [49];
>> uri=[sip:34666988297@79.170.71.132:5060;user=phone]
>> 5(24552) DEBUG:  [parser/msg_parser.c:175]: get_hdr_field(): DEBUG: to
>> body [
>> ]
>> 5(24552) DEBUG:  [parser/msg_parser.c:153]: get_hdr_field():
>> get_hdr_field: cseq : <94568362> 
>> 5(24552) DEBUG:  [parser/msg_parser.c:187]: get_hdr_field(): DEBUG:
>> get_hdr_body : content_length=104
>> 5(24552) DEBUG:  [parser/msg_parser.c:89]: get_hdr_field(): found end
>> of header
>> 5(24552) DEBUG:  [parser/parse_addr_spec.c:172]: parse_to_param():
>> DEBUG: add_param: tag=5jBBFae4D90rg
>> 5(24552) DEBUG:  [parser/parse_addr_spec.c:894]: parse_addr_spec():
>> end of header reached, state=29
>> 5(24552) DEBUG: sanity [mod_sanity.c:248]: w_sanity_check(): sanity checks
>> result: 1
>> 5(24552) DEBUG: siputils [checks.c:97]: has_totag(): no totag
>> 5(24552) DEBUG:  [socket_info.c:564]: grep_sock_info(): checking if
>> host==us: 13==13 && [79.170.71.132] == [79.170.71.132]
>> 5(24552) DEBUG:  [socket_info.c:567]: grep_sock_info(): checking if
>> port 5060 (advertise 0) matches port 5

Re: [SR-Users] Saving and extracting contact header

2016-08-01 Thread Daniel-Constantin Mierla
Depending on the position you add, it can be Contact URI parameter or
Contact header parameter -- maybe you can give an example and then I can
see if it is uri or header parameter.

Cheers,
Daniel


On 01/08/16 07:46, Nahum Nir wrote:
>
> I added costume field to the contact header
>
>
> On 1 Aug 2016 8:36 a.m., "Daniel-Constantin Mierla"  > wrote:
>
> Hello,
>
> is it header parameter or uri parameter in Contact?
>
> Cheers,
> Daniel
>
>
> On 01/08/16 07:33, Nahum Nir wrote:
>>
>> Hi Daniel,
>>
>> I added the device token, or ID to the contact header so the
>> script will be able to the the push.
>>
>> Thanks,
>> Nahum
>>
>>
>> On 1 Aug 2016 8:28 a.m., "Daniel-Constantin Mierla"
>> mailto:mico...@gmail.com>> wrote:
>>
>> Hello,
>>
>>
>> On 25/07/16 12:21, Nahum Nir wrote:
>> > Hello,
>> >
>> > I am quite a newbe in Kamailio scripts and further to my
>> effort to
>> > implement push notification, I am adding to the contact
>> header device ID.
>> >
>> > I have two problems:
>> > 1. When the register of the callee expires Kamailio frees
>> the record
>> > so the information on the calle is not available.
>> > 2. Even when the callee is registered I do not how to
>> access the
>> > contact field. Tried reg_fetch_contacts(...,"callee") and
>> there is a
>> > lot of info but not the contact header.
>> >
>> >
>> what do you mean by contact header device ID?
>>
>> The address in Contact header of REGISTER is in addr attribute.
>>
>> Cheers,
>> Daniel
>>
>> --
>> Daniel-Constantin Mierla
>> http://www.asipto.com - http://www.kamailio.org
>> http://twitter.com/#!/miconda
>>  -
>> http://www.linkedin.com/in/miconda
>>
>
> -- 
> Daniel-Constantin Mierla
> http://www.asipto.com - http://www.kamailio.org
> http://twitter.com/#!/miconda  - 
> http://www.linkedin.com/in/miconda
>

-- 
Daniel-Constantin Mierla
http://www.asipto.com - http://www.kamailio.org
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Fail to register at trunk through UAC

2016-08-01 Thread Daniel-Constantin Mierla
Hello,

have you tried with latest master branch? It was a large pull request
merged lately, just to be sure you use current code...

Cheers,
Daniel


On 01/08/16 10:30, Yuriy Gorlichenko wrote:
> Hi.Unfortunattely Probles still exists.
> Will be very grateful if someone will help me to understand what is
> wrong there...
> thnk you
>
>
> 2016-07-29 15:23 GMT+03:00 Yuriy Gorlichenko  >:
>
> Also checked all credentians 3 times.
> It worked on another platfoms
> I tried read sources uac_reg.c
> found that it takes form hash credentmans about this trunk but not
> found where and what it checks.
>
> So i suppose it is difference at MD5 but i can not check it.
>
> 2016-07-29 15:03 GMT+03:00 Yuriy Gorlichenko  >:
>
> Hi. All trunks works fine ony one not works
>
> Kamailio sends REGISTER with proxy auth
> provider answers with 407
> Kamailio not send any REGISTER
> Just answers in log
>
> uac_reg_tm_callback(): authentication failed for 
>
> At attachement kamialio debug 3 log and sip log
>
>
>
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://www.asipto.com - http://www.kamailio.org
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Saving and extracting contact header

2016-08-01 Thread Nahum Nir
Thanks Daniel,

REGISTER...

Contact: ;; Device-ID=123456789

Cheers,
Nir

On Mon, Aug 1, 2016 at 1:10 PM, Daniel-Constantin Mierla 
wrote:

> Depending on the position you add, it can be Contact URI parameter or
> Contact header parameter -- maybe you can give an example and then I can
> see if it is uri or header parameter.
>
> Cheers,
> Daniel
>
> On 01/08/16 07:46, Nahum Nir wrote:
>
> I added costume field to the contact header
>
> On 1 Aug 2016 8:36 a.m., "Daniel-Constantin Mierla" 
> wrote:
>
>> Hello,
>>
>> is it header parameter or uri parameter in Contact?
>>
>> Cheers,
>> Daniel
>>
>> On 01/08/16 07:33, Nahum Nir wrote:
>>
>> Hi Daniel,
>>
>> I added the device token, or ID to the contact header so the script will
>> be able to the the push.
>>
>> Thanks,
>> Nahum
>>
>> On 1 Aug 2016 8:28 a.m., "Daniel-Constantin Mierla" 
>> wrote:
>>
>>> Hello,
>>>
>>>
>>> On 25/07/16 12:21, Nahum Nir wrote:
>>> > Hello,
>>> >
>>> > I am quite a newbe in Kamailio scripts and further to my effort to
>>> > implement push notification, I am adding to the contact header device
>>> ID.
>>> >
>>> > I have two problems:
>>> > 1. When the register of the callee expires Kamailio frees the record
>>> > so the information on the calle is not available.
>>> > 2. Even when the callee is registered I do not how to access the
>>> > contact field. Tried reg_fetch_contacts(...,"callee") and there is a
>>> > lot of info but not the contact header.
>>> >
>>> >
>>> what do you mean by contact header device ID?
>>>
>>> The address in Contact header of REGISTER is in addr attribute.
>>>
>>> Cheers,
>>> Daniel
>>>
>>> --
>>> Daniel-Constantin Mierla
>>> http://www.asipto.com - http://www.kamailio.org
>>> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>>>
>>>
>> --
>> Daniel-Constantin Mierlahttp://www.asipto.com - 
>> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
>> http://www.linkedin.com/in/miconda
>>
>>
> --
> Daniel-Constantin Mierlahttp://www.asipto.com - 
> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/miconda
>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] tls with ubuntu 16.04

2016-08-01 Thread Jayesh Nambiar
Hi Daniel,
Just checking if you had a chance to look at ssl libraries in Ubuntu16.04
to check the conflict with TLS module? Thanks.

- Jayesh

On Tue, Jul 19, 2016 at 6:11 PM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> following up -- apparently there is some issue with the lib in ubuntu
> 16.04, same module working fine in 15.10, as reported on the tracker:
>
>   - https://github.com/kamailio/kamailio/issues/714
>
> When I get a chance I will install a ubuntu 16.04 myself and dig more into
> the libssl sources.
>
> Cheers,
> Daniel
>
> On 18/07/16 14:46, Jayesh Nambiar wrote:
>
> Hi Daniel,
>
> Thanks for looking into this. I tried with this patch and still get the
> same error. Here are the relevant part of logs:
>
>  0(25032) DEBUG:  [cfg.y:1603]: yyparse(): loading module tls.so
>
>  0(25032) DEBUG:  [sr_module.c:575]: load_module(): trying to load
> 
>
>  0(25032) DEBUG:  [mem/q_malloc.c:189]: qm_malloc_init():
> qm_malloc_init: QM_OPTIMIZE=16384, /ROUNDTO=2048
>
>  0(25032) DEBUG:  [mem/q_malloc.c:191]: qm_malloc_init():
> qm_malloc_init: QM_HASH_SIZE=2099, qm_block size=235152
>
>  0(25032) DEBUG:  [mem/q_malloc.c:193]: qm_malloc_init():
> qm_malloc_init(0x7fda8249d000, 67108864), start=0x7fda8249d000
>
>  0(25032) DEBUG:  [mem/q_malloc.c:202]: qm_malloc_init():
> qm_malloc_init: size= 67108864, init_overhead=235256
>
>  0(25032) ERROR: tls [tls_init.c:493]: tls_pre_init(): Unable to set the
> memory allocation functions
>
>  0(25032) ERROR: tls [tls_init.c:495]: tls_pre_init(): libssl current mem
> functions - m: 0x7fda87673550 r: 0x7fda87673c40 f: 0x7fda87673a70
>
>  0(25032) ERROR: tls [tls_init.c:497]: tls_pre_init(): Be sure tls module
> is loaded before any other module using libssl (can be loaded first to be
> safe)
>
>  0(25032) ERROR:  [sr_module.c:607]: load_module():
> /usr/local/kamailio/lib64/kamailio/modules/tls.so: mod_register failed
>
>  0(25032) :  [cfg.y:3391]: yyerror_at(): parse error in config file
> /usr/local/kamailio/etc/kamailio/tlkn-edge/kamailio.cfg, line 47, column
> 12-19: failed to load module
>
>
> Yes I can provide ssh access to this machine. I'll send it to you
> seperately.
>
> Thanks,
>
> - Jayesh
>
>
> On Mon, Jul 18, 2016 at 2:25 PM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> no time over the weekend to look at logs, but I pushed just now a patch
>> to try to see if the memory functions were set or something else prevented
>> the set of memory functions.
>>
>> Can you try with the patch:
>>
>>   -
>> https://github.com/kamailio/kamailio/commit/966513b374eef598434c5310a43eac2735adfd2e
>>
>> I am at IEFT96 so I will try to do some stuff during the breaks... if
>> doesn't work, then it may take a bit to get more into it.
>>
>> Just in case, would it be possible to get ssh access to such system?
>>
>> Cheers,
>> Daniel
>>
> --
> Daniel-Constantin Mierlahttp://www.asipto.com - 
> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/miconda
>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Saving and extracting contact header

2016-08-01 Thread Daniel-Constantin Mierla
That's a header parameter and it is not saved in the location record.
You can eventually save it as location attribute via xavp.

Alternatively, you can move it to the URI, inside the <...> and then it
will be in the addr field after reg_fetch_contacts().

Another option is to use htable to store these device-id values per user
per registration.

Cheers,
Daniel


On 01/08/16 12:52, Nahum Nir wrote:
> Thanks Daniel,
>
> REGISTER...
> 
> Contact: ;; Device-ID=123456789
>
> Cheers,
> Nir
>
> On Mon, Aug 1, 2016 at 1:10 PM, Daniel-Constantin Mierla
> mailto:mico...@gmail.com>> wrote:
>
> Depending on the position you add, it can be Contact URI parameter
> or Contact header parameter -- maybe you can give an example and
> then I can see if it is uri or header parameter.
>
> Cheers,
> Daniel
>
>
> On 01/08/16 07:46, Nahum Nir wrote:
>>
>> I added costume field to the contact header
>>
>>
>> On 1 Aug 2016 8:36 a.m., "Daniel-Constantin Mierla"
>> mailto:mico...@gmail.com>> wrote:
>>
>> Hello,
>>
>> is it header parameter or uri parameter in Contact?
>>
>> Cheers,
>> Daniel
>>
>>
>> On 01/08/16 07:33, Nahum Nir wrote:
>>>
>>> Hi Daniel,
>>>
>>> I added the device token, or ID to the contact header so the
>>> script will be able to the the push.
>>>
>>> Thanks,
>>> Nahum
>>>
>>>
>>> On 1 Aug 2016 8:28 a.m., "Daniel-Constantin Mierla"
>>> mailto:mico...@gmail.com>> wrote:
>>>
>>> Hello,
>>>
>>>
>>> On 25/07/16 12:21, Nahum Nir wrote:
>>> > Hello,
>>> >
>>> > I am quite a newbe in Kamailio scripts and further to
>>> my effort to
>>> > implement push notification, I am adding to the
>>> contact header device ID.
>>> >
>>> > I have two problems:
>>> > 1. When the register of the callee expires Kamailio
>>> frees the record
>>> > so the information on the calle is not available.
>>> > 2. Even when the callee is registered I do not how to
>>> access the
>>> > contact field. Tried reg_fetch_contacts(...,"callee")
>>> and there is a
>>> > lot of info but not the contact header.
>>> >
>>> >
>>> what do you mean by contact header device ID?
>>>
>>> The address in Contact header of REGISTER is in addr
>>> attribute.
>>>
>>> Cheers,
>>> Daniel
>>>
>>> --
>>> Daniel-Constantin Mierla
>>> http://www.asipto.com - http://www.kamailio.org
>>> http://twitter.com/#!/miconda
>>>  -
>>> http://www.linkedin.com/in/miconda
>>>
>>
>> -- 
>> Daniel-Constantin Mierla
>> http://www.asipto.com - http://www.kamailio.org
>> http://twitter.com/#!/miconda  - 
>> http://www.linkedin.com/in/miconda
>>
>
> -- 
> Daniel-Constantin Mierla
> http://www.asipto.com - http://www.kamailio.org
> http://twitter.com/#!/miconda  - 
> http://www.linkedin.com/in/miconda
>
>

-- 
Daniel-Constantin Mierla
http://www.asipto.com - http://www.kamailio.org
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] tls with ubuntu 16.04

2016-08-01 Thread Daniel-Constantin Mierla
Hello,

not yet ... I didn't get the chance before starting a rather long trip
to download the image for ubuntu 16.04 to spin a vm and now I don't have
the bandwidth for fetching it.

Cheers,
Daniel


On 01/08/16 13:32, Jayesh Nambiar wrote:
> Hi Daniel,
> Just checking if you had a chance to look at ssl libraries in
> Ubuntu16.04 to check the conflict with TLS module? Thanks.
>
> - Jayesh
>
> On Tue, Jul 19, 2016 at 6:11 PM Daniel-Constantin Mierla
> mailto:mico...@gmail.com>> wrote:
>
> Hello,
>
> following up -- apparently there is some issue with the lib in
> ubuntu 16.04, same module working fine in 15.10, as reported on
> the tracker:
>
>   - https://github.com/kamailio/kamailio/issues/714
>
> When I get a chance I will install a ubuntu 16.04 myself and dig
> more into the libssl sources.
>
> Cheers,
> Daniel
>
>
> On 18/07/16 14:46, Jayesh Nambiar wrote:
>> Hi Daniel,
>> Thanks for looking into this. I tried with this patch and still
>> get the same error. Here are the relevant part of logs:
>>
>>  0(25032) DEBUG:  [cfg.y:1603]: yyparse(): loading module
>> tls.so
>>
>>  0(25032) DEBUG:  [sr_module.c:575]: load_module(): trying
>> to load 
>>
>>  0(25032) DEBUG:  [mem/q_malloc.c:189]: qm_malloc_init():
>> qm_malloc_init: QM_OPTIMIZE=16384, /ROUNDTO=2048
>>
>>  0(25032) DEBUG:  [mem/q_malloc.c:191]: qm_malloc_init():
>> qm_malloc_init: QM_HASH_SIZE=2099, qm_block size=235152
>>
>>  0(25032) DEBUG:  [mem/q_malloc.c:193]: qm_malloc_init():
>> qm_malloc_init(0x7fda8249d000, 67108864), start=0x7fda8249d000
>>
>>  0(25032) DEBUG:  [mem/q_malloc.c:202]: qm_malloc_init():
>> qm_malloc_init: size= 67108864, init_overhead=235256
>>
>>  0(25032) ERROR: tls [tls_init.c:493]: tls_pre_init(): Unable to
>> set the memory allocation functions
>>
>>  0(25032) ERROR: tls [tls_init.c:495]: tls_pre_init(): libssl
>> current mem functions - m: 0x7fda87673550 r: 0x7fda87673c40 f:
>> 0x7fda87673a70
>>
>>  0(25032) ERROR: tls [tls_init.c:497]: tls_pre_init(): Be sure
>> tls module is loaded before any other module using libssl (can be
>> loaded first to be safe)
>>
>>  0(25032) ERROR:  [sr_module.c:607]: load_module():
>> /usr/local/kamailio/lib64/kamailio/modules/tls.so: mod_register
>> failed
>>
>>  0(25032) :  [cfg.y:3391]: yyerror_at(): parse error in
>> config file
>> /usr/local/kamailio/etc/kamailio/tlkn-edge/kamailio.cfg, line 47,
>> column 12-19: failed to load module
>>
>>
>> Yes I can provide ssh access to this machine. I'll send it to you
>> seperately.
>>
>> Thanks,
>>
>> - Jayesh
>>
>>
>> On Mon, Jul 18, 2016 at 2:25 PM Daniel-Constantin Mierla
>> mailto:mico...@gmail.com>> wrote:
>>
>> Hello,
>>
>> no time over the weekend to look at logs, but I pushed just
>> now a patch to try to see if the memory functions were set or
>> something else prevented the set of memory functions.
>>
>> Can you try with the patch:
>>
>>   -
>> 
>> https://github.com/kamailio/kamailio/commit/966513b374eef598434c5310a43eac2735adfd2e
>>
>> I am at IEFT96 so I will try to do some stuff during the
>> breaks... if doesn't work, then it may take a bit to get more
>> into it.
>>
>> Just in case, would it be possible to get ssh access to such
>> system?
>>
>> Cheers,
>> Daniel
>>
> -- 
> Daniel-Constantin Mierla
> http://www.asipto.com - http://www.kamailio.org
> http://twitter.com/#!/miconda  - 
> http://www.linkedin.com/in/miconda
>

-- 
Daniel-Constantin Mierla
http://www.asipto.com - http://www.kamailio.org
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Configuration Issue on Kamailio.

2016-08-01 Thread Laura
Dear list,

i'm asking here a question about Kamailio config.

We are testing a wide area configuration of Kamailio over separates
countries and we are still facing with an issue.

We configured Kamailio 4.3.5 with dialog support over the TM modules and
we use LCR module for menage ours LCRs rule set profiles.

For some technicals reasons we use tech prefix for our customer so for
exaples customer1 send traffic to us with  prefix, customer2 send
traffic to us with  and something similar..

Our supplier, of course, are using tech prefix too so for examples if i
want to send the call to supplier1 i need to use tech prefix 1789 or
something similar..

The point is..


When customer1 is sending an invite to us.. it send us something like
(Bangladesh mobile 8801xxx)

INVITE sip:8801...@aaa.bbb.ccc.ddd

Our Kamailio will reply with the Trying and then it goes to LCR module
and match our supplier1 so it make a new invite like this

INVITE sip:17898801xxx...@supplier.ip

The problem come when supplier1 reply to us and we replies back to
customer1..

Customer1 view the From: field with the 17898801xx numbers.. and
some of our customers don't like it.

We don't use anymore the topoh module becuase we found some troubles
using it.. so..

Is there a way that we can use for fix this situation ?


Best regards.



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Path & Loose Route

2016-08-01 Thread Luke Milbourne
Hi all,

Currently trying to use Kamailio as a passthrough to some FreeSWITCH boxes.

When receiving an invite from FreeSWITCH which contains a Route header
including received information, example below;

Route: ;lr;received=sip:[PUBLIC_IP]:45126

When using loose_route() Kamailio still send the invite to the rfc1918
address instead of the received IP:PORT in the Route header.

Am I misunderstanding how this should work?

-- 
Luke Milbourne


Tel: 07857154817
Google Talk/Email: luke.milbou...@gmail.com
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Configuration Issue on Kamailio.

2016-08-01 Thread Daniel-Constantin Mierla
Hello,



On 01/08/16 14:10, Laura wrote:
> Dear list,
>
> i'm asking here a question about Kamailio config.
>
> We are testing a wide area configuration of Kamailio over separates
> countries and we are still facing with an issue.
>
> We configured Kamailio 4.3.5 with dialog support over the TM modules and
> we use LCR module for menage ours LCRs rule set profiles.
>
> For some technicals reasons we use tech prefix for our customer so for
> exaples customer1 send traffic to us with  prefix, customer2 send
> traffic to us with  and something similar..
>
> Our supplier, of course, are using tech prefix too so for examples if i
> want to send the call to supplier1 i need to use tech prefix 1789 or
> something similar..
>
> The point is..
>
>
> When customer1 is sending an invite to us.. it send us something like
> (Bangladesh mobile 8801xxx)
>
> INVITE sip:8801...@aaa.bbb.ccc.ddd
>
> Our Kamailio will reply with the Trying and then it goes to LCR module
> and match our supplier1 so it make a new invite like this
>
> INVITE sip:17898801xxx...@supplier.ip
>
> The problem come when supplier1 reply to us and we replies back to
> customer1..
>
> Customer1 view the From: field with the 17898801xx numbers.. and
> some of our customers don't like it.
>
> We don't use anymore the topoh module becuase we found some troubles
> using it.. so..
>
> Is there a way that we can use for fix this situation ?
>
>
The From header URI in reply is not related to request URI (r-uri).

Kamailio has uac_replace_from() in the uac module that can be used to
update and restore From uri. Are you using it in the config for INVITE
request?

If you can provide an ngrep or pcap for such call, then it will be
useful to see what you are referring to and propose eventual fixes.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com - http://www.kamailio.org
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Configuration Issue on Kamailio.

2016-08-01 Thread Carsten Bock
Hi,

do you use "uac_replace_from" or "uac_replace_to" in your logic?

If not, it seems to me, that your supplier is messing around with the
SIP-Replies.

Thanks,
Carsten

2016-08-01 14:10 GMT+02:00 Laura :

> Dear list,
>
> i'm asking here a question about Kamailio config.
>
> We are testing a wide area configuration of Kamailio over separates
> countries and we are still facing with an issue.
>
> We configured Kamailio 4.3.5 with dialog support over the TM modules and
> we use LCR module for menage ours LCRs rule set profiles.
>
> For some technicals reasons we use tech prefix for our customer so for
> exaples customer1 send traffic to us with  prefix, customer2 send
> traffic to us with  and something similar..
>
> Our supplier, of course, are using tech prefix too so for examples if i
> want to send the call to supplier1 i need to use tech prefix 1789 or
> something similar..
>
> The point is..
>
>
> When customer1 is sending an invite to us.. it send us something like
> (Bangladesh mobile 8801xxx)
>
> INVITE sip:8801...@aaa.bbb.ccc.ddd
>
> Our Kamailio will reply with the Trying and then it goes to LCR module
> and match our supplier1 so it make a new invite like this
>
> INVITE sip:17898801xxx...@supplier.ip
>
> The problem come when supplier1 reply to us and we replies back to
> customer1..
>
> Customer1 view the From: field with the 17898801xx numbers.. and
> some of our customers don't like it.
>
> We don't use anymore the topoh module becuase we found some troubles
> using it.. so..
>
> Is there a way that we can use for fix this situation ?
>
>
> Best regards.
>
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>



-- 
Carsten Bock
CEO (Geschäftsführer)

ng-voice GmbH
Millerntorplatz 1
20359 Hamburg / Germany

http://www.ng-voice.com
mailto:cars...@ng-voice.com

Office +49 40 5247593-40
Fax +49 40 5247593-99

Sitz der Gesellschaft: Hamburg
Registergericht: Amtsgericht Hamburg, HRB 120189
Geschäftsführer: Carsten Bock
Ust-ID: DE279344284

Hier finden Sie unsere handelsrechtlichen Pflichtangaben:
http://www.ng-voice.com/imprint/
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Path & Loose Route

2016-08-01 Thread Daniel-Constantin Mierla
Hello,


On 01/08/16 14:14, Luke Milbourne wrote:
> Hi all,
>
> Currently trying to use Kamailio as a passthrough to some FreeSWITCH
> boxes.
>
> When receiving an invite from FreeSWITCH which contains a Route header
> including received information, example below;
>
> Route:  >;lr;received=sip:[PUBLIC_IP]:45126
>
> When using loose_route() Kamailio still send the invite to the rfc1918
> address instead of the received IP:PORT in the Route header.
>
> Am I misunderstanding how this should work?
>
>
if you use path module, have you enabled the option to use the received
parameter?

https://www.kamailio.org/docs/modules/stable/modules/path.html#idp38033932

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com - http://www.kamailio.org
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Path & Loose Route

2016-08-01 Thread Luke Milbourne
Hi Daniel,

Yep, I've got the below in my kamailio.cfg

modparam("path", "use_received", 1)

Kind regards,
Luke

On 1 August 2016 at 13:25, Daniel-Constantin Mierla 
wrote:

> Hello,
>
> On 01/08/16 14:14, Luke Milbourne wrote:
>
> Hi all,
>
> Currently trying to use Kamailio as a passthrough to some FreeSWITCH boxes.
>
> When receiving an invite from FreeSWITCH which contains a Route header
> including received information, example below;
>
> Route: ;lr;received=sip:[PUBLIC_IP]:45126
>
> When using loose_route() Kamailio still send the invite to the rfc1918
> address instead of the received IP:PORT in the Route header.
>
> Am I misunderstanding how this should work?
>
>
> if you use path module, have you enabled the option to use the received
> parameter?
>
> https://www.kamailio.org/docs/modules/stable/modules/path.html#idp38033932
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierlahttp://www.asipto.com - 
> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/miconda
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>


-- 
Luke Milbourne


Tel: 07857154817
Google Talk/Email: luke.milbou...@gmail.com
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Path & Loose Route

2016-08-01 Thread Luke Milbourne
Is it correct to use loose_route() along side the path module?

On 1 August 2016 at 13:33, Luke Milbourne  wrote:

> Hi Daniel,
>
> Yep, I've got the below in my kamailio.cfg
>
> modparam("path", "use_received", 1)
>
> Kind regards,
> Luke
>
> On 1 August 2016 at 13:25, Daniel-Constantin Mierla 
> wrote:
>
>> Hello,
>>
>> On 01/08/16 14:14, Luke Milbourne wrote:
>>
>> Hi all,
>>
>> Currently trying to use Kamailio as a passthrough to some FreeSWITCH
>> boxes.
>>
>> When receiving an invite from FreeSWITCH which contains a Route header
>> including received information, example below;
>>
>> Route: ;lr;received=sip:[PUBLIC_IP]:45126
>>
>> When using loose_route() Kamailio still send the invite to the rfc1918
>> address instead of the received IP:PORT in the Route header.
>>
>> Am I misunderstanding how this should work?
>>
>>
>> if you use path module, have you enabled the option to use the received
>> parameter?
>>
>> https://www.kamailio.org/docs/modules/stable/modules/path.html#idp38033932
>>
>> Cheers,
>> Daniel
>>
>> --
>> Daniel-Constantin Mierlahttp://www.asipto.com - 
>> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
>> http://www.linkedin.com/in/miconda
>>
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
>
> --
> Luke Milbourne
> 
>
> Tel: 07857154817
> Google Talk/Email: luke.milbou...@gmail.com
>



-- 
Luke Milbourne


Tel: 07857154817
Google Talk/Email: luke.milbou...@gmail.com
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Fail to register at trunk through UAC

2016-08-01 Thread Yuriy Gorlichenko
Hi Daniel. Thanks for answer.
I will reinstall it today. Ping you ASAP about result

2016-08-01 13:19 GMT+03:00 Daniel-Constantin Mierla :

> Hello,
>
> have you tried with latest master branch? It was a large pull request
> merged lately, just to be sure you use current code...
>
> Cheers,
> Daniel
>
> On 01/08/16 10:30, Yuriy Gorlichenko wrote:
>
> Hi.Unfortunattely Probles still exists.
> Will be very grateful if someone will help me to understand what is wrong
> there...
> thnk you
>
>
> 2016-07-29 15:23 GMT+03:00 Yuriy Gorlichenko :
>
>> Also checked all credentians 3 times.
>> It worked on another platfoms
>> I tried read sources uac_reg.c
>> found that it takes form hash credentmans about this trunk but not found
>> where and what it checks.
>>
>> So i suppose it is difference at MD5 but i can not check it.
>>
>> 2016-07-29 15:03 GMT+03:00 Yuriy Gorlichenko :
>>
>>> Hi. All trunks works fine ony one not works
>>>
>>> Kamailio sends REGISTER with proxy auth
>>> provider answers with 407
>>> Kamailio not send any REGISTER
>>> Just answers in log
>>>
>>> uac_reg_tm_callback(): authentication failed for 
>>>
>>> At attachement kamialio debug 3 log and sip log
>>>
>>
>>
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlahttp://www.asipto.com - 
> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/miconda
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] segfault when using sipt modifications

2016-08-01 Thread david
Hello Sergey, Daniel

thanks a lot for the guidance.
i changed the x00 by x01 and it works now, i was seeing the ISUP
truncated but i thought it was related to the tshark XD

i will find out about the changes needed at sipt configuration, but just
in case, the things chaged by this only are the forward call indicators,
so i hope that does give us many problems

i will let you know anything

thanks and best regards
david


El lun, 01-08-2016 a las 12:09 +0200, Daniel-Constantin Mierla escribió:

> Hello,
> 
> I am not familiar with isup and no testbed around at this moment. That's
> why I asked for backtrace from the coredump file, based on the
> guidelines I did in my previous email.
> 
> Cheers,
> Daniel
> 
> 
> On 01/08/16 09:07, Sergey Basov wrote:
> > Hello,
> >
> > try make dump packet after
> > append_body_part("\x01\x12\x49\x00\x0a\x03\x02\x0a\x08\x84\x90\x33\x41\x72\x17\x00\x06\x0a\x08\x04\x13\x93\x70\x21\x73\x23\x10\x08\x01\x00\x00","application/isup;version=itu-t92+","signal;handling=optional");
> > before sipt_destination($rU, 31, 4);
> >
> > when i have done such conversion i found that kamailio from script
> > ignores all string content after symbol \x00 as this is end of line.
> >
> > To avoid this i have replaces \x00 with \x01 in my initial ISUP string
> > and make changes into SIP-T module to replace it with \x00 while
> > processing message. before number/presentation/screening
> > modifications.
> >
> > you have first \x00 as forth symbol in your ISUP string and after it
> > all have to be ignored. Look at dump using wireshark. I think you will
> > see mailformed ISUP incapsulated message.
> >
> > --
> > Best regards,
> > Sergey Basov e-mail: sergey.v.ba...@gmail.com
> >
> > tel: (+38067) 403-62-54
> >
> >
> > 2016-08-01 8:21 GMT+03:00 Daniel-Constantin Mierla :
> >> Hello,
> >>
> >> would be good to get a core dump file and the backtrace from it in order to
> >> see where it crashes.
> >>
> >> For getting the coredump, try:
> >>
> >>  - stop kamailio
> >>
> >>  - do: ulimit -c unlimited
> >>
> >>  - start kamailio as root
> >>
> >>  - reproduce the issue
> >>
> >> A corefile should be generated in / or working directory. Use gdb to grab
> >> the output of 'bt full' from the corefile and send it here to the mailing
> >> list.
> >>
> >> Cheers,
> >> Daniel
> >>
> >>
> >> On 29/07/16 18:21, david wrote:
> >>
> >> hello all
> >>
> >>
> >>
> >> i'm trying to add a ISUP multipart in a regular call using the textops
> >> module, and despite seeing one previous issue int he mail list, i'm finding
> >> some issue here
> >>
> >> i'm using this commands
> >>
> >> msg_apply_changes();
> >> set_body_multipart(,"2123894789_1257887457");
> >> msg_apply_changes();
> >>
> >> append_body_part("\x01\x12\x49\x00\x0a\x03\x02\x0a\x08\x84\x90\x33\x41\x72\x17\x00\x06\x0a\x08\x04\x13\x93\x70\x21\x73\x23\x10\x08\x01\x00\x00","application/isup;version=itu-t92+","signal;handling=optional");
> >> msg_apply_changes();
> >> sipt_destination($rU, 31, 4);
> >> sipt_set_calling($fU, 4, 0, 3);
> >> msg_apply_changes();
> >>
> >> before the record_route command, and when using sipt_destination($rU, 31,
> >> 4); i'm getting asegfault
> >>
> >> here you have the logs
> >> could you please give me any clue about something i'm missing or doing
> >> wrong?
> >>
> >> thanks  alot and regards
> >> david
> >>
> >> 5(24552) DEBUG:  [parser/msg_parser.c:608]: parse_msg(): SIP Request:
> >> 5(24552) DEBUG:  [parser/msg_parser.c:610]: parse_msg():  method:
> >> 
> >> 5(24552) DEBUG:  [parser/msg_parser.c:612]: parse_msg():  uri:
> >> 
> >> 5(24552) DEBUG:  [parser/msg_parser.c:614]: parse_msg():  version:
> >> 
> >> 5(24552) DEBUG:  [parser/parse_via.c:1254]: parse_via_param(): Found
> >> param type 235,  = ; state=6
> >> 5(24552) DEBUG:  [parser/parse_via.c:1254]: parse_via_param(): Found
> >> param type 232,  = ; state=16
> >> 5(24552) DEBUG:  [parser/parse_via.c:2642]: parse_via(): end of 
> >> header
> >> reached, state=5
> >> 5(24552) DEBUG:  [parser/msg_parser.c:496]: parse_headers():
> >> parse_headers: Via found, flags=2
> >> 5(24552) DEBUG:  [parser/msg_parser.c:498]: parse_headers():
> >> parse_headers: this is the first via
> >> 5(24552) DEBUG:  [receive.c:178]: receive_msg(): After parse_msg...
> >> 5(24552) DEBUG:  [receive.c:221]: receive_msg(): preparing to run
> >> routing scripts...
> >> 5(24552) DEBUG: maxfwd [mf_funcs.c:85]: is_maxfwd_present(): value = 65
> >> 5(24552) DEBUG:  [parser/parse_addr_spec.c:894]: parse_addr_spec():
> >> end of header reached, state=10
> >> 5(24552) DEBUG:  [parser/msg_parser.c:173]: get_hdr_field(): DEBUG:
> >> get_hdr_field:  [49];
> >> uri=[sip:34666988297@79.170.71.132:5060;user=phone]
> >> 5(24552) DEBUG:  [parser/msg_parser.c:175]: get_hdr_field(): DEBUG: 
> >> to
> >> body [
> >> ]
> >> 5(24552) DEBUG:  [parser/msg_parser.c:153]: get_hdr_field():
> >> get_hdr_field: cseq : <94568362> 
> >> 5(24552) DEBUG:  [parser/msg_parser.c:1

Re: [SR-Users] segfault when using sipt modifications

2016-08-01 Thread Sergey Basov
Hello.

Look more carefuly, its only first \x00 changes forward call indicator. You
have a few more \x00...

You does not get full ISUP into INVITE...

As I have told earlier you can replace \x00 by \x01into kamailio script,
but you must rewrite it with \x00 later into sip-t module, but this
requires some changes into source code of sip-t module...

sip-t module itself designed for checking/modifying of the ISUP content
into sip-t/sip-i, but not for generating it...

1 авг. 2016 г. 5:08 PM пользователь "david"  написал:

> Hello Sergey, Daniel
>
> thanks a lot for the guidance.
> i changed the x00 by x01 and it works now, i was seeing the ISUP truncated
> but i thought it was related to the tshark XD
>
> i will find out about the changes needed at sipt configuration, but just
> in case, the things chaged by this only are the forward call indicators, so
> i hope that does give us many problems
>
> i will let you know anything
>
> thanks and best regards
> david
>
>
> El lun, 01-08-2016 a las 12:09 +0200, Daniel-Constantin Mierla escribió:
>
>
> Hello,
>
> I am not familiar with isup and no testbed around at this moment. That's
> why I asked for backtrace from the coredump file, based on the
> guidelines I did in my previous email.
>
> Cheers,
> Daniel
>
>
> On 01/08/16 09:07, Sergey Basov wrote:> Hello,>> try make dump packet after> 
> append_body_part("\x01\x12\x49\x00\x0a\x03\x02\x0a\x08\x84\x90\x33\x41\x72\x17\x00\x06\x0a\x08\x04\x13\x93\x70\x21\x73\x23\x10\x08\x01\x00\x00","application/isup;version=itu-t92+","signal;handling=optional");>
>  before sipt_destination($rU, 31, 4);>> when i have done such conversion i 
> found that kamailio from script> ignores all string content after symbol \x00 
> as this is end of line.>> To avoid this i have replaces \x00 with \x01 in my 
> initial ISUP string> and make changes into SIP-T module to replace it with 
> \x00 while> processing message. before number/presentation/screening> 
> modifications.>> you have first \x00 as forth symbol in your ISUP string and 
> after it> all have to be ignored. Look at dump using wireshark. I think you 
> will> see mailformed ISUP incapsulated message.>> --> Best regards,> Sergey 
> Basov e-mail: sergey.v.ba...@gmail.com>> tel: (+38067) 
> 403-62-54>>> 2016-08-01 8:21 GMT+03:00 Daniel-Constantin Mierla 
> :>> Hello, would be good to get a core dump file and 
> the backtrace from it in order to>> see where it crashes. For getting the 
> coredump, try:  - stop kamailio  - do: ulimit -c unlimited  - 
> start kamailio as root  - reproduce the issue A corefile should be 
> generated in / or working directory. Use gdb to grab>> the output of 'bt 
> full' from the corefile and send it here to the mailing>> list. Cheers,>> 
> Daniel>> On 29/07/16 18:21, david wrote: hello all i'm trying 
> to add a ISUP multipart in a regular call using the textops>> module, and 
> despite seeing one previous issue int he mail list, i'm finding>> some issue 
> here i'm using this commands msg_apply_changes();>> 
> set_body_multipart(,"2123894789_1257887457");>> msg_apply_changes(); 
> append_body_part("\x01\x12\x49\x00\x0a\x03\x02\x0a\x08\x84\x90\x33\x41\x72\x17\x00\x06\x0a\x08\x04\x13\x93\x70\x21\x73\x23\x10\x08\x01\x00\x00","application/isup;version=itu-t92+","signal;handling=optional");>>
>  msg_apply_changes();>> sipt_destination($rU, 31, 4);>> 
> sipt_set_calling($fU, 4, 0, 3);>> msg_apply_changes(); before the 
> record_route command, and when using sipt_destination($rU, 31,>> 4); i'm 
> getting asegfault here you have the logs>> could you please give me any 
> clue about something i'm missing or doing>> wrong? thanks  alot and 
> regards>> david 5(24552) DEBUG:  [parser/msg_parser.c:608]: 
> parse_msg(): SIP Request:>> 5(24552) DEBUG:  [parser/msg_parser.c:610]: 
> parse_msg():  method:>> >> 5(24552) DEBUG:  
> [parser/msg_parser.c:612]: parse_msg():  uri:>> 
> >> 5(24552) DEBUG:  
> [parser/msg_parser.c:614]: parse_msg():  version:>> >> 5(24552) 
> DEBUG:  [parser/parse_via.c:1254]: parse_via_param(): Found>> param 
> type 235,  = ; state=6>> 5(24552) DEBUG:  
> [parser/parse_via.c:1254]: parse_via_param(): Found>> param type 232, 
>  = ; state=16>> 5(24552) DEBUG:  
> [parser/parse_via.c:2642]: parse_via(): end of header>> reached, state=5>> 
> 5(24552) DEBUG:  [parser/msg_parser.c:496]: parse_headers():>> 
> parse_headers: Via found, flags=2>> 5(24552) DEBUG:  
> [parser/msg_parser.c:498]: parse_headers():>> parse_headers: this is the 
> first via>> 5(24552) DEBUG:  [receive.c:178]: receive_msg(): After 
> parse_msg...>> 5(24552) DEBUG:  [receive.c:221]: receive_msg(): 
> preparing to run>> routing scripts...>> 5(24552) DEBUG: maxfwd 
> [mf_funcs.c:85]: is_maxfwd_present(): value = 65>> 5(24552) DEBUG:  
> [parser/parse_addr_spec.c:894]: parse_addr_spec():>> end of header reached, 
> state=10>> 5(24552) DEBUG:  [parser/

Re: [SR-Users] Path & Loose Route

2016-08-01 Thread Luke Milbourne
Hi All,

I've been going through my script against other examples on the internet
and cannot see any differences, also changing use_received between 1 and 0
makes no different.

Kamailio still uses the Contact header instead of the Route header.

If any one has any suggestions it would be very much appreciated, but I'll
continue going through the config line by line.

Kind regards,
Luke

On 1 August 2016 at 13:46, Luke Milbourne  wrote:

> Is it correct to use loose_route() along side the path module?
>
> On 1 August 2016 at 13:33, Luke Milbourne 
> wrote:
>
>> Hi Daniel,
>>
>> Yep, I've got the below in my kamailio.cfg
>>
>> modparam("path", "use_received", 1)
>>
>> Kind regards,
>> Luke
>>
>> On 1 August 2016 at 13:25, Daniel-Constantin Mierla 
>> wrote:
>>
>>> Hello,
>>>
>>> On 01/08/16 14:14, Luke Milbourne wrote:
>>>
>>> Hi all,
>>>
>>> Currently trying to use Kamailio as a passthrough to some FreeSWITCH
>>> boxes.
>>>
>>> When receiving an invite from FreeSWITCH which contains a Route header
>>> including received information, example below;
>>>
>>> Route: ;lr;received=sip:[PUBLIC_IP]:45126
>>>
>>> When using loose_route() Kamailio still send the invite to the rfc1918
>>> address instead of the received IP:PORT in the Route header.
>>>
>>> Am I misunderstanding how this should work?
>>>
>>>
>>> if you use path module, have you enabled the option to use the received
>>> parameter?
>>>
>>>
>>> https://www.kamailio.org/docs/modules/stable/modules/path.html#idp38033932
>>>
>>> Cheers,
>>> Daniel
>>>
>>> --
>>> Daniel-Constantin Mierlahttp://www.asipto.com - 
>>> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
>>> http://www.linkedin.com/in/miconda
>>>
>>>
>>> ___
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users@lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>
>>
>> --
>> Luke Milbourne
>> 
>>
>> Tel: 07857154817
>> Google Talk/Email: luke.milbou...@gmail.com
>>
>
>
>
> --
> Luke Milbourne
> 
>
> Tel: 07857154817
> Google Talk/Email: luke.milbou...@gmail.com
>



-- 
Luke Milbourne


Tel: 07857154817
Google Talk/Email: luke.milbou...@gmail.com
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Path & Loose Route

2016-08-01 Thread Colin Morelli
Luke,

This is actually the behavior I would expect, though admittedly I've never
tried to rely on received= parameter routing for requests (I wasn't aware
that was something that should be supported).

However, you're probably better of addressing your NAT issues in a
different part of your request lifecycle. Could you share a bit more about
the setup you're using here? Is this Freeswitch dialing out to a registered
endpoint? Where are registrations being handled? How is FS creating the
route headers?

If you just start with a layout if your infrastructure it'll probably
answer all those questions and we can come up with a solution from there.

Best,
Colin

On Mon, Aug 1, 2016 at 11:57 AM Luke Milbourne 
wrote:

> Hi All,
>
> I've been going through my script against other examples on the internet
> and cannot see any differences, also changing use_received between 1 and 0
> makes no different.
>
> Kamailio still uses the Contact header instead of the Route header.
>
> If any one has any suggestions it would be very much appreciated, but I'll
> continue going through the config line by line.
>
> Kind regards,
> Luke
>
> On 1 August 2016 at 13:46, Luke Milbourne 
> wrote:
>
>> Is it correct to use loose_route() along side the path module?
>>
>> On 1 August 2016 at 13:33, Luke Milbourne 
>> wrote:
>>
>>> Hi Daniel,
>>>
>>> Yep, I've got the below in my kamailio.cfg
>>>
>>> modparam("path", "use_received", 1)
>>>
>>> Kind regards,
>>> Luke
>>>
>>> On 1 August 2016 at 13:25, Daniel-Constantin Mierla 
>>> wrote:
>>>
 Hello,

 On 01/08/16 14:14, Luke Milbourne wrote:

 Hi all,

 Currently trying to use Kamailio as a passthrough to some FreeSWITCH
 boxes.

 When receiving an invite from FreeSWITCH which contains a Route header
 including received information, example below;

 Route: ;lr;received=sip:[PUBLIC_IP]:45126

 When using loose_route() Kamailio still send the invite to the rfc1918
 address instead of the received IP:PORT in the Route header.

 Am I misunderstanding how this should work?


 if you use path module, have you enabled the option to use the received
 parameter?


 https://www.kamailio.org/docs/modules/stable/modules/path.html#idp38033932

 Cheers,
 Daniel

 --
 Daniel-Constantin Mierlahttp://www.asipto.com - 
 http://www.kamailio.orghttp://twitter.com/#!/miconda - 
 http://www.linkedin.com/in/miconda


 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


>>>
>>>
>>> --
>>> Luke Milbourne
>>> 
>>>
>>> Tel: 07857154817
>>> Google Talk/Email: luke.milbou...@gmail.com
>>>
>>
>>
>>
>> --
>> Luke Milbourne
>> 
>>
>> Tel: 07857154817
>> Google Talk/Email: luke.milbou...@gmail.com
>>
>
>
>
> --
> Luke Milbourne
> 
>
> Tel: 07857154817
> Google Talk/Email: luke.milbou...@gmail.com
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Kamilio Presence

2016-08-01 Thread Bill

I have asked this question before but never really got an answer.

Has anybody ever gotten BLF working with Yealink phones. If you have, 
please steer me in the right direction



Bill



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Prepaid system using dialog and sqlops

2016-08-01 Thread Infinicalls Infinicalls
Hi,
 I am still struggling to get a prepaid system for my service.

After installing SIREMIS, I am able to get the CDRs updated. But even
after adding the cron settings, the call duration doesn't get updated.

And also in

http://lists.sip-router.org/pipermail/sr-users/2012-January/071517.html

it has been mentioned that

"If it is the case of 1 call per user at a time, then practically can
be done from kamailio config only. When call starts, compute the max
duration for that call based on caller/destination (e.g., call a
stored procedure via sqlops) and set the dialog timeout to that
duration. When call ends (BYE in main route or timeout route) update
the credit accordingly."

Can somebody let me know if my understanding is correct.

1) Add a field called "credits" in the database. And topup that field.

2) First compute max permitted duration for that user by multiplying
the cost for number prefix (say +91) and pulse.

3) And finally add this value to timeout of dialog. modparam("dialog",
"default_timeout", 10)
$dlg_ctx(timeout_bye) = 1;

Will this work? Any help would be appreciated.

regards
Ganesh Kumar

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Kamailio presence

2016-08-01 Thread Bill



I have asked this question before, but never really got an answer:

Has anybody been able to get BLF working with Yealink phones.


Bill



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] SSL Certificate (Second Try)

2016-08-01 Thread JCOT
I'm not sure where to send this information so I hope it's okay to share it 
with the mailing list, as well as the whois registrants:

I went to register for a new account at https://serweb.iptel.org/user/reg.

Firefox told me that the SSL certificate was bad. Specifically:

--
serweb.iptel.org uses an invalid security certificate. The certificate is not 
trusted because it was signed using a signature algorithm that was disabled 
because that algorithm is not secure. The certificate expired on 10/22/2014 
12:39 AM. The current time is 08/01/2016 09:55 PM.
--

Thank you.

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] SSL Certificate

2016-08-01 Thread JCOT
I'm not sure where to send this information so I hope it's okay to share it 
here:

I went to register for a new account at https://serweb.iptel.org/user/reg.

Firefox told me that the SSL certificate was bad.  Specifically:

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Path & Loose Route

2016-08-01 Thread Daniel-Constantin Mierla
Hello,

yes, loose_route() should be used there. Can you add a log message and
print $ru and $du before and after loose_route() in config and then send
the result to this mailing list?

Btw, what version of Kamailio are you using?

Cheers,
Daniel


On 01/08/16 14:46, Luke Milbourne wrote:
> Is it correct to use loose_route() along side the path module?
>
> On 1 August 2016 at 13:33, Luke Milbourne  > wrote:
>
> Hi Daniel,
>
> Yep, I've got the below in my kamailio.cfg
>
> modparam("path", "use_received", 1)
>
> Kind regards,
> Luke
>
> On 1 August 2016 at 13:25, Daniel-Constantin Mierla
> mailto:mico...@gmail.com>> wrote:
>
> Hello,
>
>
> On 01/08/16 14:14, Luke Milbourne wrote:
>> Hi all,
>>
>> Currently trying to use Kamailio as a passthrough to some
>> FreeSWITCH boxes.
>>
>> When receiving an invite from FreeSWITCH which contains a
>> Route header including received information, example below;
>>
>> Route: > >;lr;received=sip:[PUBLIC_IP]:45126
>>
>> When using loose_route() Kamailio still send the invite to
>> the rfc1918 address instead of the received IP:PORT in the
>> Route header.
>>
>> Am I misunderstanding how this should work?
>>
>>
> if you use path module, have you enabled the option to use the
> received parameter?
>
> 
> https://www.kamailio.org/docs/modules/stable/modules/path.html#idp38033932
>
> Cheers,
> Daniel
>
> -- 
> Daniel-Constantin Mierla
> http://www.asipto.com - http://www.kamailio.org
> http://twitter.com/#!/miconda  - 
> http://www.linkedin.com/in/miconda
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
> mailing list
> sr-users@lists.sip-router.org
> 
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
>
> -- 
> Luke Milbourne
>
> Tel: 07857154817
> Google Talk/Email: luke.milbou...@gmail.com
> 
>
>
>
>
> -- 
> Luke Milbourne
>
> Tel: 07857154817
> Google Talk/Email: luke.milbou...@gmail.com
> 
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://www.asipto.com - http://www.kamailio.org
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users