Re: [SR-Users] Return body/string from Perl library

2017-01-20 Thread Daniel-Constantin Mierla


On 20/01/2017 05:40, David Cunningham wrote:
> Hi Daniel,
>
> Yes, that works. Thank you!
Welcome!

Daniel

>
>
> On 19 January 2017 at 19:53, Daniel-Constantin Mierla
> mailto:mico...@gmail.com>> wrote:
>
> Hello,
>
> no familiar with the app_perl api and the docs doesn't show any
> function for setting the body. But you should be able set the new
> body in an avp:
>
> 
> https://www.kamailio.org/docs/modules/stable/modules/app_perl.html#ID-d4453222c49e08dc556c25a6586a00bc
> 
> 
>
> and then use it in kamailio.cfg.
>
> Cheers,
> Daniel
>
>
> On 19/01/2017 00:14, David Cunningham wrote:
>> Hello,
>>
>> We are using Kamailio's perl module and want our custom library
>> to set the body on a SIP message.
>>
>> Is it possible to set a SIP message body from within Perl, or can
>> we return a string to the Kamailio configuration to then use with
>> set_body()?
>>
>> Thanks for any advice.
>>
>> -- 
>> David Cunningham, Voisonics
>> http://voisonics.com/
>> USA: +1 213 221 1092 
>> Australia: +61 (0) 2 8063 9019 
>>
>>
>> ___
>> 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
>  
>
> -- 
> David Cunningham, Voisonics http://voisonics.com/ USA: +1 213 221 1092
> Australia: +61 (0) 2 8063 9019
-- 
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 parse failed message

2017-01-20 Thread Daniel-Constantin Mierla


On 19/01/2017 22:56, Daniel-Constantin Mierla wrote:
>
> Hello,
>
>
> On 19/01/2017 10:48, Hai Bui Duc Ha wrote:
>> Hi Daniel,
>>
>> Thank you for reply.
>>  
>> On Tue, Jan 17, 2017 at 6:05 PM, Daniel-Constantin Mierla
>> mailto:mico...@gmail.com>> wrote:
>>
>> Hello,
>>
>> apparently I missed the follow ups on this discussion, dragged in
>> by other topics on mailing list. 
>>
>> Can you get the pcap with all the traffic taken on kamailio
>> server for the call (from initial invite to the end of the call)?
>>
>> I send you the pcap at enclosed file. You can see the packet *No.5 *,
>> it missing SIP message body:
>> /*Media Attribute (a): rtpmap:8 PCMA/8000*/
>> /*Media Attribute (a): rtpmap:101 telephone-event/8000*/
>> /*Media Attribute (a): fmtp:101 0-16*/
>>
>> I expect that content length is mismatching or there is a '\0'
>> inside the sdp.
>>
>> Can you explain me more about this ?
> TCP is a stream protocol, meaning that the application (kamailio) need
> to read and parse to figure out the end of a SIP message. The state
> machine as per RFC requires the application to read and identify the
> Content-Length header, take its value, read until the end of headers
> is found (an empty line) and from there on read as much as the value
> of Content-Length to get the body and consider the end of message there.
>
> If the sending application puts a lower value in the Content-Length
> than the number of chars in the body, the rest remains in the buffer
> and the receiving application (kamailio) attempts to parse a new SIP
> message.
>
> The other thing I was thinking of was the presence of '\0' which marks
> the end of string in C.
>
> I will look at the pcap very soon and see what I find there.
>
The problem is the value of Content-Lenght set by the client -- it is
set only to the size that it is view as part of the invite. A bit later
the client sends more sdp, but exceeding the size sent in C-L header.
That part of SDP remains as garbage.

So there is a bug in client app.

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] UAC authentication

2017-01-20 Thread Daniel-Constantin Mierla
Hello,

you have to set authentication username and password inside the
$uac_req(...) -- see the attributes for it at:

  -
https://www.kamailio.org/wiki/cookbooks/4.4.x/pseudovariables#uac_req_key

Cheers,
Daniel


On 20/01/2017 07:26, anfecora wrote:
> can someone please guide me where to find the usage of auc module,
> thanks in advance.
>
> I am registering the uac in one end then i want to forward that
> registration to an external registrar, if i use $du some domain, some
> of the ipv6 info is going to be forwarded, i need to make it look more
> like an a b2bua than a outbound proxy therefore i need to use the auc
> module(also i need to cover all ipv6 info since i am proxying from
> ipv4 to ipv6).
>
> i am able to register the client to kamailio, then kamailio send the
> registration to the external registrar, but when the registrar sends
> back the challenge uac does not reply, any ideas how can achieve this.
>
> uac(linphone etc) --registration--->kamailio(registrar
> module)--register(uac)--->SBC
>
> sbcinvite>kamailio(lookup)-invite>uac(linphone etc)
>
> this is the code i am using.
>
>
>
> # Handle SIP registrations
> route[REGISTRAR] {
> xlog("REGISTERING ");
> if (is_method("REGISTER"))
> {
> if(isflagset(FLT_NATS))
> {
> setbflag(FLB_NATB);
> # uncomment next line to do SIP NAT pinging
> ## setbflag(FLB_NATSIPPING);
> }
> if(af==INET6)
> setbflag(FLB_IPV6);
> xlog("IT IS  IPV6");
> if (!save("location"))
> sl_reply_error();
> route(REGSBCFWD);
> exit;
> }
> }
>
> route[REGSBCFWD]{
> xlog("CREATING OTHER LEG TO THE SBC");
> if(!is_method("REGISTER"))
> {
> return;
> }
> xlog("CREATING PACKAGE $si -- $fU-- $au--$du-- $tU --$ru");
>
> $var(rip) = "sip.somedomain.com ";
> $uac_req(method)="REGISTER";
> $uac_req(ruri)="sip:" + $var(rip) + ":" + "5060";
> $uac_req(furi)="sip:" + $tU + "@" + $var(rip);
> $uac_req(turi)="sip:" + $tU + "@" + $var(rip);
> $uac_req(hdrs)="Contact:  + "10.0.0.222"
> + ":" "5060" + ">\r\n";
> if($sel(contact.expires) != $null)
> $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
> $sel(contact.expires) + "\r\n";
> else
> $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
> $hdr(Expires) + "\r\n";
> uac_req_send();
>
>
>
> }
>
>
>
>
>
> REGISTER sip:sip.somedomain.com:5060 
> SIP/2.0.
> Via: SIP/2.0/UDP
> 10.0.0.222:5060;branch=z9hG4bK285f.13a7f0c0.0.
> To:  >.
> From:  >;tag=a82eaf71666096790d1397845fbd3254-ebaa.
> CSeq: 10 REGISTER.
> Call-ID: 357e21ae51d8416d-26605@10.0.0.222
> .
> Max-Forwards: 70.
> Content-Length: 0.
> User-Agent: kamailio (4.4.4 (x86_64/linux)).
> Contact: http://sip:140524@10.0.0.222:5060>>.
> Expires: 3600.
> .
>
>
>
> SIP/2.0 401 Unauthorized.
> Via: SIP/2.0/UDP
> 10.0.0.222:5060;branch=z9hG4bK4b53.ad842757.0.
> To:  >.
> From:  >;tag=a82eaf71666096790d1397845fbd3254-37da.
> Call-ID: 357e21ae51d8416d-26603@10.0.0.222
> .
> CSeq: 10 REGISTER.
> WWW-Authenticate: Digest realm="sip.somedomain.com
> ",
> nonce="f5831435-3e69-4b78-ab6d-dcb0897e477b", algorithm=MD5, qop="auth".
> User-Agent: somedomain.com  Host:some proxy.
> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
> REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE.
> Content-Length: 0.
> .
>
>
> ___
> 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


