Re: [SR-Users] BYE dispatcher

2016-11-14 Thread Daniel-Constantin Mierla
Hello,

your are welcome! Glad to hear it was sorted out.

Cheers,
Daniel


On 13/11/16 06:50, Slava Bendersky wrote:
> Hello Daniel,
> I resolved all configuration issues and right now call goes both
> directions include rtp.
> Again huge thank you for help.
>
> Slava.
> 
> *From: *"Daniel-Constantin Mierla" 
> *To: *"volga629" 
> *Cc: *"sr-users" 
> *Sent: *Thursday, 10 November, 2016 12:24:57
> *Subject: *Re: [SR-Users] BYE dispatcher
>
> Hello,
>
> this logic is definitely wrong -- FreeSwitch can send also a request,
> it means that you send it back to it.
>
> Only the initial request of a dialog should be routed with rules like
> dispatcher/load balancer/least cost routing/... The requests within
> dialog should be routed based on loose routing.
>
> Of course, one can think of exceptions, but then you should be fully
> aware of what kind of routing you do.
>
> Cheers,
> Daniel
>
>
> On 10/11/16 16:25, Slava Bendersky wrote:
>
> Hello Daniel,
> My setup is proxy all requests to freeswitch via dispatcher.
>
> Slava.
>
> 
> *From: *"Daniel-Constantin Mierla" 
> *To: *"volga629" , "sr-users"
> 
> *Sent: *Thursday, 10 November, 2016 04:56:53
> *Subject: *Re: [SR-Users] BYE dispatcher
>
> Hello,
>
> as I said before, the registrations have little to do with calls
> in sip, unless there is gruu in use.
>
> Cheers,
> Daniel
>
>
> On 09/11/16 18:07, Slava Bendersky wrote:
>
> Hello Everyone,
> I cleared registrations and tried again and issue still present.
> Client reply with 481.
>
> IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto
> UDP (17), length 638)
> client_pub_ip.49383 > proxy_pub_ip.llrp: [udp sum ok] UDP,
> length 610
> E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction
> Does Not Exist
> Via:
> SIP/2.0/UDP 
> proxy_pub_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0
> Via: SIP/2.0/UDP
> 
> 10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp
> From: "Test Extension"
> ;tag=SXt3DQQ90a0Dj
> To: ;tag=719973534
> Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb
> CSeq: 99019404 BYE
> Supported: replaces, path, eventlist
> User-Agent: Grandstream Wave 1.2.2
> Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY,
> INFO, REFER, UPDATE, MESSAGE
> Content-Length: 0
>
> Slava.
>
>
> -- 
> Daniel-Constantin Mierla
> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
> Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
>

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.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] BYE dispatcher

2016-11-12 Thread Slava Bendersky
Hello Daniel, 
I resolved all configuration issues and right now call goes both directions 
include rtp. 
Again huge thank you for help. 

Slava. 

From: "Daniel-Constantin Mierla"  
To: "volga629"  
Cc: "sr-users"  
Sent: Thursday, 10 November, 2016 12:24:57 
Subject: Re: [SR-Users] BYE dispatcher 



Hello, 

this logic is definitely wrong -- FreeSwitch can send also a request, it means 
that you send it back to it. 

Only the initial request of a dialog should be routed with rules like 
dispatcher/load balancer/least cost routing/... The requests within dialog 
should be routed based on loose routing. 

Of course, one can think of exceptions, but then you should be fully aware of 
what kind of routing you do. 

Cheers, 
Daniel 

On 10/11/16 16:25, Slava Bendersky wrote: 



Hello Daniel, 
My setup is proxy all requests to freeswitch via dispatcher. 

Slava. 


From: "Daniel-Constantin Mierla"  
To: "volga629"  , "sr-users" 
 
Sent: Thursday, 10 November, 2016 04:56:53 
Subject: Re: [SR-Users] BYE dispatcher 



Hello, 

as I said before, the registrations have little to do with calls in sip, unless 
there is gruu in use. 

Cheers, 
Daniel 

On 09/11/16 18:07, Slava Bendersky wrote: 

BQ_BEGIN

Hello Everyone, 
I cleared registrations and tried again and issue still present. 
Client reply with 481. 

IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17), length 
638) 
client_pub_ip.49383 > proxy_pub_ip.llrp: [udp sum ok] UDP, length 610 
E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does Not Exist 
Via: SIP/2.0/UDP proxy_pub_ip 
:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0 
Via: SIP/2.0/UDP 
10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp 
From: "Test Extension"  ;tag=SXt3DQQ90a0Dj 
To: < sip:4300@ client_pub_ip :49383>;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
Supported: replaces, path, eventlist 
User-Agent: Grandstream Wave 1.2.2 
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE 
Content-Length: 0 

Slava. 




BQ_END

-- 
Daniel-Constantin Mierla http://twitter.com/#!/miconda - 
http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 
28-30, 2016 - http://www.asipto.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] BYE dispatcher

2016-11-11 Thread Daniel-Constantin Mierla
Hello,

the configuration file obviously is lacking proper routing of requests
within dialog. It is not an easy task to adjust it because you have
custom logic there that one doesn't know what is supposed to do.

Again, from my point of view, the easiest way is to go start from the
example config in dispatcher readme:

https://www.kamailio.org/docs/modules/stable/modules/dispatcher.html#dispatcher.ex.config

Don't change anything in request route before the line:

# account only INVITEs

and you have routing of requests within dialog done properly. Also, don
change the content of route[RELAY].

Cheers,
Daniel

