[SR-Users] Action: restructuring the source code tree

2016-12-07 Thread Daniel-Constantin Mierla
Hello,

today I am going to do the restructuring of the source code tree as
discussed previously.

  - http://lists.sip-router.org/pipermail/sr-dev/2016-December/037715.html

If anyone has patches to push using existing structure, do it before
12:00UTC today. If you need more time, write to sr-dev and let's see how
we can find an easy solution.

Once I finish with the restructuring, I will send another notification,
from that moment the commits can go on as usual.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.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] Error using Siremis 4.3.0

2016-12-07 Thread Daniel-Constantin Mierla
Hello,

can you look in error.log of apache and see if you get more hints from
there about what was the actual error?

Also, inside siremis tree, check siremis/logs/ -- there are some *.log
files that will provide more details about the error.

The messages below suggest a template is missing, but that was likely
triggered by another error.

Cheers,
Daniel


On 07/12/2016 00:27, Diogenes Aviles wrote:
> I'm using Siremis 4.3.0 and PHP7. Installation was OK, but running
> siremis I have some problems in Administration-User Management. When I
> select an user there is the following error:
>
> [2016-12-06 23:18:47 (GMT)] An exception occurred while executing this
> script:
> Error message: #256, Unable to location template file
> system_internal_error.tpl.
> Script name and line number of error:
> /var/www/siremis-4.3.0/openbiz/bin/Resource.php:283
>
> *function:* errorHandler ( 256, "Unable to location template file
> system_internal_error.tpl.",
> "/var/www/siremis-4.3.0/openbiz/bin/Resource.php", 283, Array(11) ) @
> /var/www/siremis-4.3.0/openbiz/bin/sysheader.inc 117
> *function:* userErrorHandler ( 256, "Unable to location template file
> system_internal_error.tpl.",
> "/var/www/siremis-4.3.0/openbiz/bin/Resource.php", 283, Array(11) ) @
> *function:* trigger_error ( "Unable to location template file
> system_internal_error.tpl.", 256 ) @
> /var/www/siremis-4.3.0/openbiz/bin/Resource.php 283
> *function:* getTplFileWithPath ( "system_internal_error.tpl", "email"
> ) @ /var/www/siremis-4.3.0/openbiz/bin/BizSystem.php 544
> *function:* getTplFileWithPath ( "system_internal_error.tpl", "email"
> ) @
> /var/www/siremis-4.3.0/siremis/modules/service/userEmailService.php 108
> *function:* SystemInternalErrorEmail ( Array(2), Null ) @
> /var/www/siremis-4.3.0/siremis/modules/common/form/ErrorForm.php 34
> *function:* Report ( ) @
> /var/www/siremis-4.3.0/openbiz/bin/BizController.php 310
> *function:* invoke ( ) @
> /var/www/siremis-4.3.0/openbiz/bin/BizController.php 110
>
> Regards
>
> -- 
> Diogenes
>
>
> ___
> 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
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.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] Kamailio TM - t_set_fr

2016-12-07 Thread Daniel-Constantin Mierla
Hello,

I haven't found any error message related to tm in the logs you attached.

You say that if you omit the first parameter, everything works ok? Can
you try to set the first parameter to a non-zero value?

Cheers,
Daniel