[SR-Users] FOSDEM 2017

2017-01-20 Thread Daniel-Constantin Mierla
Hello,

another edition of FOSDEM is approaching, about 2 weeks left:

  - https://fosdem.org/2017/

Couple of devs and many Kamailio friends will be around.

Like past year, there is a Realtime Communications devroom, this edition
on Sunday. Very interesting presentation for our ecosystem: Olle giving
a presentation about IPv4/IPv6, Inaki introducing its SFU media server
project, Jose talking about JsSIP, Daniel debating about fundraising
FreeRTC, Lorenzo with Janus SIP-WebRTC gateway, the other Lorenzo with
Homer Sipcature, Saul with Jitsi, Dan with cgrates, Matt with Asterisk,
Giovanni with FreeSwitch... Schedule at:

  - https://fosdem.org/2017/schedule/track/real_time_communications/

On Sunday morning, part of Lua devroom, I will present about using Lua
for building RTC services with Kamailio:

  - https://fosdem.org/2017/schedule/track/lua/
  - https://fosdem.org/2017/schedule/event/luartcserviceskamailio/

During the past editions we organized a dinner on Saturday evening.
Shall we attempt to do it again in advance this year? Or should we do it
on spot based on the weather and mood at the end of Saturday?

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
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


[SR-Users] serial forking calls using TSILO

2017-01-20 Thread Tomas Zanet
Hello,
I'm using Kamailio 4.4.4 with TSILO module in order to support Push 
Notifications used by our voip app on Apple ios10.
So far, everything works fine:  Kamailio can get an incoming call, suspend it, 
then send push notification with an external script, receive a new app 
registration and then call it after resuming the invite.
To do so, thanks to Mr, Cabiddu, I used all the functions described here
http://www.kamailio.org/events/2015-KamailioWorld/Day2/20-Federico.Cabiddu-Kamailio-In-A-Mobile-World.pdf


Right now, I would like to support serial forking calls using push notification 
because it was already supported with legacy voip.
To do so, I used failure_route function where, after getting the call 
destinations and setting them into an avp, I set the new SIP request uri $ru.
Here is my failure_route:
failure_route[MANAGE_FAILURE]
route(NATMANAGE);
if (t_is_canceled())
exit;


#!ifdef WITH_BLOCK3XX
# block call redirect based on 3xx replies.
if (t_check_status("3[0-9][0-9]"))
t_reply("404","Not found");
exit;

#!endif

   if (is_avp_set("$avp(group_members_db)"))
$ru ="sip:"+$avp(group_members_db)+"@"+$fd;
$avp(group_members_db) = $null;
route(LOCATION);
exit;



I am troubleshooting this scenario and this is what I see:
1) Kamailio receives incoming call
2) Suspend it
3) Send Push notification to account1
4) Kamailio receives account1 registration -> INVRESUME route is now called
5) Then call account1
6) Nobody answers the call
7) failure_route[MANAGE_FAILURE] is now called -> set $ru with next sipaccount: 
account2
8) suspend invite
9) send push notification to account2
10) account2 sends its sip registration -> INVRESUME route is now called
11) Kamailio calls account1 instead of account2 -> this is my issue

On step 10: despite account2 is registered, I checked it using "kamctl ul 
show", the second call is forwarded all'account1 and not to account2.
I also checked the TSILO logs and everything seems ok. Here is the logs:
First call:
  suspended transaction [53945:1648394094] asterisk => account1
  htable key value [53945:1648394094]
  resuming trasaction [53945:1648394094] account1 53945:1648394094)
second call:
  suspended transaction [53945:1648394094] asterisk => account2
  htable key value [53945:1648394094]
  resuming trasaction [53945:1648394094] account2 53945:1648394094)

In order to find out the issue I put some xlogs, printing $ru value: what I see 
is the $ru value is set correctly on failure_route but as soon as the 
t_continue is called, the ru overwritten back to account1

Can anyone address me to find out the solution?
Thanks in advance

T.



Tomas Zanet
Software Design Department
tza...@came.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] [sr-dev] FOSDEM 2017