On 11/11/16 06:24, Slava Bendersky wrote:
> Hello Daniel,
> I really ask for help,  here are configuration file
>
> https://paste.fedoraproject.org/477652/88413891/
>
> I spent quite a lot of time trying understand loose_route()
> /record_route() mix.
> I can get signalling working, call is not disconnects, but no RTP. Or
> I can get rtp and signalling BYE is not routed properly.
>
> My setup is just proxy all requests to freesiwtch boxes base on
> dispatcher selection where kamailio setup with 2 interfaces public and
> private.
> I really appreciate  on you time and help.
>  
> Slava.
>
>
>
> 
> *From: *"volga629" 
> *To: *"sr-users" 
> *Cc: *mico...@gmail.com
> *Sent: *Thursday, 10 November, 2016 23:54:40
> *Subject: *Re: [SR-Users] BYE dispatcher
>
> Hello Daniel,
> What 
>
> 
> *From: *"volga629" 
> *To: *mico...@gmail.com
> *Cc: *"sr-users" 
> *Sent: *Thursday, 10 November, 2016 11:25:19
> *Subject: *Re: [SR-Users] BYE dispatcher
>
> Hello Daniel,
> My setup is proxy all requests to freeswitch via dispatcher.
>
> Slava.
>
> ----------------
> *From: *"Daniel-Constantin Mierla" 
> *To: *"volga629" , "sr-users"
> 
> *Sent: *Thursday, 10 November, 2016 04:56:53
> *Subject: *Re: [SR-Users] BYE dispatcher
>
> Hello,
>
> as I said before, the registrations have little to do with calls in
> sip, unless there is gruu in use.
>
> Cheers,
> Daniel
>
>
> On 09/11/16 18:07, Slava Bendersky wrote:
>
> Hello Everyone,
> I cleared registrations and tried again and issue still present.
> Client reply with 481.
>
> IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP
> (17), length 638)
> client_pub_ip.49383 > proxy_pub_ip.llrp: [udp sum ok] UDP, length 610
> E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does
> Not Exist
> Via:
> SIP/2.0/UDP 
> proxy_pub_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0
> Via: SIP/2.0/UDP
> 
> 10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp
> From: "Test Extension" ;tag=SXt3DQQ90a0Dj
> To: ;tag=719973534
> Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb
> CSeq: 99019404 BYE
> Supported: replaces, path, eventlist
> User-Agent: Grandstream Wave 1.2.2
> Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO,
> REFER, UPDATE, MESSAGE
> Content-Length: 0
>
> Slava.
>
> 
> *From: *"volga629" 
> *To: *mico...@gmail.com, "sr-users" 
> *Sent: *Wednesday, 9 November, 2016 12:28:32
> *Subject: *Re: [SR-Users] BYE dispatcher
>
> Hello Everyone,
> I changed dispatcher algorithm  from 0 to 1 and start working as
> expected. Yes group 0 is accepted.
>
> route[DISPATCHER] {
> if(!ds_select_dst("0", "1")) {
> xlog("L_ERROR","ERROR: Proxy Mapping - Desitnation for $fd not
> found...request dropped \n");
> sl_send_reply("404","Desitination Not Found \n");
> drop();
> } else {
> $var(did) = 1;
> }
> if($var(did)) {
> if (!t_relay()) {
> sl_reply_error();
> }
> #forward();
> }
>
> t_on_failure("DISPATCHER_FAIL_ROUTE");
> exit;
> }
>
> Slava.
>
> 
> *From: *"Daniel-Constantin Mierla" 
> *To: *"sr-users" 
> *Sent: *Wednesday, 9 November, 2016 04:33:33
> *Subject: *Re: [SR-Users] BYE dispatcher
>
> Hello,
>
>
> On 08/11/16 20:42, Slava Bendersky wrote:
>
> Hello Everyone,
> 

Re: [SR-Users] BYE dispatcher

2016-11-10 Thread Slava Bendersky
Hello Daniel, 
I really ask for help, here are configuration file 

https://paste.fedoraproject.org/477652/88413891/ 

I spent quite a lot of time trying understand loose_route() /record_route() 
mix. 
I can get signalling working, call is not disconnects, but no RTP. Or I can get 
rtp and signalling BYE is not routed properly. 

My setup is just proxy all requests to freesiwtch boxes base on dispatcher 
selection where kamailio setup with 2 interfaces public and private. 
I really appreciate on you time and help. 
Slava. 




From: "volga629"  
To: "sr-users"  
Cc: mico...@gmail.com 
Sent: Thursday, 10 November, 2016 23:54:40 
Subject: Re: [SR-Users] BYE dispatcher 

Hello Daniel, 
What 


From: "volga629"  
To: mico...@gmail.com 
Cc: "sr-users"  
Sent: Thursday, 10 November, 2016 11:25:19 
Subject: Re: [SR-Users] BYE dispatcher 

Hello Daniel, 
My setup is proxy all requests to freeswitch via dispatcher. 

Slava. 


From: "Daniel-Constantin Mierla"  
To: "volga629" , "sr-users" 
 
Sent: Thursday, 10 November, 2016 04:56:53 
Subject: Re: [SR-Users] BYE dispatcher 



Hello, 

as I said before, the registrations have little to do with calls in sip, unless 
there is gruu in use. 

Cheers, 
Daniel 

On 09/11/16 18:07, Slava Bendersky wrote: 



Hello Everyone, 
I cleared registrations and tried again and issue still present. 
Client reply with 481. 

IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17), length 
638) 
client_pub_ip.49383 > proxy_pub_ip.llrp: [udp sum ok] UDP, length 610 
E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does Not Exist 
Via: SIP/2.0/UDP proxy_pub_ip 
:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0 
Via: SIP/2.0/UDP 
10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp 
From: "Test Extension"  ;tag=SXt3DQQ90a0Dj 
To: < sip:4300@ client_pub_ip :49383>;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
Supported: replaces, path, eventlist 
User-Agent: Grandstream Wave 1.2.2 
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE 
Content-Length: 0 

Slava. 


From: "volga629"  
To: mico...@gmail.com , "sr-users"  
Sent: Wednesday, 9 November, 2016 12:28:32 
Subject: Re: [SR-Users] BYE dispatcher 

Hello Everyone, 
I changed dispatcher algorithm from 0 to 1 and start working as expected. Yes 
group 0 is accepted. 

route[DISPATCHER] { 
if(!ds_select_dst("0", "1")) { 
xlog("L_ERROR","ERROR: Proxy Mapping - Desitnation for $fd not found...request 
dropped \n"); 
sl_send_reply("404","Desitination Not Found \n"); 
drop(); 
} else { 
$var(did) = 1; 
} 
if($var(did)) { 
if (!t_relay()) { 
sl_reply_error(); 
} 
#forward(); 
} 

t_on_failure("DISPATCHER_FAIL_ROUTE"); 
exit; 
} 

Slava. 


From: "Daniel-Constantin Mierla"  
To: "sr-users"  
Sent: Wednesday, 9 November, 2016 04:33:33 
Subject: Re: [SR-Users] BYE dispatcher 



Hello, 

On 08/11/16 20:42, Slava Bendersky wrote: 

BQ_BEGIN

Hello Everyone, 
My setup is kamailio as proxy with few boxes of freeswitch in the LAN. Having 
issue with BYE when extensions register on different freeswitch boxes. Here are 
some trace of the call. 
Not sure if this tag= miss match or routing. 

Dispatcher use group 0 with option 4 (round robin). 



is group value 0 accepted? I think this may create problems if a function 
returns the group in the config as return code -- iirc, this was changed maybe 
for lcr or permissions. 

On the other hand, the registrations are quite independent in SIP in relation 
with calls. The BYE should be routed based on record-routing to the freeswitch 
that was involved in routing initial INVITE, with no relation to new 
registrations from end devices. Is the BYE sent to the freeswitch that got the 
initial BYE. 

Cheers, 
Daniel 
-- 
Daniel-Constantin Mierla http://twitter.com/#!/miconda - 
http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 
28-30, 2016 - http://www.asipto.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 

BQ_END

-- 
Daniel-Constantin Mierla http://twitter.com/#!/miconda - 
http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 
28-30, 2016 - http://www.asipto.com 


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

Re: [SR-Users] BYE dispatcher

2016-11-10 Thread Daniel-Constantin Mierla
Hello,

this logic is definitely wrong -- FreeSwitch can send also a request, it
means that you send it back to it.

Only the initial request of a dialog should be routed with rules like
dispatcher/load balancer/least cost routing/... The requests within
dialog should be routed based on loose routing.

Of course, one can think of exceptions, but then you should be fully
aware of what kind of routing you do.

Cheers,
Daniel


On 10/11/16 16:25, Slava Bendersky wrote:
> Hello Daniel,
> My setup is proxy all requests to freeswitch via dispatcher.
>
> Slava.
>
> 
> *From: *"Daniel-Constantin Mierla" 
> *To: *"volga629" , "sr-users"
> 
> *Sent: *Thursday, 10 November, 2016 04:56:53
> *Subject: *Re: [SR-Users] BYE dispatcher
>
> Hello,
>
> as I said before, the registrations have little to do with calls in
> sip, unless there is gruu in use.
>
> Cheers,
> Daniel
>
>
> On 09/11/16 18:07, Slava Bendersky wrote:
>
> Hello Everyone,
> I cleared registrations and tried again and issue still present.
> Client reply with 481.
>
> IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP
> (17), length 638)
> client_pub_ip.49383 > proxy_pub_ip.llrp: [udp sum ok] UDP, length 610
> E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does
> Not Exist
> Via:
> SIP/2.0/UDP 
> proxy_pub_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0
> Via: SIP/2.0/UDP
> 
> 10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp
> From: "Test Extension" ;tag=SXt3DQQ90a0Dj
> To: ;tag=719973534
> Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb
> CSeq: 99019404 BYE
> Supported: replaces, path, eventlist
> User-Agent: Grandstream Wave 1.2.2
> Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO,
> REFER, UPDATE, MESSAGE
> Content-Length: 0
>
> Slava.
>

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.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] BYE dispatcher

2016-11-10 Thread Slava Bendersky
Hello Daniel, 
My setup is proxy all requests to freeswitch via dispatcher. 

Slava. 


From: "Daniel-Constantin Mierla"  
To: "volga629" , "sr-users" 
 
Sent: Thursday, 10 November, 2016 04:56:53 
Subject: Re: [SR-Users] BYE dispatcher 



Hello, 

as I said before, the registrations have little to do with calls in sip, unless 
there is gruu in use. 

Cheers, 
Daniel 

On 09/11/16 18:07, Slava Bendersky wrote: 



Hello Everyone, 
I cleared registrations and tried again and issue still present. 
Client reply with 481. 

IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17), length 
638) 
client_pub_ip.49383 > proxy_pub_ip.llrp: [udp sum ok] UDP, length 610 
E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does Not Exist 
Via: SIP/2.0/UDP proxy_pub_ip 
:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0 
Via: SIP/2.0/UDP 
10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp 
From: "Test Extension"  ;tag=SXt3DQQ90a0Dj 
To: < sip:4300@ client_pub_ip :49383>;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
Supported: replaces, path, eventlist 
User-Agent: Grandstream Wave 1.2.2 
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE 
Content-Length: 0 