On 06/12/2016 16:45, José Seabra wrote:
> Hello Daniel,
>
> Yes, i have attached this in this email, please checkout.
> Regarding to t_set_fr() function, i use it in several places within my
> kamailio scripts without any issue, I only noticed this behavior on
> this particular case.
>
> I don't if this can be relevant but I have tested t_set_fr function
> with the following parameters => t_set_fr(,2000) and it entered on
> failure route after 2 seconds.
>
>
> Let me know if do you need anything else.
> Thank you
> José Seabra
>
> 2016-12-06 13:26 GMT+00:00 Daniel-Constantin Mierla  >:
>
> Hello,
>
> any error log messages? Any other t_set_fr() in your config file
> that may be executed?
>
> Cheers,
> Daniel
>
>
> On 06/12/2016 12:01, José Seabra wrote:
>> Hello there,
>> I'm using t_set_fr(0,2000) on calls to registered phones but by
>> any reason this  isn't working, the call only enters on the
>> failure route after 30 seconds in case of no response from
>> SBC/Phone, anyone has any idea what can be the reason for that?
>>
>> if(lookup("location")) {
>> xlog("L_INFO", "routing to registered
>> phone ruid=$ruid R=$ru - ID=$ci \n");
>> t_set_fr(0, 2000);
>> t_on_failure("ASBC_FAILURE");
>> t_on_branch("ASBC_BRANCH");
>> route(RELAY);
>> exit;
>> }
>>
>> My RELAY route:
>> route[RELAY] {
>>
>> # enable additional event routes for forwarded requests
>> # - serial forking, RTP relaying handling, a.s.o.
>> if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE"))
>> {
>> if(!t_is_set("branch_route"))
>> t_on_branch("MANAGE_BRANCH");
>> }
>> if (is_method("INVITE|SUBSCRIBE|UPDATE"))
>> {
>> if(!t_is_set("onreply_route"))
>> t_on_reply("MANAGE_REPLY");
>> }
>> if (is_method("INVITE"))
>> {
>> if(!t_is_set("failure_route"))
>> t_on_failure("MANAGE_FAILURE");
>> }
>>
>> if (!t_relay())
>> {
>> sl_reply_error();
>> }
>> exit;
>> }
>>
>> version: kamailio 4.4.2 (x86_64/linux)
>>
>> Thanks
>>
>> -- 
>> Cumprimentos
>> José Seabra
>>
>>
>> ___
>> 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
> www.twitter.com/miconda  -- 
> www.linkedin.com/in/miconda 
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.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
>  
>
> -- 
> Cumprimentos
> José Seabra
-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.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] rtjson + uac + event - OK, ACK and BYE display name not updated

2016-12-07 Thread Daniel-Constantin Mierla
Hello,

the replacement of From and To is done via the uac module -- inside it
is the code for doing these operations. rtjson doesn't have much to do
with subsequent operations.

But iirc, the module does the update only for URIs, being the required
values not to be changed from RFC point of view.

You can try with uac configured to use dialog for storing From/To values
instead of relying on record route parameters -- I haven't tried myself.

Cheers,
Daniel