2017-01-20 Thread Alexandr Dubovikov
Hi Daniel,

IMHO we can do like last year. It was good organized.

Wbr,
Alexandr

On 20 January 2017 at 11:00, Daniel-Constantin Mierla 
wrote:

> Hello,
>
> another edition of FOSDEM is approaching, about 2 weeks left:
>
>   - https://fosdem.org/2017/
>
> Couple of devs and many Kamailio friends will be around.
>
> Like past year, there is a Realtime Communications devroom, this edition
> on Sunday. Very interesting presentation for our ecosystem: Olle giving
> a presentation about IPv4/IPv6, Inaki introducing its SFU media server
> project, Jose talking about JsSIP, Daniel debating about fundraising
> FreeRTC, Lorenzo with Janus SIP-WebRTC gateway, the other Lorenzo with
> Homer Sipcature, Saul with Jitsi, Dan with cgrates, Matt with Asterisk,
> Giovanni with FreeSwitch... Schedule at:
>
>   - https://fosdem.org/2017/schedule/track/real_time_communications/
>
> On Sunday morning, part of Lua devroom, I will present about using Lua
> for building RTC services with Kamailio:
>
>   - https://fosdem.org/2017/schedule/track/lua/
>   - https://fosdem.org/2017/schedule/event/luartcserviceskamailio/
>
> During the past editions we organized a dinner on Saturday evening.
> Shall we attempt to do it again in advance this year? Or should we do it
> on spot based on the weather and mood at the end of Saturday?
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) -
> www.asipto.com
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
>
> ___
> sr-dev mailing list
> sr-...@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
___
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] UAC authentication

2017-01-20 Thread anfecora
Thank you Daniel. It will work if i have username and password in db or
something else.

In this case i am getting the register from the sip client and i dont have
the passwd but i need to forward it somehow via uac and on challenge pass
it back to the sip client.

I have done this with $du and works but when an invite comes from the b
side(sbc) to the a side(thesip client) there is no aor or anything i can
lookup to pass it along. Which is what i am trying to resolve.

The sbc do not support path and ob header correctly. And cries when it gets
any ipv6 address.

On Jan 20, 2017 12:41 AM, "Daniel-Constantin Mierla" 
wrote:

> Hello,
>
> you have to set authentication username and password inside the
> $uac_req(...) -- see the attributes for it at:
>
>   - https://www.kamailio.org/wiki/cookbooks/4.4.x/
> pseudovariables#uac_req_key
>
> Cheers,
> Daniel
>
> On 20/01/2017 07:26, anfecora wrote:
>
> can someone please guide me where to find the usage of auc module, thanks
> in advance.
>
> I am registering the uac in one end then i want to forward that
> registration to an external registrar, if i use $du some domain, some of
> the ipv6 info is going to be forwarded, i need to make it look more like an
> a b2bua than a outbound proxy therefore i need to use the auc module(also i
> need to cover all ipv6 info since i am proxying from ipv4 to ipv6).
>
> i am able to register the client to kamailio, then kamailio send the
> registration to the external registrar, but when the registrar sends back
> the challenge uac does not reply, any ideas how can achieve this.
>
> uac(linphone etc) --registration--->kamailio(registrar
> module)--register(uac)--->SBC
>
> sbcinvite>kamailio(lookup)-invite>uac(linphone etc)
>
> this is the code i am using.
>
>
>
> # Handle SIP registrations
> route[REGISTRAR] {
> xlog("REGISTERING ");
> if (is_method("REGISTER"))
> {
> if(isflagset(FLT_NATS))
> {
> setbflag(FLB_NATB);
> # uncomment next line to do SIP NAT pinging
> ## setbflag(FLB_NATSIPPING);
> }
> if(af==INET6)
> setbflag(FLB_IPV6);
> xlog("IT IS  IPV6");
> if (!save("location"))
> sl_reply_error();
> route(REGSBCFWD);
> exit;
> }
> }
>
> route[REGSBCFWD]{
> xlog("CREATING OTHER LEG TO THE SBC");
> if(!is_method("REGISTER"))
> {
> return;
> }
> xlog("CREATING PACKAGE $si -- $fU-- $au--$du-- $tU --$ru");
>
> $var(rip) = "sip.somedomain.com";
> $uac_req(method)="REGISTER";
> $uac_req(ruri)="sip:" + $var(rip) + ":" + "5060";
> $uac_req(furi)="sip:" + $tU + "@" + $var(rip);
> $uac_req(turi)="sip:" + $tU + "@" + $var(rip);
> $uac_req(hdrs)="Contact:  + "10.0.0.222"
> + ":" "5060" + ">\r\n";
> if($sel(contact.expires) != $null)
> $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
> $sel(contact.expires) + "\r\n";
> else
> $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
> $hdr(Expires) + "\r\n";
> uac_req_send();
>
>
>
> }
>
>
>
>
>
> REGISTER sip:sip.somedomain.com:5060 SIP/2.0.
> Via: SIP/2.0/UDP 10.0.0.222:5060;branch=z9hG4bK285f.
> 13a7f0c0.0.
> To: .
> From: ;tag=a82eaf71666096790d1397845fbd32
> 54-ebaa.
> CSeq: 10 REGISTER.
> Call-ID: 357e21ae51d8416d-26605@10.0.0.222.
> Max-Forwards: 70.
> Content-Length: 0.
> User-Agent: kamailio (4.4.4 (x86_64/linux)).
> Contact: .
> Expires: 3600.
> .
>
>
>
> SIP/2.0 401 Unauthorized.
> Via: SIP/2.0/UDP 10.0.0.222:5060;branch=z9hG4bK4b53.
> ad842757.0.
> To: .
> From: ;tag=a82eaf71666096790d1397845fbd32
> 54-37da.
> Call-ID: 357e21ae51d8416d-26603@10.0.0.222.
> CSeq: 10 REGISTER.
> WWW-Authenticate: Digest realm="sip.somedomain.com",
> nonce="f5831435-3e69-4b78-ab6d-dcb0897e477b", algorithm=MD5, qop="auth".
> User-Agent: somedomain.com Host:some proxy.
> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
> REFER, NOTIFY, PUBLISH, SUBSCRIBE.
> Content-Length: 0.
> .
>
>
> ___
> 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/cgi-bin/mailman/listinfo/sr-users
>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-us