Slava. 


From: "volga629"  
To: mico...@gmail.com , "sr-users"  
Sent: Wednesday, 9 November, 2016 12:28:32 
Subject: Re: [SR-Users] BYE dispatcher 

Hello Everyone, 
I changed dispatcher algorithm from 0 to 1 and start working as expected. Yes 
group 0 is accepted. 

route[DISPATCHER] { 
if(!ds_select_dst("0", "1")) { 
xlog("L_ERROR","ERROR: Proxy Mapping - Desitnation for $fd not found...request 
dropped \n"); 
sl_send_reply("404","Desitination Not Found \n"); 
drop(); 
} else { 
$var(did) = 1; 
} 
if($var(did)) { 
if (!t_relay()) { 
sl_reply_error(); 
} 
#forward(); 
} 

t_on_failure("DISPATCHER_FAIL_ROUTE"); 
exit; 
} 

Slava. 


From: "Daniel-Constantin Mierla"  
To: "sr-users"  
Sent: Wednesday, 9 November, 2016 04:33:33 
Subject: Re: [SR-Users] BYE dispatcher 



Hello, 

On 08/11/16 20:42, Slava Bendersky wrote: 

BQ_BEGIN

Hello Everyone, 
My setup is kamailio as proxy with few boxes of freeswitch in the LAN. Having 
issue with BYE when extensions register on different freeswitch boxes. Here are 
some trace of the call. 
Not sure if this tag= miss match or routing. 

Dispatcher use group 0 with option 4 (round robin). 



is group value 0 accepted? I think this may create problems if a function 
returns the group in the config as return code -- iirc, this was changed maybe 
for lcr or permissions. 

On the other hand, the registrations are quite independent in SIP in relation 
with calls. The BYE should be routed based on record-routing to the freeswitch 
that was involved in routing initial INVITE, with no relation to new 
registrations from end devices. Is the BYE sent to the freeswitch that got the 
initial BYE. 

Cheers, 
Daniel 
-- 
Daniel-Constantin Mierla http://twitter.com/#!/miconda - 
http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 
28-30, 2016 - http://www.asipto.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 

BQ_END

-- 
Daniel-Constantin Mierla http://twitter.com/#!/miconda - 
http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 
28-30, 2016 - http://www.asipto.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] BYE dispatcher

2016-11-10 Thread Daniel-Constantin Mierla
According to the trace, you don't route the BYE based on loose routing
rules:

 1.
2016/11/09 16:55:00.788067 10.18.130.27:5060 -> 10.18.130.24:5160
 2.
BYE sip:mod_sofia@10.18.130.26:5160 SIP/2.0
 3.
Via: SIP/2.0/UDP
10.18.130.27;branch=z9hG4bKca09.3439664767a2d9212561e9758e87ea79.0
 4.
Via: SIP/2.0/UDP

client_public_ip:25573;received=client_public_ip;branch=z9hG4bK1793905301;rport=25573
 5.
Route: 
 6.
Route: 


The BYE is forwarded without handling (and removing) the Route headers
of the server.

It is due to wrong processing of the bye in kamailio.cfg -- again, look
at the example config in dispatcher docs for something that you can
compare with.

Cheers,
Daniel

On 10/11/16 00:11, Slava Bendersky wrote:
> Hello Everyone,
> Here are full  trace call.
>
> https://paste.fedoraproject.org/476607/14787290/
>
>
> Slava.
>
> 
> *From: *"volga629" 
> *To: *"sr-users" 
> *Sent: *Wednesday, 9 November, 2016 13:17:34
> *Subject: *Re: [SR-Users] BYE dispatcher
>
> Based on this out put Freeswitch send BYE to kamailio and  Route
> present then kamailio forward BYE to client and no routes. Then client
> reply 481.  Do I need add it ?  Is this tag= problem ?
>
> 24 is freeswtich and 27 kamailio.
>
> IP (tos 0x0, ttl 64, id 56723, offset 0, flags [none], proto UDP (17),
> length 704)
> 10.18.130.24.5160 > 10.18.130.27.sip: [udp sum ok] UDP, length 676
> E...@..B
> ...
> (8.BYE sip:4300@client_public_ip:49383 SIP/2.0
> Via: SIP/2.0/UDP 10.18.130.24:5160;rport;branch=z9hG4bKm80c0USSKv5Bp
> Route: 
> Route: 
> Max-Forwards: 70
> From: "Test Extension" ;tag=SXt3DQQ90a0Dj
> To: ;tag=719973534
> Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb
> CSeq: 99019404 BYE
> User-Agent: FreeSWITCH
> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
> REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
> Supported: timer, path, replaces
> Reason: Q.850;cause=16;text="NORMAL_CLEARING"
> Content-Length: 0
>
>
> IP (tos 0x10, ttl 64, id 36705, offset 0, flags [none], proto UDP
> (17), length 700)
> proxy_public_ip.llrp > client_public_ip.49383: [bad udp cksum 0x4d15
> -> 0x34be!] UDP, length 672
> Ea..@..d.E.\c.M.BYE sip:4300@client_public_ip:49383 SIP/2.0
> Via: SIP/2.0/UDP
> proxy_public_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0
> Via: SIP/2.0/UDP
> 10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp
> Max-Forwards: 69
> From: "Test Extension" ;tag=SXt3DQQ90a0Dj
> To: ;tag=719973534
> Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb
> CSeq: 99019404 BYE
> User-Agent: FreeSWITCH
> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
> REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
> Supported: timer, path, replaces
> Reason: Q.850;cause=16;text="NORMAL_CLEARING"
> Content-Length: 0
>
>
> IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17),
> length 638)
> client_public_ip.49383 > proxy_public_ip.llrp: [udp sum ok] UDP,
> length 610
> E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does Not
> Exist
> Via: SIP/2.0/UDP
> proxy_public_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0
> Via: SIP/2.0/UDP
> 10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp
> From: "Test Extension" ;tag=SXt3DQQ90a0Dj
> To: ;tag=719973534
> Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb
> CSeq: 99019404 BYE
> Supported: replaces, path, eventlist
> User-Agent: Grandstream Wave 1.2.2
> Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO,
> REFER, UPDATE, MESSAGE
> Content-Length: 0
>
> Slava.
>
>
> 
> *From: *"volga629" 
> *To: *"sr-users" 
> *Sent: *Wednesday, 9 November, 2016 13:07:11
> *Subject: *Re: [SR-Users] BYE dispatcher
>
> Hello Everyone,
> I cleared registrations and tried again and issue still present.
> Client reply with 481.
>
> IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17),
> length 638)
> client_pub_ip.49383 > proxy_pub_ip.llrp: [udp sum ok] UDP, length 610
> E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does Not
> Exist
> Via:
> SIP/2.0/UDP 
> proxy_pub_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0
> Via: SIP/2.0/UDP
> 10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp
> From: "Test Extension" ;tag=SXt3DQQ90a0Dj
> To: ;tag=719973534
> Call-ID: 1abc150b-2141-1235-b5ad-5254003e3

Re: [SR-Users] BYE dispatcher

2016-11-10 Thread Daniel-Constantin Mierla
If it's the client that sends the 481, then routing went ok, but the
client didn't match the dialog. Can be because it already terminated it
or callid/from-tag/to-tag mismatch.

Cheers,
Daniel