On 06/12/2016 19:24, Diego Nadares wrote:
> Hi Guys,
>
> We are modifying "from" and "to" headers with rtjson module via a json
> struct. It works fine in INVITE, TRYING, RINGING and OK but not in the
> following messages. Kamailio It's changing ONLY "from" and "to" URI
> BUT NOT the DISPLAY NAME. I think it's the tm module but I can't
> figure out how to confirm this. Maybe I need to configure something
> else in my cfg or could it be a bug?
>
> My json struct that is handled by rtjson module
>
>   response.routing = "serial";
> //response.routing = "parallel";
> response.routes = [];
> response.routes[0] = {};
> response.routes[0].uri = "sip:11@172.16.213.31:5060
> ";
> response.routes[0].headers = { // Headers to be modified
> "from": {
> "display": "11",
> "uri": "sip:1@172.16.213.38
> "
> },
> "to": { 
> "display": "22",
> "uri": "sip:22@172.16.213.38
> "
> },
> };
> response.routes[0].headers.extra = {};//"X-Hdr-A:
> abc\r\nX-Hdr-B: bcd\r\n";
>
> This is part of my cfg
>
> 
> modparam("dialog","dlg_flag", FLD_START)
> modparam("uac","restore_mode","auto")
> modparam("uac", "restore_dlg", 1)
> 
>
> # account only INVITEs
> if (is_method("INVITE") && !has_totag()) {
> setflag(FLT_ACC); # do accounting
>*setflag(FLD_START); # do accounting*
> setflag(FLT_ACCMISSED);
> setflag(FLT_ACCFAILED);
> }
> .
>
>
> From source/Aleg:
> *From: sipp  >;tag=1.*
> *To: sut  >.*
> *
> *
> To dest/Bleg:
> *From: 11  >;tag=1.*
> *To: 22  >.*
> *
> *
> Incorrect display name in BYE and ACK:
> *From: sipp  >;tag=1.*
> *To: sut  >;tag=2.*
> *
> *
>
> interface: any
> filter: ( port 5060 ) and (ip or ip6)
> #
> U 2016/12/06 15:52:13.638731 172.16.213.21:5060
>  -> 172.16.213.38:5060
> 
> INVITE sip:55@172.16.213.38:5060
>  SIP/2.0.
> Via: SIP/2.0/UDP 172.16.213.21:5060;branch=z9hG4bK-12775-1-0.
> *From: sipp  >;tag=1.*
> *To: sut  >.*
> Call-ID: 1-12775@172.16.213.21 .
> CSeq: 1 INVITE.
> Contact: "SIPP"  >.
> Max-Forwards: 70.
> Subject: Performance Test.
> Content-Type: multipart/mixed;boundary=uniqueBoundary.
> Remote-Party-ID:  >:5060;party=calling;id-type=subscriber;privacy=off;screen=no>.
> Content-Length:   549.
> .
> --uniqueBoundary.
> Content-Type: application/sdp.
> .
> v=0.
> o=user1 53655765 2353687637 IN IP4 172.16.213.21.
> s=-.
> c=IN IP4 172.16.213.21.
> t=0 0.
> m=audio 6000 RTP/AVP 8.
> a=rtpmap:8 PCMA/8000.
> a=rtpmap:101 telephone-event/8000.
> a=fmtp:101 0-11,16.
> .
> --uniqueBoundary.
> Content-Type: application/gtd.
> Content-Disposition: signal;handling=optional.
> .
> IAM,.
> CGN,04,y,1,y,4,1143617400.
> CIC,000573.
> CPC,09.
> CPN,02,y,1,52381660.
> FCI,n,n,n,n,y,n,n,u.
> GCI,f7140cc78a611601838a002128d7e512.
> NOC,0,n,1,n.
> PRN,q761*,AR*,oper2,1993.
> TMR,02.
> .
> --uniqueBoundary--.
> 
> #
> U 2016/12/06 15:52:13.734159 172.16.213.38:5060
>  -> 172.16.213.21:5060
> 
> SIP/2.0 100 trying -- your call is important to us.
> Via: SIP/2.0/UDP 172.16.213.21:5060;branch=z9hG4bK-12775-1-0.
> *From: sipp  >;tag=1.*
> *To: sut  >.*
> Call-ID: 1-12775@172.16.213.21 .
> CSeq: 1 INVITE.
> Server: kamailio (4.4.4 (x86_64/linux)).
> Content-Length: 0.
> .
> 
> #
> U 2016/12/06 15:52:13.878600 172.16.213.38:5060
>  -> 172.16.213.31:5060
> 
> INVITE sip:11@172.16.213.31:5060
> 

Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"

2016-12-07 Thread Jonathan Hunter
Hello,


Perfect that all works great, I can trigger a SIP INFO message as required.


Sorry for hassling you so much!


Many thanks


Jon



From: Daniel-Constantin Mierla 
Sent: 06 December 2016 07:46
To: Jonathan Hunter; Kamailio SER - Users Mailing List
Subject: Re: [SR-Users] Send SIP Info within a dialog using 
$uac_req(method)="INFO"


Hello,


you can reorganize the config in order to execute t_relay() for ACK, then you 
can do your stuff after it.


if is ack {

  t_relay();

  custom stuff

  exit;

}


Cheers,
Daniel

On 05/12/2016 15:03, Jonathan Hunter wrote:

Hello,


I had been testing with ACK within that route, but in the ideal scenario I want 
to proxy the ACK, then follow that with the SIP INFO, where as at the moment it 
sends at same time, once it matches.


I wondered if there is an event route I can trigger once I know the ACK has 
been relayed?


Thanks


Jon



From: Daniel-Constantin Mierla 
Sent: 05 December 2016 13:54
To: Jonathan Hunter; Kamailio SER - Users Mailing List
Subject: Re: [SR-Users] Send SIP Info within a dialog using 
$uac_req(method)="INFO"


Hello,


the ACK for requests within dialogs is routed via route[WITHINDLG], if it has a 
Route header -- also you can check if it belongs to an dialog -- dialog module 
should export a function for that.


Cheers,
Daniel

On 05/12/2016 14:13, Jonathan Hunter wrote:

Hello,


Ok thanks for that, it works perfectly.


I am generating the SIP INFO message, on receipt of a 200ok, which is being 
triggered by the event_route[dialog:start].


One last thing, is it possible to trigger /capture the event of the ACK being 
received for the 200 ok ?