Re: [SR-Users] serial forking calls using TSILO

2017-01-20 Thread Daniel-Constantin Mierla
Hello,

have you stored the transaction for the second account?

Cheers,
Daniel


On 20/01/2017 11:05, Tomas Zanet wrote:
> Hello,
> I’m using Kamailio 4.4.4 with TSILO module in order to support Push
> Notifications used by our voip app on Apple ios10.
> So far, everything works fine:  Kamailio can get an incoming call,
> suspend it, then send push notification with an external script,
> receive a new app registration and then call it after resuming the invite.
> To do so, thanks to Mr, Cabiddu, I used all the functions described here
> http://www.kamailio.org/events/2015-KamailioWorld/Day2/20-Federico.Cabiddu-Kamailio-In-A-Mobile-World.pdf
>  
>  
> Right now, I would like to support serial forking calls using push
> notification because it was already supported with legacy voip.
> To do so, I used failure_route function where, after getting the call
> destinations and setting them into an avp, I set the new SIP request
> uri $ru.
> Here is my failure_route:
> failure_route[MANAGE_FAILURE]
> route(NATMANAGE);
> if (t_is_canceled())
> exit;
>  
>  
> #!ifdef WITH_BLOCK3XX
> # block call redirect based on 3xx replies.
> if (t_check_status("3[0-9][0-9]"))
> t_reply("404","Not found");
> exit;
>  
> #!endif
>  
>if (is_avp_set("$avp(group_members_db)"))
> $ru ="sip:"+$avp(group_members_db)+"@"+$fd;
> $avp(group_members_db) = $null;
> route(LOCATION);
> exit;
>  
>  
>  
> I am troubleshooting this scenario and this is what I see:
> 1) Kamailio receives incoming call
> 2) Suspend it
> 3) Send Push notification to account1
> 4) Kamailio receives account1 registration -> INVRESUME route is now
> called
> 5) Then call account1
> 6) Nobody answers the call
> 7) failure_route[MANAGE_FAILURE] is now called -> set $ru with next
> sipaccount: account2
> 8) suspend invite
> 9) send push notification to account2
> 10) account2 sends its sip registration -> INVRESUME route is now called
> 11) Kamailio calls account1 instead of account2 -> this is my issue
>  
> On step 10: despite account2 is registered, I checked it using “kamctl
> ul show”, the second call is forwarded all'account1 and not to account2.
> I also checked the TSILO logs and everything seems ok. Here is the logs:
> First call:
>   suspended transaction [53945:1648394094] asterisk => account1
>   htable key value [53945:1648394094]
>   resuming trasaction [53945:1648394094] account1 53945:1648394094)
> second call:
>   suspended transaction [53945:1648394094] asterisk => account2
>   htable key value [53945:1648394094]
>   resuming trasaction [53945:1648394094] account2 53945:1648394094)
>  
> In order to find out the issue I put some xlogs, printing $ru value:
> what I see is the $ru value is set correctly on failure_route but as
> soon as the t_continue is called, the ru overwritten back to account1
>  
> Can anyone address me to find out the solution?
> Thanks in advance
>  
> T.
>  
>  
>
> *Tomas Zanet
> *Software Design Department
> tza...@came.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
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
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] UAC authentication

2017-01-20 Thread Daniel-Constantin Mierla
To understand properly -- you don't have access to the user profile at
all? The server where the registration is forwarded is not managed by you?

Cheers,
Daniel