On 09/11/16 18:17, Slava Bendersky wrote:
> Based on this out put Freeswitch send BYE to kamailio and  Route
> present then kamailio forward BYE to client and no routes. Then client
> reply 481.  Do I need add it ?  Is this tag= problem ?
>
> 24 is freeswtich and 27 kamailio.
>
> IP (tos 0x0, ttl 64, id 56723, offset 0, flags [none], proto UDP (17),
> length 704)
> 10.18.130.24.5160 > 10.18.130.27.sip: [udp sum ok] UDP, length 676
> E...@..B
> ...
> (8.BYE sip:4300@client_public_ip:49383 SIP/2.0
> Via: SIP/2.0/UDP 10.18.130.24:5160;rport;branch=z9hG4bKm80c0USSKv5Bp
> Route: 
> Route: 
> Max-Forwards: 70
> From: "Test Extension" ;tag=SXt3DQQ90a0Dj
> To: ;tag=719973534
> Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb
> CSeq: 99019404 BYE
> User-Agent: FreeSWITCH
> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
> REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
> Supported: timer, path, replaces
> Reason: Q.850;cause=16;text="NORMAL_CLEARING"
> Content-Length: 0
>
>
> IP (tos 0x10, ttl 64, id 36705, offset 0, flags [none], proto UDP
> (17), length 700)
> proxy_public_ip.llrp > client_public_ip.49383: [bad udp cksum 0x4d15
> -> 0x34be!] UDP, length 672
> Ea..@..d.E.\c.M.BYE sip:4300@client_public_ip:49383 SIP/2.0
> Via: SIP/2.0/UDP
> proxy_public_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0
> Via: SIP/2.0/UDP
> 10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp
> Max-Forwards: 69
> From: "Test Extension" ;tag=SXt3DQQ90a0Dj
> To: ;tag=719973534
> Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb
> CSeq: 99019404 BYE
> User-Agent: FreeSWITCH
> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
> REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
> Supported: timer, path, replaces
> Reason: Q.850;cause=16;text="NORMAL_CLEARING"
> Content-Length: 0
>
>
> IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17),
> length 638)
> client_public_ip.49383 > proxy_public_ip.llrp: [udp sum ok] UDP,
> length 610
> E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does Not
> Exist
> Via: SIP/2.0/UDP
> proxy_public_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0
> Via: SIP/2.0/UDP
> 10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp
> From: "Test Extension" ;tag=SXt3DQQ90a0Dj
> To: ;tag=719973534
> Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb
> CSeq: 99019404 BYE
> Supported: replaces, path, eventlist
> User-Agent: Grandstream Wave 1.2.2
> Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO,
> REFER, UPDATE, MESSAGE
> Content-Length: 0
>
> Slava.
>
>
> 
> *From: *"volga629" 
> *To: *"sr-users" 
> *Sent: *Wednesday, 9 November, 2016 13:07:11
> *Subject: *Re: [SR-Users] BYE dispatcher
>
> Hello Everyone,
> I cleared registrations and tried again and issue still present.
> Client reply with 481.
>
> IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17),
> length 638)
> client_pub_ip.49383 > proxy_pub_ip.llrp: [udp sum ok] UDP, length 610
> E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does Not
> Exist
> Via:
> SIP/2.0/UDP 
> proxy_pub_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0
> Via: SIP/2.0/UDP
> 10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp
> From: "Test Extension" ;tag=SXt3DQQ90a0Dj
> To: ;tag=719973534
> Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb
> CSeq: 99019404 BYE
> Supported: replaces, path, eventlist
> User-Agent: Grandstream Wave 1.2.2
> Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO,
> REFER, UPDATE, MESSAGE
> Content-Length: 0
>
> Slava.
>
> 
> *From: *"volga629" 
> *To: *mico...@gmail.com, "sr-users" 
> *Sent: *Wednesday, 9 November, 2016 12:28:32
> *Subject: *Re: [SR-Users] BYE dispatcher
>
> Hello Everyone,
> I changed dispatcher algorithm  from 0 to 1 and start working as
> expected. Yes group 0 is accepted.
>
> route[DISPATCHER] {
> if(!ds_select_dst("0", "1")) {
> xlog("L_ERROR","ERROR: Proxy Mapping - Desitnation for $fd not
> found...request dropped \n");
> sl_send_reply("404","De

Re: [SR-Users] BYE dispatcher

2016-11-10 Thread Daniel-Constantin Mierla
Hello,

as I said before, the registrations have little to do with calls in sip,
unless there is gruu in use.

Cheers,
Daniel


On 09/11/16 18:07, Slava Bendersky wrote:
> Hello Everyone,
> I cleared registrations and tried again and issue still present.
> Client reply with 481.
>
> IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17),
> length 638)
> client_pub_ip.49383 > proxy_pub_ip.llrp: [udp sum ok] UDP, length 610
> E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does Not
> Exist
> Via:
> SIP/2.0/UDP 
> proxy_pub_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0
> Via: SIP/2.0/UDP
> 10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp
> From: "Test Extension" ;tag=SXt3DQQ90a0Dj
> To: ;tag=719973534
> Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb
> CSeq: 99019404 BYE
> Supported: replaces, path, eventlist
> User-Agent: Grandstream Wave 1.2.2
> Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO,
> REFER, UPDATE, MESSAGE
> Content-Length: 0
>
> Slava.
>
> 
> *From: *"volga629" 
> *To: *mico...@gmail.com, "sr-users" 
> *Sent: *Wednesday, 9 November, 2016 12:28:32
> *Subject: *Re: [SR-Users] BYE dispatcher
>
> Hello Everyone,
> I changed dispatcher algorithm  from 0 to 1 and start working as
> expected. Yes group 0 is accepted.
>
> route[DISPATCHER] {
> if(!ds_select_dst("0", "1")) {
> xlog("L_ERROR","ERROR: Proxy Mapping - Desitnation for $fd not
> found...request dropped \n");
> sl_send_reply("404","Desitination Not Found \n");
> drop();
> } else {
> $var(did) = 1;
> }
> if($var(did)) {
> if (!t_relay()) {
> sl_reply_error();
> }
> #forward();
> }
>
> t_on_failure("DISPATCHER_FAIL_ROUTE");
> exit;
> }
>
> Slava.
>
> 
> *From: *"Daniel-Constantin Mierla" 
> *To: *"sr-users" 
> *Sent: *Wednesday, 9 November, 2016 04:33:33
> *Subject: *Re: [SR-Users] BYE dispatcher
>
> Hello,
>
>
> On 08/11/16 20:42, Slava Bendersky wrote:
>
> Hello Everyone,
> My setup is kamailio as proxy  with few boxes of freeswitch in the
> LAN. Having issue with BYE when extensions register on different
> freeswitch boxes. Here are some trace of the call.
> Not sure if this tag= miss match or routing.
>
> Dispatcher use group 0 with option 4 (round robin).
>
> is group value 0 accepted? I think this may create problems if a
> function returns the group in the config as return code -- iirc, this
> was changed maybe for lcr or permissions.
>
> On the other hand, the registrations are quite independent in SIP in
> relation with calls. The BYE should be routed based on record-routing
> to the freeswitch that was involved in routing initial INVITE, with no
> relation to new registrations from end devices. Is the BYE sent to the
> freeswitch that got the initial BYE.
>
> Cheers,
> Daniel
> -- 
> Daniel-Constantin Mierla
> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
> Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.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

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.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] BYE dispatcher

2016-11-10 Thread Daniel-Constantin Mierla
This is only the route block for dispatcher, but where is executed --
full content with routing blocks is more helpful.

I would suggest that you look also at the example from dispatcher docs:

  -
https://www.kamailio.org/docs/modules/stable/modules/dispatcher.html#dispatcher.ex.config

It offers a very good starting point config for using the module.

Cheers,
Daniel


On 09/11/16 17:28, Slava Bendersky wrote:
> Hello Everyone,
> I changed dispatcher algorithm  from 0 to 1 and start working as
> expected. Yes group 0 is accepted.
>
> route[DISPATCHER] {
> if(!ds_select_dst("0", "1")) {
> xlog("L_ERROR","ERROR: Proxy Mapping - Desitnation for $fd not
> found...request dropped \n");
> sl_send_reply("404","Desitination Not Found \n");
> drop();
> } else {
> $var(did) = 1;
> }
> if($var(did)) {
> if (!t_relay()) {
> sl_reply_error();
> }
> #forward();
> }
>
> t_on_failure("DISPATCHER_FAIL_ROUTE");
> exit;
> }
>
> Slava.
>
> ----------------
> *From: *"Daniel-Constantin Mierla" 
> *To: *"sr-users" 
> *Sent: *Wednesday, 9 November, 2016 04:33:33
> *Subject: *Re: [SR-Users] BYE dispatcher
>
> Hello,
>
>
> On 08/11/16 20:42, Slava Bendersky wrote:
>
> Hello Everyone,
> My setup is kamailio as proxy  with few boxes of freeswitch in the
> LAN. Having issue with BYE when extensions register on different
> freeswitch boxes. Here are some trace of the call.
> Not sure if this tag= miss match or routing.
>
> Dispatcher use group 0 with option 4 (round robin).
>
> is group value 0 accepted? I think this may create problems if a
> function returns the group in the config as return code -- iirc, this
> was changed maybe for lcr or permissions.
>
> On the other hand, the registrations are quite independent in SIP in
> relation with calls. The BYE should be routed based on record-routing
> to the freeswitch that was involved in routing initial INVITE, with no
> relation to new registrations from end devices. Is the BYE sent to the
> freeswitch that got the initial BYE.
>
> Cheers,
> Daniel
> -- 
> Daniel-Constantin Mierla
> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
> Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.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://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.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] BYE dispatcher

2016-11-09 Thread Slava Bendersky
Hello Daniel, 
Here more clear trace 
https://www.dropbox.com/s/2z6ck71ulidqelh/kamailio-BYE-flow.png?dl=0 
BYE send by kamailio to wrong freeswitch box. 

Slava 



From: "volga629"  
To: "sr-users"  
Sent: Wednesday, 9 November, 2016 20:09:53 
Subject: Re: [SR-Users] BYE dispatcher 

Hello Daniel, 
Please check this sip call flow picture 
https://www.dropbox.com/s/itdewdg3ph7xcyx/kamailio-fs-BYE-flow.gif?dl=0 
Kamilio send BYE to incorrect freeswitch which already responded to BYE from 
leg one. 


Slava. 


From: "volga629"  
To: "sr-users"  
Sent: Wednesday, 9 November, 2016 19:11:56 
Subject: Re: [SR-Users] BYE dispatcher 

Hello Everyone, 
Here are full trace call. 

https://paste.fedoraproject.org/476607/14787290/ 


Slava. 


From: "volga629"  
To: "sr-users"  
Sent: Wednesday, 9 November, 2016 13:17:34 
Subject: Re: [SR-Users] BYE dispatcher 

Based on this out put Freeswitch send BYE to kamailio and Route present then 
kamailio forward BYE to client and no routes. Then client reply 481. Do I need 
add it ? Is this tag= problem ? 

24 is freeswtich and 27 kamailio. 

IP (tos 0x0, ttl 64, id 56723, offset 0, flags [none], proto UDP (17), length 
704) 
10.18.130.24.5160 > 10.18.130.27.sip: [udp sum ok] UDP, length 676 
E...@..B 
... 
(8.BYE sip:4300@client_public_ip:49383 SIP/2.0 
Via: SIP/2.0/UDP 10.18.130.24:5160;rport;branch=z9hG4bKm80c0USSKv5Bp 
Route:  
Route:  
Max-Forwards: 70 
From: "Test Extension" ;tag=SXt3DQQ90a0Dj 
To: ;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
User-Agent: FreeSWITCH 
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, 
REFER, NOTIFY, PUBLISH, SUBSCRIBE 
Supported: timer, path, replaces 
Reason: Q.850;cause=16;text="NORMAL_CLEARING" 
Content-Length: 0 


IP (tos 0x10, ttl 64, id 36705, offset 0, flags [none], proto UDP (17), length 
700) 
proxy_public_ip.llrp > client_public_ip.49383: [bad udp cksum 0x4d15 -> 
0x34be!] UDP, length 672 
Ea..@..d.E.\c.M.BYE sip:4300@client_public_ip:49383 SIP/2.0 
Via: SIP/2.0/UDP 
proxy_public_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0 
Via: SIP/2.0/UDP 
10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp 
Max-Forwards: 69 
From: "Test Extension" ;tag=SXt3DQQ90a0Dj 
To: ;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
User-Agent: FreeSWITCH 
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, 
REFER, NOTIFY, PUBLISH, SUBSCRIBE 
Supported: timer, path, replaces 
Reason: Q.850;cause=16;text="NORMAL_CLEARING" 
Content-Length: 0 


IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17), length 
638) 
client_public_ip.49383 > proxy_public_ip.llrp: [udp sum ok] UDP, length 610 
E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does Not Exist 
Via: SIP/2.0/UDP 
proxy_public_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0 
Via: SIP/2.0/UDP 
10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp 
From: "Test Extension" ;tag=SXt3DQQ90a0Dj 
To: ;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
Supported: replaces, path, eventlist 
User-Agent: Grandstream Wave 1.2.2 
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE 
Content-Length: 0 

Slava. 



From: "volga629"  
To: "sr-users"  
Sent: Wednesday, 9 November, 2016 13:07:11 
Subject: Re: [SR-Users] BYE dispatcher 

Hello Everyone, 
I cleared registrations and tried again and issue still present. 
Client reply with 481. 

IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17), length 
638) 
client_pub_ip.49383 > proxy_pub_ip.llrp: [udp sum ok] UDP, length 610 
E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does Not Exist 
Via: SIP/2.0/UDP proxy_pub_ip 
:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0 
Via: SIP/2.0/UDP 
10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp 
From: "Test Extension" ;tag=SXt3DQQ90a0Dj 
To: ;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
Supported: replaces, path, eventlist 
User-Agent: Grandstream Wave 1.2.2 
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE 
Content-Length: 0 