As ideally I want to send SIP INFO after the ACK has been sent, however 
currently I am triggering on receipt of the 200ok, so dialog is started.


Can I have;


INVITE--->

<---200OK

ACK--->

INFO>


So in effect RELAY the ACK, then trigger this SIP INFO  to be sent?


Thanks


Jon




From: Daniel-Constantin Mierla 
Sent: 05 December 2016 10:32
To: Jonathan Hunter; Kamailio SER - Users Mailing List
Subject: Re: [SR-Users] Send SIP Info within a dialog using 
$uac_req(method)="INFO"


Hello,


all the headers must be in a single parameter, I see that you provide headers 
one by one in the params array. Try:


jsonrpc_exec('
{
 "jsonrpc":"2.0",
 "method":"tm.t_uac_start",
 "params": [
"INFO",
"$dlg(to_uri)",
".",
".",

"From:$var(testjon)\r\nTo:$var(testjon2)\r\nContact:$var(testjon4)\r\nContent-Type:
 application/json\r\nContent-Length: 0\r\n"
  ]
}
');

Cheers,
Daniel

On 01/12/2016 17:12, Jonathan Hunter wrote:
Hi Daniel,

I am trying tm.t_uac_start and its stating Content-Type Missing, I have tried 
to add to params but it doesnt like it, where should it be defined?

Command below;


jsonrpc_exec('{"jsonrpc":"2.0","method":"tm.t_uac_start","params": ["INFO", 
"$dlg(to_uri)",".",".","From:$var(testjon)\r\n","To:$var(testjon2)\r\n","Contact:$var(testjon4)\r\n","Content-Type:
 application/json\r\n","Content-Length: 0\r\n"]}');

And logs;

Dec  1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: 

Re: [SR-Users] Action: restructuring the source code tree (progress)

2016-12-07 Thread Daniel-Constantin Mierla
Hello,

most of the restructuring planned the source code tree has been pushed
to git repository. Compilation and installation should work for most of
the modules. Few of them that need to install additional tools are next
to be updated.

Then I still have several relocations to do mainly related to docs and
docbook files from the root folder.

Anyhow, commits to source code for core, libs and modules can be pushed
on the new structure without sync'ing before on sr-dev -- in other
words, commit as usual.

Cheers,
Daniel


On 07/12/2016 09:35, Daniel-Constantin Mierla wrote:
> Hello,
>
> today I am going to do the restructuring of the source code tree as
> discussed previously.
>
>   - http://lists.sip-router.org/pipermail/sr-dev/2016-December/037715.html
>
> If anyone has patches to push using existing structure, do it before
> 12:00UTC today. If you need more time, write to sr-dev and let's see how
> we can find an easy solution.
>
> Once I finish with the restructuring, I will send another notification,
> from that moment the commits can go on as usual.
>
> Cheers,
> Daniel
>

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.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] rtjson + uac + event - OK, ACK and BYE display name not updated

2016-12-07 Thread Diego Nadares
Hi Daniel, thanks for your reply.

I think uac it's configured with dialog module allready for storing those
values. In fact, it's changing display and uri partially. These are my uac
and dlg params:

modparam("dialog","dlg_flag", FLD_START)
modparam("uac","restore_mode","auto") modparam("uac", "restore_dlg", 1)
<--- to safe values

The dialog flag is set in request route:

request_route { .
# account only INVITEs if (is_method("INVITE") && !has_totag()) {
setflag(FLT_ACC); # do accounting setflag(FLD_START); # do accounting
setflag(FLT_ACCMISSED); setflag(FLT_ACCFAILED); }
Am I missing something in my cfg? Maybe I need to put something else
related to dialogs?

In the sip trace I see that it's doing fine with uris in all messages but
the problem is only with the display names in "ack" and "bye". Even when
"bye" comes from b leg it left display names unchanged.

What should I log to see more info? Any hint where to look in the code?

Thanks!

Diego






El El mié, 7 de dic. de 2016 a las 06:52, Daniel-Constantin Mierla <
mico...@gmail.com> escribió:

> Hello,
>
> the replacement of From and To is done via the uac module -- inside it is
> the code for doing these operations. rtjson doesn't have much to do with
> subsequent operations.
>
> But iirc, the module does the update only for URIs, being the required
> values not to be changed from RFC point of view.
>
> You can try with uac configured to use dialog for storing From/To values
> instead of relying on record route parameters -- I haven't tried myself.
> Cheers,
> Daniel
>
>
> On 06/12/2016 19:24, Diego Nadares wrote:
>
> Hi Guys,
>
> We are modifying "from" and "to" headers with rtjson module via a json
> struct. It works fine in INVITE, TRYING, RINGING and OK but not in the
> following messages. Kamailio It's changing ONLY "from" and "to" URI BUT NOT
> the DISPLAY NAME. I think it's the tm module but I can't figure out how to
> confirm this. Maybe I need to configure something else in my cfg or could
> it be a bug?
>
> My json struct that is handled by rtjson module
>
>   response.routing = "serial";
> //response.routing = "parallel";
> response.routes = [];
> response.routes[0] = {};
> response.routes[0].uri = "sip:11@172.16.213.31:5060";
> response.routes[0].headers = { // Headers to be modified
> "from": {
> "display": "11 <011%20->",
> "uri": "sip:1@172.16.213.38"
> },
> "to": {
> "display": "22",
> "uri": "sip:22@172.16.213.38"
> },
> };
> response.routes[0].headers.extra = {};//"X-Hdr-A: abc\r\nX-Hdr-B:
> bcd\r\n";
>
> This is part of my cfg
>
> 
> modparam("dialog","dlg_flag", FLD_START)
> modparam("uac","restore_mode","auto")
> modparam("uac", "restore_dlg", 1)
> 
>
> # account only INVITEs
> if (is_method("INVITE") && !has_totag()) {
> setflag(FLT_ACC); # do accounting
>* setflag(FLD_START); # do accounting*
> setflag(FLT_ACCMISSED);
> setflag(FLT_ACCFAILED);
> }
> .
>
>
> From source/Aleg:
> *From: sipp  >;tag=1.*
> *To: sut  >.*
>
> To dest/Bleg:
> *From: 11 <011%20->  >;tag=1.*
> *To: 22  >.*
>
> Incorrect display name in BYE and ACK:
> *From: sipp  >;tag=1.*
> *To: sut  >;tag=2.*
>
>
> interface: any
> filter: ( port 5060 ) and (ip or ip6)
> #
> U 2016/12/06 15:52:13.638731 172.16.213.21:5060 -> 172.16.213.38:5060
> INVITE sip:55@172.16.213.38:5060 SIP/2.0.
> Via: SIP/2.0/UDP 172.16.213.21:5060;branch=z9hG4bK-12775-1-0.
> *From: sipp  >;tag=1.*
> *To: sut  >.*
> Call-ID: 1-12775@172.16.213.21.
> CSeq: 1 INVITE.
> Contact: "SIPP" .
> Max-Forwards: 70.
> Subject: Performance Test.
> Content-Type: multipart/mixed;boundary=uniqueBoundary.
> Remote-Party-ID: :5060;party=calling;id-type=
> subscriber;privacy=off;screen=no>.
> Content-Length:   549.
> .
> --uniqueBoundary.
> Content-Type: application/sdp.
> .
> v=0.
> o=user1 53655765 2353687637 <02353%2068-7637> IN IP4 172.16.213.21.
> s=-.
> c=IN IP4 172.16.213.21.
> t=0 0.
> m=audio 6000 RTP/AVP 8.
> a=rtpmap:8 PCMA/8000.
> a=rtpmap:101 telephone-event/8000.
> a=fmtp:101 0-11,16.
> .
> --uniqueBoundary.
> Content-Type: application/gtd.
> Content-Disposition: signal;handling=optional.
> .
> IAM,.
> CGN,04,y,1,y,4,1143617400 <011%204361-7400>.
> CIC,000573.
> CPC,09.
> CPN,02,y,1,52381660.
> FCI,n,n,n,n,y,n,n,u.
> GCI,f7140cc78a611601838a002128d7e512.
> NOC,0,n,1,n.
> PRN,q761*,AR*,oper2,1993.
> TMR,02.
> .
> --uniqueBoundary--.
> 
> #
> U 2016/12/06 15:52:13.734159 172.16.213.38:5060 -> 172.16.213.21:5060
> SIP/2.0 100 try

Re: [SR-Users] Kamailio TM - t_set_fr

2016-12-07 Thread José Seabra
Hi Daniel,
Yes if I omit the first parameter it works, and if I configure other value
than 0 on first parameter it only enters on failure route after expire the
value configured on first parameter, for example;
I i set t_set_fr(1,2000), call will only enter in failure route after
1 miliseconds.

This behavior is  very weird, it only appends when i send the INVITE to the
AOR.

But maybe is something that I'm doing wrong before this route within my
kamailio script, anyway i'm still looking for the possible causes inside of
my script.

Once again, thank you for your great help.

Regards
José

2016-12-07 9:48 GMT+00:00 Daniel-Constantin Mierla :

> Hello,
>
> I haven't found any error message related to tm in the logs you attached.
>
> You say that if you omit the first parameter, everything works ok? Can you
> try to set the first parameter to a non-zero value?
>
> Cheers,
> Daniel
>
> On 06/12/2016 16:45, José Seabra wrote:
>
> Hello Daniel,
>
> Yes, i have attached this in this email, please checkout.
> Regarding to t_set_fr() function, i use it in several places within my
> kamailio scripts without any issue, I only noticed this behavior on this
> particular case.
>
> I don't if this can be relevant but I have tested t_set_fr function with
> the following parameters => t_set_fr(,2000) and it entered on failure route
> after 2 seconds.
>
>
> Let me know if do you need anything else.
> Thank you
> José Seabra
>
> 2016-12-06 13:26 GMT+00:00 Daniel-Constantin Mierla :
>
>> Hello,
>>
>> any error log messages? Any other t_set_fr() in your config file that may
>> be executed?
>> Cheers,
>> Daniel
>>
>>
>> On 06/12/2016 12:01, José Seabra wrote:
>>
>> Hello there,
>> I'm using t_set_fr(0,2000) on calls to registered phones but by any
>> reason this  isn't working, the call only enters on the failure route after
>> 30 seconds in case of no response from SBC/Phone, anyone has any idea what
>> can be the reason for that?
>>
>> if(lookup("location")) {
>> xlog("L_INFO", "routing to registered phone
>> ruid=$ruid R=$ru - ID=$ci \n");
>> t_set_fr(0, 2000);
>> t_on_failure("ASBC_FAILURE");
>> t_on_branch("ASBC_BRANCH");
>> route(RELAY);
>> exit;
>> }
>>
>> My RELAY route:
>> route[RELAY] {
>>
>> # enable additional event routes for forwarded requests
>> # - serial forking, RTP relaying handling, a.s.o.
>> if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE"))
>> {
>> if(!t_is_set("branch_route"))
>> t_on_branch("MANAGE_BRANCH");
>> }
>> if (is_method("INVITE|SUBSCRIBE|UPDATE"))
>> {
>> if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY");
>> }
>> if (is_method("INVITE"))
>> {
>> if(!t_is_set("failure_route"))
>> t_on_failure("MANAGE_FAILURE");
>> }
>>
>> if (!t_relay())
>> {
>> sl_reply_error();
>> }
>> exit;
>> }
>>
>> version: kamailio 4.4.2 (x86_64/linux)
>>
>> Thanks
>>
>> --
>> Cumprimentos
>> José Seabra
>>
>>
>> ___
>> 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 Mierlawww.twitter.com/miconda -- 
>> www.linkedin.com/in/miconda
>> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>>
>> ___ SIP Express Router (SER)
>> and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org http://lists.sip-router.org/cg
>> i-bin/mailman/listinfo/sr-users
>
> --
> Cumprimentos
> José Seabra
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
>


-- 
Cumprimentos
José Seabra
___
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] rtjson + uac + event - OK, ACK and BYE display name not updated

2016-12-07 Thread Daniel-Constantin Mierla
Hello,

the code doing the replace for From/To is in module uac/replace.c.

Cheers,
daniel


On 07/12/2016 15:47, Diego Nadares wrote:
> Hi Daniel, thanks for your reply. I think uac it's configured with
> dialog module allready for storing those values. In fact, it's
> changing display and uri partially. These are my uac and dlg params:
> modparam("dialog","dlg_flag", FLD_START)
> modparam("uac","restore_mode","auto") modparam("uac", "restore_dlg",
> 1) <--- to safe values
> The dialog flag is set in request route:
> request_route { .
> # account only INVITEs if (is_method("INVITE") && !has_totag()) {
> setflag(FLT_ACC); # do accounting setflag(FLD_START); # do accounting
> setflag(FLT_ACCMISSED); setflag(FLT_ACCFAILED); }
> Am I missing something in my cfg? Maybe I need to put something else
> related to dialogs?  
>
> In the sip trace I see that it's doing fine with uris in all messages
> but the problem is only with the display names in "ack" and "bye".
> Even when "bye" comes from b leg it left display names unchanged.
>
> What should I log to see more info? Any hint where to look in the code?
> Thanks!
> Diego
>
>
>
>
>
> El El mié, 7 de dic. de 2016 a las 06:52, Daniel-Constantin Mierla
> mailto:mico...@gmail.com>> escribió:
>
> Hello,
>
> the replacement of From and To is done via the uac module --
> inside it is the code for doing these operations. rtjson doesn't
> have much to do with subsequent operations.
>
> But iirc, the module does the update only for URIs, being the
> required values not to be changed from RFC point of view.
>
> You can try with uac configured to use dialog for storing From/To
> values instead of relying on record route parameters -- I haven't
> tried myself.
>
> Cheers,
> Daniel
>
>
> On 06/12/2016 19:24, Diego Nadares wrote:
>> Hi Guys,
>>
>> We are modifying "from" and "to" headers with rtjson module via a
>> json struct. It works fine in INVITE, TRYING, RINGING and OK but
>> not in the following messages. Kamailio It's changing ONLY "from"
>> and "to" URI BUT NOT the DISPLAY NAME. I think it's the tm module
>> but I can't figure out how to confirm this. Maybe I need to
>> configure something else in my cfg or could it be a bug?
>>
>> My json struct that is handled by rtjson module
>>
>>   response.routing = "serial";
>> //response.routing = "parallel";
>> response.routes = [];
>> response.routes[0] = {};
>> response.routes[0].uri =
>> "sip:11@172.16.213.31:5060
>> ";
>> response.routes[0].headers = { // Headers to be modified
>> "from": {
>> "display": "11
>> ",
>> "uri": "sip:1@172.16.213.38
>> "
>> },
>> "to": { 
>> "display": "22",
>> "uri": "sip:22@172.16.213.38
>> "
>> },
>> };
>> response.routes[0].headers.extra = {};//"X-Hdr-A:
>> abc\r\nX-Hdr-B: bcd\r\n";
>>
>> This is part of my cfg
>>
>> 
>> modparam("dialog","dlg_flag", FLD_START)
>> modparam("uac","restore_mode","auto")
>> modparam("uac", "restore_dlg", 1)
>> 
>>
>> # account only INVITEs
>> if (is_method("INVITE") && !has_totag()) {
>> setflag(FLT_ACC); # do accounting
>>*setflag(FLD_START); # do accounting*
>> setflag(FLT_ACCMISSED);
>> setflag(FLT_ACCFAILED);
>> }
>> .
>>
>>
>> From source/Aleg:
>> *From: sipp > >;tag=1.*
>> *To: sut > >.*
>> *
>> *
>> To dest/Bleg:
>> *From: 11 
>> > >;tag=1.*
>> *To: 22 > >.*
>> *
>> *
>> Incorrect display name in BYE and ACK:
>> *From: sipp > >;tag=1.*
>> *To: sut > >;tag=2.*
>> *
>> *
>>
>> interface: any
>> filter: ( port 5060 ) and (ip or ip6)
>> #
>> U 2016/12/06 15:52:13.638731 172.16.213.21:5060
>>  -> 172.16.213.38:5060
>> 
>> INVITE sip:55@172.16.213.38:5060
>>  SIP/2.0.
>> Via: SIP/2.0/UDP 172.16.213.21:5060;branch=z9hG4bK-12775-1-0.
>> *From: sipp > >;tag=1.*
>> *To: sut > >.*
>> Call-ID: 1-12775@172.16

[SR-Users] Siremis manual to learn

2016-12-07 Thread Saranga Nagesh
Hi,

 

I have installed kamailio and Siremis in centos but I don't know how to
use Siremis.

 

Can you forward me manual or link to learn about Siremis.

 

 

Thanks & Best Regards,

Nagesh Saranga

___
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] rtjson + uac + event - OK, ACK and BYE display name not updated