On 20/01/2017 13:50, anfecora wrote:
> Thank you Daniel. It will work if i have username and password in db
> or something else.
>
> In this case i am getting the register from the sip client and i dont
> have the passwd but i need to forward it somehow via uac and on
> challenge pass it back to the sip client.
>
> I have done this with $du and works but when an invite comes from the
> b side(sbc) to the a side(thesip client) there is no aor or anything i
> can lookup to pass it along. Which is what i am trying to resolve.
>
> The sbc do not support path and ob header correctly. And cries when it
> gets any ipv6 address.
>
> On Jan 20, 2017 12:41 AM, "Daniel-Constantin Mierla"
> mailto:mico...@gmail.com>> wrote:
>
> Hello,
>
> you have to set authentication username and password inside the
> $uac_req(...) -- see the attributes for it at:
>
>   -
> https://www.kamailio.org/wiki/cookbooks/4.4.x/pseudovariables#uac_req_key
> 
> 
>
> Cheers,
> Daniel
>
>
> On 20/01/2017 07:26, anfecora wrote:
>> can someone please guide me where to find the usage of auc
>> module, thanks in advance.
>>
>> I am registering the uac in one end then i want to forward that
>> registration to an external registrar, if i use $du some domain,
>> some of the ipv6 info is going to be forwarded, i need to make it
>> look more like an a b2bua than a outbound proxy therefore i need
>> to use the auc module(also i need to cover all ipv6 info since i
>> am proxying from ipv4 to ipv6).
>>
>> i am able to register the client to kamailio, then kamailio send
>> the registration to the external registrar, but when the
>> registrar sends back the challenge uac does not reply, any ideas
>> how can achieve this.
>>
>> uac(linphone etc) --registration--->kamailio(registrar
>> module)--register(uac)--->SBC
>>
>> sbcinvite>kamailio(lookup)-invite>uac(linphone
>> etc)
>>
>> this is the code i am using.
>>
>>
>>
>> # Handle SIP registrations
>> route[REGISTRAR] {
>> xlog("REGISTERING ");
>> if (is_method("REGISTER"))
>> {
>> if(isflagset(FLT_NATS))
>> {
>> setbflag(FLB_NATB);
>> # uncomment next line to do SIP NAT pinging
>> ## setbflag(FLB_NATSIPPING);
>> }
>> if(af==INET6)
>> setbflag(FLB_IPV6);
>> xlog("IT IS  IPV6");
>> if (!save("location"))
>> sl_reply_error();
>> route(REGSBCFWD);
>> exit;
>> }
>> }
>>
>> route[REGSBCFWD]{
>> xlog("CREATING OTHER LEG TO THE SBC");
>> if(!is_method("REGISTER"))
>> {
>> return;
>> }
>> xlog("CREATING PACKAGE $si -- $fU-- $au--$du-- $tU --$ru");
>>
>> $var(rip) = "sip.somedomain.com ";
>> $uac_req(method)="REGISTER";
>> $uac_req(ruri)="sip:" + $var(rip) + ":" + "5060";
>> $uac_req(furi)="sip:" + $tU + "@" + $var(rip);
>> $uac_req(turi)="sip:" + $tU + "@" + $var(rip);
>> $uac_req(hdrs)="Contact: > + "10.0.0.222"
>> + ":" "5060" + ">\r\n";
>> if($sel(contact.expires) != $null)
>> $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
>> $sel(contact.expires) + "\r\n";
>> else
>> $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
>> $hdr(Expires) + "\r\n";
>> uac_req_send();
>>
>>
>>
>> }
>>
>>
>>
>>
>>
>> REGISTER sip:sip.somedomain.com:5060
>>  SIP/2.0.
>> Via: SIP/2.0/UDP
>> 10.0.0.222:5060;branch=z9hG4bK285f.13a7f0c0.0.
>> To: > >.
>> From: > 
>> >;tag=a82eaf71666096790d1397845fbd3254-ebaa.
>> CSeq: 10 REGISTER.
>> Call-ID: 357e21ae51d8416d-26605@10.0.0.222
>> .
>> Max-Forwards: 70.
>> Content-Length: 0.
>> User-Agent: kamailio (4.4.4 (x86_64/linux)).
>> Contact: > >.
>> Expires: 3600.
>> .
>>
>>
>>
>> SIP/2.0 401 Unauthorized.
>> Via: SIP/2.0/UDP
>> 10.0.0.222:5060;branch=z9hG4bK4b53.ad842757.0.
>> To: > >.
>> From: > 
>> 

[SR-Users] Siremis Multi domain

2017-01-20 Thread Annus Fictus

Hi,

I think Siremis not work correctly in a multi domain scenario if the 
extension number are the same for two domains.


I explain a little more. I have two extension:

1 2...@sip1.domain.org

2 2...@sip2.domain.org

On the Siremis I create the user 200 with the SIPuser role. When I login 
with this user, and go to subscriber data i can see bots extensions.


I think is relate to this select on kamailio database:

.SELECT T0.id, T0.username, T0.domain, T0.password, 
T0.email_address, T0.ha1, T0.ha1b, T0.rpid FROM  `subscriber` T0 WHERE 
T0.username='200'  LIMIT 10


Any hint?

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


Re: [SR-Users] Siremis Multi domain

2017-01-20 Thread Daniel-Constantin Mierla
Hello,

is this about public registration? Not the subscriber table management,
right?

Cheers,
Daniel


On 20/01/2017 16:38, Annus Fictus wrote:
> Hi,
>
> I think Siremis not work correctly in a multi domain scenario if the
> extension number are the same for two domains.
>
> I explain a little more. I have two extension:
>
> 1 2...@sip1.domain.org
>
> 2 2...@sip2.domain.org
>
> On the Siremis I create the user 200 with the SIPuser role. When I
> login with this user, and go to subscriber data i can see bots
> extensions.
>
> I think is relate to this select on kamailio database:
>
> .SELECT T0.id, T0.username, T0.domain, T0.password,
> T0.email_address, T0.ha1, T0.ha1b, T0.rpid FROM  `subscriber` T0 WHERE
> T0.username='200'  LIMIT 10
>
> Any hint?
>
> 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

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
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] Siremis Multi domain

2017-01-20 Thread Annus Fictus

Sorry but I don't understood your questions.

the two extension are in the subscriber table in a multi domain Kamailio 
scenario/configuration.


Regards

El 20/01/2017 a las 10:49, Daniel-Constantin Mierla escribió:

Hello,

is this about public registration? Not the subscriber table management,
right?

Cheers,
Daniel


On 20/01/2017 16:38, Annus Fictus wrote:

Hi,

I think Siremis not work correctly in a multi domain scenario if the
extension number are the same for two domains.

I explain a little more. I have two extension:

1 2...@sip1.domain.org

2 2...@sip2.domain.org

On the Siremis I create the user 200 with the SIPuser role. When I
login with this user, and go to subscriber data i can see bots
extensions.

I think is relate to this select on kamailio database:

.SELECT T0.id, T0.username, T0.domain, T0.password,
T0.email_address, T0.ha1, T0.ha1b, T0.rpid FROM  `subscriber` T0 WHERE
T0.username='200'  LIMIT 10

Any hint?

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



___
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] Siremis Multi domain

2017-01-20 Thread Daniel-Constantin Mierla
I was referring to the feature of allowing public registration:

  - http://kb.asipto.com/siremis:install40x:public-registration

Or you created the siremis user 200 via the admin user?

Cheers,
Daniel