Slava. 


From: "volga629"  
To: mico...@gmail.com, "sr-users"  
Sent: Wednesday, 9 November, 2016 12:28:32 
Subject: Re: [SR-Users] BYE dispatcher 

Hello Everyone, 
I changed dispatcher algorithm from 0 to 1 and start working as expected. Yes 
group 0 is accepted. 

route[DISPATCHER] { 
if(!ds_select_dst("0", "1")) { 
xlog("L_ERROR","ERROR: Proxy Mapping - Desitnation for $fd not found...request 
dropped \n"); 
sl_se

Re: [SR-Users] BYE dispatcher

2016-11-09 Thread Slava Bendersky
Hello Daniel, 
Please check this sip call flow picture 
https://www.dropbox.com/s/itdewdg3ph7xcyx/kamailio-fs-BYE-flow.gif?dl=0 
Kamilio send BYE to incorrect freeswitch which already responded to BYE from 
leg one. 


Slava. 


From: "volga629"  
To: "sr-users"  
Sent: Wednesday, 9 November, 2016 19:11:56 
Subject: Re: [SR-Users] BYE dispatcher 

Hello Everyone, 
Here are full trace call. 

https://paste.fedoraproject.org/476607/14787290/ 


Slava. 


From: "volga629"  
To: "sr-users"  
Sent: Wednesday, 9 November, 2016 13:17:34 
Subject: Re: [SR-Users] BYE dispatcher 

Based on this out put Freeswitch send BYE to kamailio and Route present then 
kamailio forward BYE to client and no routes. Then client reply 481. Do I need 
add it ? Is this tag= problem ? 

24 is freeswtich and 27 kamailio. 

IP (tos 0x0, ttl 64, id 56723, offset 0, flags [none], proto UDP (17), length 
704) 
10.18.130.24.5160 > 10.18.130.27.sip: [udp sum ok] UDP, length 676 
E...@..B 
... 
(8.BYE sip:4300@client_public_ip:49383 SIP/2.0 
Via: SIP/2.0/UDP 10.18.130.24:5160;rport;branch=z9hG4bKm80c0USSKv5Bp 
Route:  
Route:  
Max-Forwards: 70 
From: "Test Extension" ;tag=SXt3DQQ90a0Dj 
To: ;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
User-Agent: FreeSWITCH 
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, 
REFER, NOTIFY, PUBLISH, SUBSCRIBE 
Supported: timer, path, replaces 
Reason: Q.850;cause=16;text="NORMAL_CLEARING" 
Content-Length: 0 


IP (tos 0x10, ttl 64, id 36705, offset 0, flags [none], proto UDP (17), length 
700) 
proxy_public_ip.llrp > client_public_ip.49383: [bad udp cksum 0x4d15 -> 
0x34be!] UDP, length 672 
Ea..@..d.E.\c.M.BYE sip:4300@client_public_ip:49383 SIP/2.0 
Via: SIP/2.0/UDP 
proxy_public_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0 
Via: SIP/2.0/UDP 
10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp 
Max-Forwards: 69 
From: "Test Extension" ;tag=SXt3DQQ90a0Dj 
To: ;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
User-Agent: FreeSWITCH 
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, 
REFER, NOTIFY, PUBLISH, SUBSCRIBE 
Supported: timer, path, replaces 
Reason: Q.850;cause=16;text="NORMAL_CLEARING" 
Content-Length: 0 


IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17), length 
638) 
client_public_ip.49383 > proxy_public_ip.llrp: [udp sum ok] UDP, length 610 
E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does Not Exist 
Via: SIP/2.0/UDP 
proxy_public_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0 
Via: SIP/2.0/UDP 
10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp 
From: "Test Extension" ;tag=SXt3DQQ90a0Dj 
To: ;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
Supported: replaces, path, eventlist 
User-Agent: Grandstream Wave 1.2.2 
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE 
Content-Length: 0 

Slava. 



From: "volga629"  
To: "sr-users"  
Sent: Wednesday, 9 November, 2016 13:07:11 
Subject: Re: [SR-Users] BYE dispatcher 

Hello Everyone, 
I cleared registrations and tried again and issue still present. 
Client reply with 481. 

IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17), length 
638) 
client_pub_ip.49383 > proxy_pub_ip.llrp: [udp sum ok] UDP, length 610 
E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does Not Exist 
Via: SIP/2.0/UDP proxy_pub_ip 
:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0 
Via: SIP/2.0/UDP 
10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp 
From: "Test Extension" ;tag=SXt3DQQ90a0Dj 
To: ;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
Supported: replaces, path, eventlist 
User-Agent: Grandstream Wave 1.2.2 
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE 
Content-Length: 0 