2016-12-07 Thread Diego Nadares
Hi Daniel, thanks again. I modified the code and now it's working as I
need. Do you think this could be useful for anybody else? If so I can
show/send you the code to verify it's ok and then ask for a pull request.

Thanks again!

Diego
___
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] Kamailio TM - t_set_fr

2016-12-07 Thread Daniel-Constantin Mierla
Hello,

do you get any 1xx response after sending out the request?

Cheers,
Daniel


On 07/12/2016 21:11, José Seabra wrote:
> Hi Daniel,
> Yes if I omit the first parameter it works, and if I configure other
> value than 0 on first parameter it only enters on failure route after
> expire the value configured on first parameter, for example;
> I i set t_set_fr(1,2000), call will only enter in failure route
> after 1 miliseconds.
>
> This behavior is  very weird, it only appends when i send the INVITE
> to the AOR.
>
> But maybe is something that I'm doing wrong before this route within
> my kamailio script, anyway i'm still looking for the possible causes
> inside of my script.
>
> Once again, thank you for your great help.
>
> Regards
> José
>
> 2016-12-07 9:48 GMT+00:00 Daniel-Constantin Mierla  >:
>
> Hello,
>
> I haven't found any error message related to tm in the logs you
> attached.
>
> You say that if you omit the first parameter, everything works ok?
> Can you try to set the first parameter to a non-zero value?
>
> Cheers,
> Daniel
>
>
> On 06/12/2016 16:45, José Seabra wrote:
>> Hello Daniel,
>>
>> Yes, i have attached this in this email, please checkout.
>> Regarding to t_set_fr() function, i use it in several places
>> within my kamailio scripts without any issue, I only noticed this
>> behavior on this particular case.
>>
>> I don't if this can be relevant but I have tested t_set_fr
>> function with the following parameters => t_set_fr(,2000) and it
>> entered on failure route after 2 seconds.
>>
>>
>> Let me know if do you need anything else.
>> Thank you
>> José Seabra
>>
>> 2016-12-06 13:26 GMT+00:00 Daniel-Constantin Mierla
>> mailto:mico...@gmail.com>>:
>>
>> Hello,
>>
>> any error log messages? Any other t_set_fr() in your config
>> file that may be executed?
>>
>> Cheers,
>> Daniel
>>
>>
>> On 06/12/2016 12:01, José Seabra wrote:
>>> Hello there,
>>> I'm using t_set_fr(0,2000) on calls to registered phones but
>>> by any reason this  isn't working, the call only enters on
>>> the failure route after 30 seconds in case of no response
>>> from SBC/Phone, anyone has any idea what can be the reason
>>> for that?
>>>
>>> if(lookup("location")) {
>>> xlog("L_INFO", "routing to
>>> registered phone ruid=$ruid R=$ru - ID=$ci \n");
>>> t_set_fr(0, 2000);
>>> t_on_failure("ASBC_FAILURE");
>>> t_on_branch("ASBC_BRANCH");
>>> route(RELAY);
>>> exit;
>>> }
>>>
>>> My RELAY route:
>>> route[RELAY] {
>>>
>>> # enable additional event routes for forwarded requests
>>> # - serial forking, RTP relaying handling, a.s.o.
>>> if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE"))
>>> {
>>> if(!t_is_set("branch_route"))
>>> t_on_branch("MANAGE_BRANCH");
>>> }
>>> if (is_method("INVITE|SUBSCRIBE|UPDATE"))
>>> {
>>> if(!t_is_set("onreply_route"))
>>> t_on_reply("MANAGE_REPLY");
>>> }
>>> if (is_method("INVITE"))
>>> {
>>> if(!t_is_set("failure_route"))
>>> t_on_failure("MANAGE_FAILURE");
>>> }
>>>
>>> if (!t_relay())
>>> {
>>> sl_reply_error();
>>> }
>>> exit;
>>> }
>>>
>>> version: kamailio 4.4.2 (x86_64/linux)
>>>
>>> Thanks
>>>
>>> -- 
>>> Cumprimentos
>>> José Seabra
>>>
>>>
>>> ___
>>> 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
>> www.twitter.com/miconda  -- 
>> www.linkedin.com/in/miconda 
>> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.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
>>