On 20/01/2017 16:56, Annus Fictus wrote:
> Sorry but I don't understood your questions.
>
> the two extension are in the subscriber table in a multi domain
> Kamailio scenario/configuration.
>
> Regards
>
> El 20/01/2017 a las 10:49, Daniel-Constantin Mierla escribió:
>> Hello,
>>
>> is this about public registration? Not the subscriber table management,
>> right?
>>
>> Cheers,
>> Daniel
>>
>>
>> On 20/01/2017 16:38, Annus Fictus wrote:
>>> Hi,
>>>
>>> I think Siremis not work correctly in a multi domain scenario if the
>>> extension number are the same for two domains.
>>>
>>> I explain a little more. I have two extension:
>>>
>>> 1 2...@sip1.domain.org
>>>
>>> 2 2...@sip2.domain.org
>>>
>>> On the Siremis I create the user 200 with the SIPuser role. When I
>>> login with this user, and go to subscriber data i can see bots
>>> extensions.
>>>
>>> I think is relate to this select on kamailio database:
>>>
>>> .SELECT T0.id, T0.username, T0.domain, T0.password,
>>> T0.email_address, T0.ha1, T0.ha1b, T0.rpid FROM  `subscriber` T0 WHERE
>>> T0.username='200'  LIMIT 10
>>>
>>> Any hint?
>>>
>>> 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
>

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
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] Siremis Multi domain

2017-01-20 Thread Annus Fictus

Hi,

I created from admin user...

Regards.


El 20/01/2017 a las 11:00, Daniel-Constantin Mierla escribió:

I was referring to the feature of allowing public registration:

   - http://kb.asipto.com/siremis:install40x:public-registration

Or you created the siremis user 200 via the admin user?

Cheers,
Daniel


On 20/01/2017 16:56, Annus Fictus wrote:

Sorry but I don't understood your questions.

the two extension are in the subscriber table in a multi domain
Kamailio scenario/configuration.

Regards

El 20/01/2017 a las 10:49, Daniel-Constantin Mierla escribió:

Hello,

is this about public registration? Not the subscriber table management,
right?

Cheers,
Daniel


On 20/01/2017 16:38, Annus Fictus wrote:

Hi,

I think Siremis not work correctly in a multi domain scenario if the
extension number are the same for two domains.

I explain a little more. I have two extension:

1 2...@sip1.domain.org

2 2...@sip2.domain.org

On the Siremis I create the user 200 with the SIPuser role. When I
login with this user, and go to subscriber data i can see bots
extensions.

I think is relate to this select on kamailio database:

.SELECT T0.id, T0.username, T0.domain, T0.password,
T0.email_address, T0.ha1, T0.ha1b, T0.rpid FROM  `subscriber` T0 WHERE
T0.username='200'  LIMIT 10

Any hint?

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



___
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] Siremis Multi domain

2017-01-20 Thread Annus Fictus

I have found the explication:

"...Have in mind that Siremis itself at the current version is not fully 
multi-domain capable, the usernames have to be unique across all domains 
if you want to allow self-management via web"


Regards

El 20/01/2017 a las 11:00, Daniel-Constantin Mierla escribió:

I was referring to the feature of allowing public registration:

   - http://kb.asipto.com/siremis:install40x:public-registration

Or you created the siremis user 200 via the admin user?

Cheers,
Daniel


On 20/01/2017 16:56, Annus Fictus wrote:

Sorry but I don't understood your questions.

the two extension are in the subscriber table in a multi domain
Kamailio scenario/configuration.

Regards

El 20/01/2017 a las 10:49, Daniel-Constantin Mierla escribió:

Hello,

is this about public registration? Not the subscriber table management,
right?

Cheers,
Daniel


On 20/01/2017 16:38, Annus Fictus wrote:

Hi,

I think Siremis not work correctly in a multi domain scenario if the
extension number are the same for two domains.

I explain a little more. I have two extension:

1 2...@sip1.domain.org

2 2...@sip2.domain.org

On the Siremis I create the user 200 with the SIPuser role. When I
login with this user, and go to subscriber data i can see bots
extensions.

I think is relate to this select on kamailio database:

.SELECT T0.id, T0.username, T0.domain, T0.password,
T0.email_address, T0.ha1, T0.ha1b, T0.rpid FROM  `subscriber` T0 WHERE
T0.username='200'  LIMIT 10

Any hint?

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



___
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] Get ip from contact on redirect

2017-01-20 Thread Diego Nadares
Hi Guys,

Anybody knows how to get the ip of the new contact of the redirect? I need
it to update one xavp variable that contains the INVITE destination.

6 2017-01-20 12:44:55.138473 172.16.213.38 *172.16.208.121* SIP/SDP 85 Request:
INVITE sip:01152780776@172.16.208.121:5060 |
9 2017-01-20 12:44:55.142296 172.16.208.121 172.16.213.38 SIP 661 Status:
302 Moved temporarily |
10 2017-01-20 12:44:55.156268 172.16.213.38 172.16.208.121 SIP 423 Request:
ACK sip:01152780776@172.16.208.121:5060 |
16 2017-01-20 12:44:55.293349 172.16.213.38 *172.16.208.111* SIP/SDP
95 Request:
INVITE sip:1152780776@172.16.208.111:5060;user=phone |

My cfg:

# Manage failure routing cases
failure_route[MANAGE_FAILURE] {


if (t_check_status("302")) {
 xlog("Got a 302 - redirecting");
 get_redirects("*:1");
* $xavp(ip_b[$avp(current_route)]=>name) =
"172.16.208.111";#Hardcoded for testing*
 xlog("Got a 302 - redirecting $hdr(Contact)");
 route(RELAY);
 #t_relay();
 }

Thanks in advance.

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] Get ip from contact on redirect

2017-01-20 Thread Daniel Tryba
On Fri, Jan 20, 2017 at 01:04:00PM -0300, Diego Nadares wrote:
> Anybody knows how to get the ip of the new contact of the redirect? I need
> it to update one xavp variable that contains the INVITE destination.

Don't know about an IP, but you get the contact in the (failure)
response with: $T_rpl($ct)
The host part of this contact is: $(T_rpl($ct){nameaddr.uri});
You'd have to do some DNS lookups to get the IP.


___
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] Get ip from contact on redirect