Slava. 


From: "volga629"  
To: mico...@gmail.com, "sr-users"  
Sent: Wednesday, 9 November, 2016 12:28:32 
Subject: Re: [SR-Users] BYE dispatcher 

Hello Everyone, 
I changed dispatcher algorithm from 0 to 1 and start working as expected. Yes 
group 0 is accepted. 

route[DISPATCHER] { 
if(!ds_select_dst("0", "1")) { 
xlog("L_ERROR","ERROR: Proxy Mapping - Desitnation for $fd not found...request 
dropped \n"); 
sl_send_reply("404","Desitination Not Found \n"); 
drop(); 
} else { 
$var(did) = 1; 
} 
if($var(did)) { 
if (!t_relay()) { 
sl_reply_error(); 
} 
#forward(); 
} 

t_on_failure("DISPATCHER_FAIL_ROUTE"); 
exit; 
} 

Slava. 


From: "Daniel-Constantin Mierla"  
To: "sr-users

Re: [SR-Users] BYE dispatcher

2016-11-09 Thread Slava Bendersky
Hello Everyone, 
Here are full trace call. 

https://paste.fedoraproject.org/476607/14787290/ 


Slava. 


From: "volga629"  
To: "sr-users"  
Sent: Wednesday, 9 November, 2016 13:17:34 
Subject: Re: [SR-Users] BYE dispatcher 

Based on this out put Freeswitch send BYE to kamailio and Route present then 
kamailio forward BYE to client and no routes. Then client reply 481. Do I need 
add it ? Is this tag= problem ? 

24 is freeswtich and 27 kamailio. 

IP (tos 0x0, ttl 64, id 56723, offset 0, flags [none], proto UDP (17), length 
704) 
10.18.130.24.5160 > 10.18.130.27.sip: [udp sum ok] UDP, length 676 
E...@..B 
... 
(8.BYE sip:4300@client_public_ip:49383 SIP/2.0 
Via: SIP/2.0/UDP 10.18.130.24:5160;rport;branch=z9hG4bKm80c0USSKv5Bp 
Route:  
Route:  
Max-Forwards: 70 
From: "Test Extension" ;tag=SXt3DQQ90a0Dj 
To: ;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
User-Agent: FreeSWITCH 
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, 
REFER, NOTIFY, PUBLISH, SUBSCRIBE 
Supported: timer, path, replaces 
Reason: Q.850;cause=16;text="NORMAL_CLEARING" 
Content-Length: 0 


IP (tos 0x10, ttl 64, id 36705, offset 0, flags [none], proto UDP (17), length 
700) 
proxy_public_ip.llrp > client_public_ip.49383: [bad udp cksum 0x4d15 -> 
0x34be!] UDP, length 672 
Ea..@..d.E.\c.M.BYE sip:4300@client_public_ip:49383 SIP/2.0 
Via: SIP/2.0/UDP 
proxy_public_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0 
Via: SIP/2.0/UDP 
10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp 
Max-Forwards: 69 
From: "Test Extension" ;tag=SXt3DQQ90a0Dj 
To: ;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
User-Agent: FreeSWITCH 
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, 
REFER, NOTIFY, PUBLISH, SUBSCRIBE 
Supported: timer, path, replaces 
Reason: Q.850;cause=16;text="NORMAL_CLEARING" 
Content-Length: 0 


IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17), length 
638) 
client_public_ip.49383 > proxy_public_ip.llrp: [udp sum ok] UDP, length 610 
E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does Not Exist 
Via: SIP/2.0/UDP 
proxy_public_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0 
Via: SIP/2.0/UDP 
10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp 
From: "Test Extension" ;tag=SXt3DQQ90a0Dj 
To: ;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
Supported: replaces, path, eventlist 
User-Agent: Grandstream Wave 1.2.2 
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE 
Content-Length: 0 

Slava. 



From: "volga629"  
To: "sr-users"  
Sent: Wednesday, 9 November, 2016 13:07:11 
Subject: Re: [SR-Users] BYE dispatcher 

Hello Everyone, 
I cleared registrations and tried again and issue still present. 
Client reply with 481. 

IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17), length 
638) 
client_pub_ip.49383 > proxy_pub_ip.llrp: [udp sum ok] UDP, length 610 
E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does Not Exist 
Via: SIP/2.0/UDP proxy_pub_ip 
:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0 
Via: SIP/2.0/UDP 
10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp 
From: "Test Extension" ;tag=SXt3DQQ90a0Dj 
To: ;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
Supported: replaces, path, eventlist 
User-Agent: Grandstream Wave 1.2.2 
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE 
Content-Length: 0 

Slava. 


From: "volga629"  
To: mico...@gmail.com, "sr-users"  
Sent: Wednesday, 9 November, 2016 12:28:32 
Subject: Re: [SR-Users] BYE dispatcher 

Hello Everyone, 
I changed dispatcher algorithm from 0 to 1 and start working as expected. Yes 
group 0 is accepted. 

route[DISPATCHER] { 
if(!ds_select_dst("0", "1")) { 
xlog("L_ERROR","ERROR: Proxy Mapping - Desitnation for $fd not found...request 
dropped \n"); 
sl_send_reply("404","Desitination Not Found \n"); 
drop(); 
} else { 
$var(did) = 1; 
} 
if($var(did)) { 
if (!t_relay()) { 
sl_reply_error(); 
} 
#forward(); 
} 

t_on_failure("DISPATCHER_FAIL_ROUTE"); 
exit; 
} 

Slava. 


From: "Daniel-Constantin Mierla"  
To: "sr-users"  
Sent: Wednesday, 9 November, 2016 04:33:33 
Subject: Re: [SR-Users] BYE dispatcher 



Hello, 

On 08/11/16 20:42, Slava Bendersky wrote: 



Hello Everyone, 
My setup is kamailio as proxy with few boxes of freeswitch in the LAN. Having 
issue with BYE when extensions register on different freeswitch boxes. Here are 
some trace of the call. 
Not sure if this 

Re: [SR-Users] BYE dispatcher

2016-11-09 Thread Slava Bendersky
Based on this out put Freeswitch send BYE to kamailio and Route present then 
kamailio forward BYE to client and no routes. Then client reply 481. Do I need 
add it ? Is this tag= problem ? 

24 is freeswtich and 27 kamailio. 

IP (tos 0x0, ttl 64, id 56723, offset 0, flags [none], proto UDP (17), length 
704) 
10.18.130.24.5160 > 10.18.130.27.sip: [udp sum ok] UDP, length 676 
E...@..B 
... 
(8.BYE sip:4300@client_public_ip:49383 SIP/2.0 
Via: SIP/2.0/UDP 10.18.130.24:5160;rport;branch=z9hG4bKm80c0USSKv5Bp 
Route:  
Route:  
Max-Forwards: 70 
From: "Test Extension" ;tag=SXt3DQQ90a0Dj 
To: ;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
User-Agent: FreeSWITCH 
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, 
REFER, NOTIFY, PUBLISH, SUBSCRIBE 
Supported: timer, path, replaces 
Reason: Q.850;cause=16;text="NORMAL_CLEARING" 
Content-Length: 0 


IP (tos 0x10, ttl 64, id 36705, offset 0, flags [none], proto UDP (17), length 
700) 
proxy_public_ip.llrp > client_public_ip.49383: [bad udp cksum 0x4d15 -> 
0x34be!] UDP, length 672 
Ea..@..d.E.\c.M.BYE sip:4300@client_public_ip:49383 SIP/2.0 
Via: SIP/2.0/UDP 
proxy_public_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0 
Via: SIP/2.0/UDP 
10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp 
Max-Forwards: 69 
From: "Test Extension" ;tag=SXt3DQQ90a0Dj 
To: ;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
User-Agent: FreeSWITCH 
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, 
REFER, NOTIFY, PUBLISH, SUBSCRIBE 
Supported: timer, path, replaces 
Reason: Q.850;cause=16;text="NORMAL_CLEARING" 
Content-Length: 0 


IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17), length 
638) 
client_public_ip.49383 > proxy_public_ip.llrp: [udp sum ok] UDP, length 610 
E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does Not Exist 
Via: SIP/2.0/UDP 
proxy_public_ip:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0 
Via: SIP/2.0/UDP 
10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp 
From: "Test Extension" ;tag=SXt3DQQ90a0Dj 
To: ;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
Supported: replaces, path, eventlist 
User-Agent: Grandstream Wave 1.2.2 
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE 
Content-Length: 0 

Slava. 



From: "volga629"  
To: "sr-users"  
Sent: Wednesday, 9 November, 2016 13:07:11 
Subject: Re: [SR-Users] BYE dispatcher 

Hello Everyone, 
I cleared registrations and tried again and issue still present. 
Client reply with 481. 

IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17), length 
638) 
client_pub_ip.49383 > proxy_pub_ip.llrp: [udp sum ok] UDP, length 610 
E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does Not Exist 
Via: SIP/2.0/UDP proxy_pub_ip 
:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0 
Via: SIP/2.0/UDP 
10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp 
From: "Test Extension" ;tag=SXt3DQQ90a0Dj 
To: ;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
Supported: replaces, path, eventlist 
User-Agent: Grandstream Wave 1.2.2 
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE 
Content-Length: 0 

Slava. 


From: "volga629"  
To: mico...@gmail.com, "sr-users"  
Sent: Wednesday, 9 November, 2016 12:28:32 
Subject: Re: [SR-Users] BYE dispatcher 

Hello Everyone, 
I changed dispatcher algorithm from 0 to 1 and start working as expected. Yes 
group 0 is accepted. 

route[DISPATCHER] { 
if(!ds_select_dst("0", "1")) { 
xlog("L_ERROR","ERROR: Proxy Mapping - Desitnation for $fd not found...request 
dropped \n"); 
sl_send_reply("404","Desitination Not Found \n"); 
drop(); 
} else { 
$var(did) = 1; 
} 
if($var(did)) { 
if (!t_relay()) { 
sl_reply_error(); 
} 
#forward(); 
} 

t_on_failure("DISPATCHER_FAIL_ROUTE"); 
exit; 
} 

Slava. 


From: "Daniel-Constantin Mierla"  
To: "sr-users"  
Sent: Wednesday, 9 November, 2016 04:33:33 
Subject: Re: [SR-Users] BYE dispatcher 



Hello, 

On 08/11/16 20:42, Slava Bendersky wrote: 



Hello Everyone, 
My setup is kamailio as proxy with few boxes of freeswitch in the LAN. Having 
issue with BYE when extensions register on different freeswitch boxes. Here are 
some trace of the call. 
Not sure if this tag= miss match or routing. 

Dispatcher use group 0 with option 4 (round robin). 



is group value 0 accepted? I think this may create problems if a function 
returns the group in the config as return code -- iirc, this was changed maybe 
for lcr 

Re: [SR-Users] BYE dispatcher

2016-11-09 Thread Slava Bendersky
Hello Everyone, 
I cleared registrations and tried again and issue still present. 
Client reply with 481. 

IP (tos 0x0, ttl 52, id 7731, offset 0, flags [none], proto UDP (17), length 
638) 
client_pub_ip.49383 > proxy_pub_ip.llrp: [udp sum ok] UDP, length 610 
E..~.3..4...cE.\.j..SIP/2.0 481 Call Leg/Transaction Does Not Exist 
Via: SIP/2.0/UDP proxy_pub_ip 
:5084;branch=z9hG4bK3ea6.0c594485bff5b216f30af0f6172cb2b9.0 
Via: SIP/2.0/UDP 
10.18.130.24:5160;received=10.18.130.24;rport=5160;branch=z9hG4bKm80c0USSKv5Bp 
From: "Test Extension" ;tag=SXt3DQQ90a0Dj 
To: ;tag=719973534 
Call-ID: 1abc150b-2141-1235-b5ad-5254003e39bb 
CSeq: 99019404 BYE 
Supported: replaces, path, eventlist 
User-Agent: Grandstream Wave 1.2.2 
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE 
Content-Length: 0 

Slava. 


From: "volga629"  
To: mico...@gmail.com, "sr-users"  
Sent: Wednesday, 9 November, 2016 12:28:32 
Subject: Re: [SR-Users] BYE dispatcher 

Hello Everyone, 
I changed dispatcher algorithm from 0 to 1 and start working as expected. Yes 
group 0 is accepted. 

route[DISPATCHER] { 
if(!ds_select_dst("0", "1")) { 
xlog("L_ERROR","ERROR: Proxy Mapping - Desitnation for $fd not found...request 
dropped \n"); 
sl_send_reply("404","Desitination Not Found \n"); 
drop(); 
} else { 
$var(did) = 1; 
} 
if($var(did)) { 
if (!t_relay()) { 
sl_reply_error(); 
} 
#forward(); 
} 

t_on_failure("DISPATCHER_FAIL_ROUTE"); 
exit; 
} 

Slava. 


From: "Daniel-Constantin Mierla"  
To: "sr-users"  
Sent: Wednesday, 9 November, 2016 04:33:33 
Subject: Re: [SR-Users] BYE dispatcher 



Hello, 

On 08/11/16 20:42, Slava Bendersky wrote: 



Hello Everyone, 
My setup is kamailio as proxy with few boxes of freeswitch in the LAN. Having 
issue with BYE when extensions register on different freeswitch boxes. Here are 
some trace of the call. 
Not sure if this tag= miss match or routing. 

Dispatcher use group 0 with option 4 (round robin). 



is group value 0 accepted? I think this may create problems if a function 
returns the group in the config as return code -- iirc, this was changed maybe 
for lcr or permissions. 

On the other hand, the registrations are quite independent in SIP in relation 
with calls. The BYE should be routed based on record-routing to the freeswitch 
that was involved in routing initial INVITE, with no relation to new 
registrations from end devices. Is the BYE sent to the freeswitch that got the 
initial BYE. 

Cheers, 
Daniel 
-- 
Daniel-Constantin Mierla http://twitter.com/#!/miconda - 
http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 
28-30, 2016 - http://www.asipto.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 
___
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] BYE dispatcher

2016-11-09 Thread Slava Bendersky
Hello Everyone, 
I changed dispatcher algorithm from 0 to 1 and start working as expected. Yes 
group 0 is accepted. 

route[DISPATCHER] { 
if(!ds_select_dst("0", "1")) { 
xlog("L_ERROR","ERROR: Proxy Mapping - Desitnation for $fd not found...request 
dropped \n"); 
sl_send_reply("404","Desitination Not Found \n"); 
drop(); 
} else { 
$var(did) = 1; 
} 
if($var(did)) { 
if (!t_relay()) { 
sl_reply_error(); 
} 
#forward(); 
} 

t_on_failure("DISPATCHER_FAIL_ROUTE"); 
exit; 
} 

Slava. 


From: "Daniel-Constantin Mierla"  
To: "sr-users"  
Sent: Wednesday, 9 November, 2016 04:33:33 
Subject: Re: [SR-Users] BYE dispatcher 



Hello, 

On 08/11/16 20:42, Slava Bendersky wrote: 



Hello Everyone, 
My setup is kamailio as proxy with few boxes of freeswitch in the LAN. Having 
issue with BYE when extensions register on different freeswitch boxes. Here are 
some trace of the call. 
Not sure if this tag= miss match or routing. 

Dispatcher use group 0 with option 4 (round robin). 



is group value 0 accepted? I think this may create problems if a function 
returns the group in the config as return code -- iirc, this was changed maybe 
for lcr or permissions. 

On the other hand, the registrations are quite independent in SIP in relation 
with calls. The BYE should be routed based on record-routing to the freeswitch 
that was involved in routing initial INVITE, with no relation to new 
registrations from end devices. Is the BYE sent to the freeswitch that got the 
initial BYE. 

Cheers, 
Daniel 
-- 
Daniel-Constantin Mierla http://twitter.com/#!/miconda - 
http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 
28-30, 2016 - http://www.asipto.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


Re: [SR-Users] BYE dispatcher

2016-11-09 Thread Daniel-Constantin Mierla
Hello,


On 08/11/16 20:42, Slava Bendersky wrote:
> Hello Everyone,
> My setup is kamailio as proxy  with few boxes of freeswitch in the
> LAN. Having issue with BYE when extensions register on different
> freeswitch boxes. Here are some trace of the call.
> Not sure if this tag= miss match or routing.
>
> Dispatcher use group 0 with option 4 (round robin).
>
is group value 0 accepted? I think this may create problems if a
function returns the group in the config as return code -- iirc, this
was changed maybe for lcr or permissions.

On the other hand, the registrations are quite independent in SIP in
relation with calls. The BYE should be routed based on record-routing to
the freeswitch that was involved in routing initial INVITE, with no
relation to new registrations from end devices. Is the BYE sent to the
freeswitch that got the initial BYE.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.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] BYE dispatcher

2016-11-08 Thread Slava Bendersky
Hello Everyone, 
My setup is kamailio as proxy with few boxes of freeswitch in the LAN. Having 
issue with BYE when extensions register on different freeswitch boxes. Here are 
some trace of the call. 
Not sure if this tag= miss match or routing. 

Dispatcher use group 0 with option 4 (round robin). 


client_public_ip.28972 > proxy_public_ip.llrp: [udp sum ok] UDP, length 660 
E2..5...cE.\q,.CBYE sip:mod_sofia@10.18.130.24:5160 SIP/2.0 
Via: SIP/2.0/UDP client_public_ip:28972;branch=z9hG4bK1248337638;rport 
Route:  
Route:  
From: ;tag=487304085 
To: ;tag=01K2Q1BFa9pKH 
Call-ID: 1443c4ad-2085-1235-b5ad-5254003e39bb 
CSeq: 98979026 BYE 
Contact:  
Max-Forwards: 70 
Supported: replaces, path, timer, eventlist 
User-Agent: Grandstream Wave 1.2.2 
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE 
Content-Length: 0 


IP (tos 0x10, ttl 64, id 10813, offset 0, flags [none], proto UDP (17), length 
930) 
10.18.130.27.sip > 10.18.130.24.5160: [bad udp cksum 0x1bf7 -> 0xd85c!] UDP, 
length 902 
E...*=..@.4. 
... 
..(BYE sip:mod_sofia@10.18.130.24:5160 SIP/2.0 
Record-Route:  
Record-Route:  
Via: SIP/2.0/UDP 
10.18.130.27;branch=z9hG4bKa61.22917bc5fdd65f16e39bf09dcbc7316b.0 
Via: SIP/2.0/UDP 
client_public_ip:28972;received=client_public_ip;branch=z9hG4bK1248337638;rport=28972
 
Route:  
Route:  
From: ;tag=487304085 
To: ;tag=01K2Q1BFa9pKH 
Call-ID: 1443c4ad-2085-1235-b5ad-5254003e39bb 
CSeq: 98979026 BYE 
Contact:  
Max-Forwards: 69 
Supported: replaces, path, timer, eventlist 
User-Agent: Grandstream Wave 1.2.2 
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE 
Content-Length: 0 


IP (tos 0x0, ttl 64, id 38202, offset 0, flags [none], proto UDP (17), length 
587) 
10.18.130.24.5160 > 10.18.130.27.sip: [udp sum ok] UDP, length 559 
E..K.:..@... 
... 
(...7i.SIP/2.0 200 OK 
Via: SIP/2.0/UDP 
10.18.130.27;branch=z9hG4bKa61.22917bc5fdd65f16e39bf09dcbc7316b.0 
Via: SIP/2.0/UDP 
client_public_ip:28972;received=client_public_ip;branch=z9hG4bK1248337638;rport=28972
 
From: ;tag=487304085 
To: ;tag=01K2Q1BFa9pKH 
Call-ID: 1443c4ad-2085-1235-b5ad-5254003e39bb 
CSeq: 98979026 BYE 
User-Agent: FreeSWITCH 
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, 
REFER, NOTIFY, PUBLISH, SUBSCRIBE 
Supported: timer, path, replaces 
Content-Length: 0 


IP (tos 0x10, ttl 64, id 782, offset 0, flags [none], proto UDP (17), length 
503) 
proxy_public_ip.llrp > client_public_ip.28972: [bad udp cksum 0x4c50 -> 
0xd018!] UDP, length 475 
E...@.+}.E.\c.q,..LPSIP/2.0 200 OK 
Via: SIP/2.0/UDP 
client_public_ip:28972;received=client_public_ip;branch=z9hG4bK1248337638;rport=28972
 
From: ;tag=487304085 
To: ;tag=01K2Q1BFa9pKH 
Call-ID: 1443c4ad-2085-1235-b5ad-5254003e39bb 
CSeq: 98979026 BYE 
User-Agent: FreeSWITCH 
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, 
REFER, NOTIFY, PUBLISH, SUBSCRIBE 
Supported: timer, path, replaces 
Content-Length: 0 


IP (tos 0x0, ttl 64, id 10584, offset 0, flags [none], proto UDP (17), length 
764) 
10.18.130.26.5160 > 10.18.130.27.sip: [udp sum ok] UDP, length 736 
E...)X..@.6@ 
... 
(Y^BYE 
sip:4200@client_public_ip:48147;rinstance=c4084e18f3f39974;alias=client_public_ip~48147~1
 SIP/2.0 
Via: SIP/2.0/UDP 10.18.130.26:5160;rport;branch=z9hG4bK33785247SrX3H 
Route:  
Route:  
Max-Forwards: 70 
From: ;tag=5K0FX0ryeBBeH 
To: "volga629" ;tag=d2e84f4a 
Call-ID: 137861_rel44MTA1ZGMwNzViODg5NDMwYzQ1NDQzYjlmMGExMzlmMmI 
CSeq: 98979038 BYE 
User-Agent: FreeSWITCH 
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, 
REFER, NOTIFY, PUBLISH, SUBSCRIBE 
Supported: timer, path, replaces 
Reason: Q.850;cause=16;text="NORMAL_CLEARING" 
Content-Length: 0 


IP (tos 0x10, ttl 64, id 802, offset 0, flags [none], proto UDP (17), length 
741) 
proxy_public_ip.llrp > client_public_ip.48147: [bad udp cksum 0x4d3e -> 
0x4f2d!] UDP, length 713 
E"..@.*{.E.\c.M>BYE 
sip:4200@client_public_ip:48147;rinstance=c4084e18f3f39974 SIP/2.0 
Via: SIP/2.0/UDP 
proxy_public_ip:5084;branch=z9hG4bK8395.d46858df1d9e02b910446fca09f1f864.0 
Via: SIP/2.0/UDP 
10.18.130.26:5160;received=10.18.130.26;rport=5160;branch=z9hG4bK33785247SrX3H 
Max-Forwards: 69 
From: ;tag=5K0FX0ryeBBeH 
To: "volga629" ;tag=d2e84f4a 
Call-ID: 137861_rel44MTA1ZGMwNzViODg5NDMwYzQ1NDQzYjlmMGExMzlmMmI 
CSeq: 98979038 BYE 
User-Agent: FreeSWITCH 
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, 
REFER, NOTIFY, PUBLISH, SUBSCRIBE 
Supported: timer, path, replaces 
Reason: Q.850;cause=16;text="NORMAL_CLEARING" 
Content-Length: 0 


IP (tos 0x0, ttl 52, id 810, offset 0, flags [DF], proto UDP (17), length 504) 
client_public_ip.48147 > proxy_public_ip.llrp: [udp sum ok] UDP, length 476 
E*@.4..ocE.\SIP/2.0 481 Call/Transaction Does Not Exist 
Via: SIP/2.0/UDP 
proxy_public_ip:5084;branch=z9hG4bK8395.d46858df1d9e02b910446fca09f1