2017-01-20 Thread Daniel Tryba
On Fri, Jan 20, 2017 at 05:11:32PM +0100, Daniel Tryba wrote:
> The host part of this contact is: $(T_rpl($ct){nameaddr.uri});

Which is not correct, {uri.host} should to the job (according to
https://www.kamailio.org/wiki/cookbooks/4.1.x/transformations#urihost
)

___
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] Siremis Multi domain

2017-01-20 Thread Daniel-Constantin Mierla
I remember that, there was no support for domains in siremis framework
itself -- no much interest in it so no further work on this direction.
But I wonder what happens if you try with usern...@domain.com?!? It may
require a small patch to split username and domain out of it.

Cheers,
Daniel

On 20/01/2017 17:04, Annus Fictus wrote:
> I have found the explication:
>
> "...Have in mind that Siremis itself at the current version is not
> fully multi-domain capable, the usernames have to be unique across all
> domains if you want to allow self-management via web"
>
> Regards
>
> El 20/01/2017 a las 11:00, Daniel-Constantin Mierla escribió:
>> I was referring to the feature of allowing public registration:
>>
>>- http://kb.asipto.com/siremis:install40x:public-registration
>>
>> Or you created the siremis user 200 via the admin user?
>>
>> Cheers,
>> Daniel
>>
>>
>> On 20/01/2017 16:56, Annus Fictus wrote:
>>> Sorry but I don't understood your questions.
>>>
>>> the two extension are in the subscriber table in a multi domain
>>> Kamailio scenario/configuration.
>>>
>>> Regards
>>>
>>> El 20/01/2017 a las 10:49, Daniel-Constantin Mierla escribió:
 Hello,

 is this about public registration? Not the subscriber table
 management,
 right?

 Cheers,
 Daniel


 On 20/01/2017 16:38, Annus Fictus wrote:
> Hi,
>
> I think Siremis not work correctly in a multi domain scenario if the
> extension number are the same for two domains.
>
> I explain a little more. I have two extension:
>
> 1 2...@sip1.domain.org
>
> 2 2...@sip2.domain.org
>
> On the Siremis I create the user 200 with the SIPuser role. When I
> login with this user, and go to subscriber data i can see bots
> extensions.
>
> I think is relate to this select on kamailio database:
>
> .SELECT T0.id, T0.username, T0.domain, T0.password,
> T0.email_address, T0.ha1, T0.ha1b, T0.rpid FROM  `subscriber` T0
> WHERE
> T0.username='200'  LIMIT 10
>
> Any hint?
>
> 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
>

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - 
www.asipto.com
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] Siremis Multi domain

2017-01-20 Thread Annus Fictus
Maybe the select would be based on the e-mail of user so If I put a 
e-mail on the subscriber table and this e-mail have 1 or 100 associated 
extension, on the Siremis for the user with the same email registration 
I can see all extension.


When i create a SIP user on the Siremis, I have to deny duplicate e-mail.

SELECT T0.id, T0.username, T0.domain, T0.password,
T0.email_address, T0.ha1, T0.ha1b, T0.rpid FROM  `subscriber` T0
WHERE
T0.email_address='jhon...@dominio.org'  LIMIT 10

Regards.


El 20/01/2017 a las 11:21, Daniel-Constantin Mierla escribió:

I remember that, there was no support for domains in siremis framework
itself -- no much interest in it so no further work on this direction.
But I wonder what happens if you try with usern...@domain.com?!? It may
require a small patch to split username and domain out of it.

Cheers,
Daniel

On 20/01/2017 17:04, Annus Fictus wrote:

I have found the explication:

"...Have in mind that Siremis itself at the current version is not
fully multi-domain capable, the usernames have to be unique across all
domains if you want to allow self-management via web"

Regards

El 20/01/2017 a las 11:00, Daniel-Constantin Mierla escribió:

I was referring to the feature of allowing public registration:

- http://kb.asipto.com/siremis:install40x:public-registration

Or you created the siremis user 200 via the admin user?

Cheers,
Daniel


On 20/01/2017 16:56, Annus Fictus wrote:

Sorry but I don't understood your questions.

the two extension are in the subscriber table in a multi domain
Kamailio scenario/configuration.

Regards

El 20/01/2017 a las 10:49, Daniel-Constantin Mierla escribió:

Hello,

is this about public registration? Not the subscriber table
management,
right?

Cheers,
Daniel


On 20/01/2017 16:38, Annus Fictus wrote:

Hi,

I think Siremis not work correctly in a multi domain scenario if the
extension number are the same for two domains.

I explain a little more. I have two extension:

1 2...@sip1.domain.org

2 2...@sip2.domain.org

On the Siremis I create the user 200 with the SIPuser role. When I
login with this user, and go to subscriber data i can see bots
extensions.

I think is relate to this select on kamailio database:

.SELECT T0.id, T0.username, T0.domain, T0.password,
T0.email_address, T0.ha1, T0.ha1b, T0.rpid FROM  `subscriber` T0
WHERE
T0.username='200'  LIMIT 10

Any hint?

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



___
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] NAPTR/SRV lookups fail when use_dns_failover is enabled.

2017-01-20 Thread Jeremy Gadd
Thanks for the response!

DNS lookups work in Kamailio as long as use_dns_failover is set to "off."
It's only when the failover is enabled that they break. I think this means
it's not a DNS issue, but something in Kamailio.

I should mention we're pointing to Verizon's services with many many
thousands of customers, so it's unlikely to be misconfigured DNS (unless
it's something local that only breaks when use_dns_failover is enabled?)

On Fri, Jan 20, 2017 at 12:37 AM, Carsten Bock  wrote:

> Hi,
>
> we have the following settings and those work fine for us (Kamailio 4
> and later):
>
> # Do SRV-Loadbalancing:
> dns_srv_lb=yes
> # Always prefer IPv6:
> dns_try_ipv6=yes
> # DNS-Based failover
> use_dns_failover=yes
> # Query NAPTR-Records as well (we use NAPTR, so the client can detect
> the outbound Proxy (P-CSCF), but internally we only use only
> SRV-records)
> dns_try_naptr=no
>
> Sounds to me, like a DNS problem, not a Kamailio problem.
>
> In our DNS Zone, we have the following, for example:
>
> wt  1D IN A 84.46.93.82
> wt  1D IN A 84.46.93.84
> wt-11D IN A 84.46.93.82
> wt-21D IN A 84.46.93.84
> wt  1D IN NAPTR 10 10 "s" "SIP+D2U" ""
> _sip._udp.wt
>
> _sip._udp.wt1D SRV 10 1 5060 wt-1
> _sip._udp.wt1D SRV 20 1 5060 wt-2
>
> On Debian/Ubuntu, you can verify this with Sofia-SIP (apt-get install
> sofia-sip-bin):
>
> carsten@carsten-HP-EliteBook-840-G3:~$ sip-dig wt.ng-voice.com
> 1 1.000 udp 5060 84.46.93.82
> 2 1.000 udp 5060 84.46.93.84
>
> Thanks,
> Carsten
>
>
> 2017-01-19 22:58 GMT+01:00 Jeremy Gadd :
> > Hello, everyone!
> >
> > I'm trying to enable dns_srv_lb but I'm stuck just before I can get
> there.
> > If I don't enable use_dns_failover, lookups work and calls route but
> always
> > to the first host. We need to load balance, so that doesn't work very
> well.
> >
> > If I enable use_dns_failover, the lookups stop working completely and we
> get
> > a dns lookup failure like so:
> >  ERROR: tm [ut.h:296]: uri2dst2(): ERROR: uri2dst: failed to resolve
> > "redacted.hostname.here.com" :unresolvable A or  request (-7)
> >
> > This works:
> > use_dns_cache=on
> > dns_use_search_list=no
> > dns_try_naptr=on
> > # use_dns_failover=on
> >
> > This breaks it:
> > use_dns_cache=on
> > dns_use_search_list=no
> > dns_try_naptr=on
> > use_dns_failover=on
> >
> > I have checked to see that use_dns_failover is compiled in:
> > version: kamailio 4.4.2 (x86_64/linux)
> > flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
> > DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
> > Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
> > FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
> > USE_DST_BLACKLIST, HAVE_RESOLV_RES
> > ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> > MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
> > poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> > id: unknown
> > compiled with gcc 4.9.2
> >
> > ___
> > 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
>
___
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] Get ip from contact on redirect

2017-01-20 Thread Diego Nadares
Thanks Daniel. It was very useful but I had to do the transformation in two
parts maybe because I'm very new with this.

Is correct like this?

if (t_check_status("302")) {
 #New contact is ;q=0.5,;q=0.25;
 $var(redirect_uri) = $(T_rpl($ct){nameaddr.uri});
 xlog("Got a 302 - redirecting to
$(var(redirect_uri){uri.host})" );
 get_redirects("*:1");
 $xavp(ip_b[$avp(current_route)]=>name)
=  $(var(redirect_uri){uri.host});
 xlog("Got a 302 - redirecting $hdr(Contact)");
 route(RELAY);
 #t_relay();
 }

 Is there a way to do it in one line?

Thanks again!

Diego

2017-01-20 13:16 GMT-03:00 Daniel Tryba :

> On Fri, Jan 20, 2017 at 05:11:32PM +0100, Daniel Tryba wrote:
> > The host part of this contact is: $(T_rpl($ct){nameaddr.uri});
>
> Which is not correct, {uri.host} should to the job (according to
> https://www.kamailio.org/wiki/cookbooks/4.1.x/transformations#urihost
> )
>
> ___
> 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] Ansible Kamailio role

2017-01-20 Thread Alberto Llamas
Hello Kamailians,

I just wanted to share an Ansible role for the installation and compilation
of a Kamailio server.

It may required improvements and I will be more than happy to heard them.



*https://galaxy.ansible.com/albertollamaso/Ansible-kamailio-role/
*


Cheers,

-- 
Alberto Llamas
Telecommunications Engineer
dCAA|dCAP|KPAC|SSCA
___
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] Best way to log incoming/outgoing sip messages?

2017-01-20 Thread Pranathi Venkatayogi
Hi,
  What is the best way to get a complete dump of incoming/outgoing SIP messages 
of Kamailio server?
  I encountered “SIPTrace” module, but it writes to database. Is there a way we 
can write to syslog instead?

Thanks
Pranathi

___
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] Best way to log incoming/outgoing sip messages?

2017-01-20 Thread Sergey Okhapkin
Use xlog function. See $mb core variable documentation.

On Friday, January 20, 2017 10:27:03 PM Pranathi Venkatayogi wrote:
> Hi,
>   What is the best way to get a complete dump of incoming/outgoing SIP
> messages of Kamailio server?
 I encountered “SIPTrace” module, but it
> writes to database. Is there a way we can write to syslog instead? 
> Thanks
> Pranathi
> 


___
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] Ansible Kamailio role

2017-01-20 Thread Gholamreza Sabery
There are already a role and a Github repository for Kamailio deployment.
The repository can deploy an Active-Passive Kamailio cluster with a cluster
of RTPProxy servers; for more info refer to:

http://github.com/ghrst

On Fri, Jan 20, 2017 at 10:06 PM, Alberto Llamas 
wrote:

> Hello Kamailians,
>
> I just wanted to share an Ansible role for the installation and
> compilation of a Kamailio server.
>
> It may required improvements and I will be more than happy to heard them.
>
>
>
> *https://galaxy.ansible.com/albertollamaso/Ansible-kamailio-role/
> *
>
>
> Cheers,
>
> --
> Alberto Llamas
> Telecommunications Engineer
> dCAA|dCAP|KPAC|SSCA
>
> ___
> 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