Re: [SR-Users] Random number generation kamailio

2016-03-21 Thread Alex Balashov
Cibin,

Yes, that is what $RANDOM is for. It returns a 32-bit signed integer (‎range 0 
- 2^31), so you can divide it by the appropriate value to get something in the 
length range you're after.
‎
--
Alex Balashov | Principal | Evariste Systems LLC
1447 Peachtree Street NE, Suite 700
Atlanta, GA 30309
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

Sent from my BlackBerry.


___
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] Random number generation kamailio

2016-03-21 Thread Cibin Paul
Hi,

How can I generate a random number say of length 10-14 in Kamailio. Can I use 
cfgutils for this. Please advise

Regards
Cibin



___
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] Database engine not found

2016-03-21 Thread Shiv Patidar
when i run this  command
kamctl fifo debug 6
then i got
WARNING: database engine not found tried 'MYSQL'
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Kamailio 4.3.x kamailio-redis RPM

2016-03-21 Thread Jay Patel
Is there any trusted yum repo which builds redis module RPM for
EL6/CentOS?  Seems like default make file does not build redis and  it'snot
published on rpm.kamailio.org.

cnxcc will be added bonus.

Thanks in advance.

Regards,
Jay
___
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 5.0 - B2BUA

2016-03-21 Thread Alex Balashov

Daniel,

I'd be curious to know if you have any thoughts on this, although it is 
of course a very controversial idea.


My personal philosophical position is very much against it. It's just 
not what Kamailio is. However, I see demand for it _everywhere_.


--
Alex Balashov | Principal | Evariste Systems LLC
1447 Peachtree Street NE, Suite 700
Atlanta, GA 30309
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.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 5.0 - Better way of dealing with stateless CANCELs

2016-03-21 Thread Alex Balashov

On 03/15/2016 05:29 AM, Daniel-Constantin Mierla wrote:


Tracking only some routing info for invite to help with cancels can
eventually done easier as suggested previously, even now.


After considering what you have had to say on the complexities in TM, I 
agree. So, let's drop this item.


--
Alex Balashov | Principal | Evariste Systems LLC
1447 Peachtree Street NE, Suite 700
Atlanta, GA 30309
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.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] Missing pipelimit values in data returned by JSONRPC-S

2016-03-21 Thread Daniel-Constantin Mierla
OK -- so all works, I backported to 4.4, will consider it for 4.3 with
the next backports in that branch.

Cheers,
Daniel

On 21/03/16 16:42, Brooks Bridges wrote:
> Ergh... never mind, stupid typo on my part.  It appears to be working.
>
> [root@dev-server ~]# curl -s --header 'Content-Type: application/json' 
> --data-binary '{"jsonrpc": "2.0", "method": "pl.stats"}' 
> http://1.2.3.4:5060/jsonrpc
> {"jsonrpc":"2.0","result":["PIPE: id=user_1 load=0 counter=0","PIPE: 
> id=user_2 load=0 counter=0"]}
>
> Thanks!
>
> Brooks Bridges | Sr. Voice Services Engineer
> O1 Communications
> 5190 Golden Foothill Pkwy 
> El Dorado Hills, CA 95762
> office: 916.235.2097 | main: 888.444., Option 2
> email: bbrid...@o1.com | web: www.o1.com
>
>
> -Original Message-
> From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
> Brooks Bridges
> Sent: Monday, March 21, 2016 7:59 AM
> To: Kamailio (SER) - Users Mailing List
> Subject: Re: [SR-Users] Missing pipelimit values in data returned by JSONRPC-S
>
> Seems to have broken something.  The CLI is returning as expected, but 
> jsonrpc-s is throwing an error now.
>
> [root@dev-server pipelimit]# kamcmd pl.stats
> PIPE: id=user_1 load=0 counter=0
> PIPE: id=user_2 load=0 counter=0
>
> [root@dev-server pipelimit]# curl -s --header 'Content-Type: 
> application/json' --data-binary '{"jsonrpc": "2.0", "method": "pl.stats"}' 
> http://1.2.3.4:5060/jsonrpc 
> {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}}
>
>
> Brooks Bridges | Sr. Voice Services Engineer
> O1 Communications
> 5190 Golden Foothill Pkwy
> El Dorado Hills, CA 95762
> office: 916.235.2097 | main: 888.444., Option 2
> email: bbrid...@o1.com | web: www.o1.com
>
> -Original Message-
> From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
> Brooks Bridges
> Sent: Saturday, March 19, 2016 11:21 AM
> To: mico...@gmail.com; Kamailio (SER) - Users Mailing List
> Subject: Re: [SR-Users] Missing pipelimit values in data returned by JSONRPC-S
>
> Thanks Daniel, I'll give this patch a try as soon as I'm back in the office 
> Monday.  I suspect it will sort out the issue as expected.
>
> Brooks Bridges | Sr. Voice Services Engineer
> O1 Communications
> 5190 Golden Foothill Pkwy
> El Dorado Hills, CA 95762
> office: 916.235.2097 | main: 888.444., Option 2
> email: bbrid...@o1.com | web: www.o1.com
>
> 
> From: sr-users [sr-users-boun...@lists.sip-router.org] on behalf of 
> Daniel-Constantin Mierla [mico...@gmail.com]
> Sent: Thursday, March 17, 2016 2:49 PM
> To: Kamailio (SER) - Users Mailing List
> Subject: Re: [SR-Users] Missing pipelimit values in data returned by
> JSONRPC-S
>
> I pushed a patch in master branch for now -- commit id 
> 1c22f395df81dab09288ff945e97b0040894daaf
>
> Can anyone test and see if solves it? Then, if all ok, I will backport.
>
> Cheers,
> Daniel
>
> On 17/03/16 22:14, Alex Balashov wrote:
>> Indeed, I can confirm that this happens even with two entries, running
>> 4.3:9506574:
>>
>> [root@allegro-4 ~]# kamcmd -s /tmp/kamailio_ctl pl.stats
>> PIPE: id=bg350_ingress load=0 counter=0
>> PIPE: id=bg208_ingress load=0 counter=0
>>
>> [root@allegro-4 kamailio]# curl --digest --user:pass 
>> http://10.150.20.6:5060/csrp_rpc/ --data '{"jsonrpc": "2.0", 
>> "method":"pl.stats", "result": "0xd"}'; echo {
>> "jsonrpc":"2.0",
>> "result":"PIPE: id=bg208_ingress load=0 counter=0"
>> }
>>
>> -- Alex
>>
> --
> Daniel-Constantin Mierla
> http://www.asipto.com
> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
> Kamailio World Conference, Berlin, May 18-20, 2016 - 
> http://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-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

-- 
Daniel-Constantin Mierla
http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, Berlin, May 18-20, 2016 - 
http://www.kamailioworld.com


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

Re: [SR-Users] Kamailio 4.3.4: receive_msg(): no via found in reply

2016-03-21 Thread Daniel-Constantin Mierla
Hello,

the forward() doesn't take variables as parameter, you have to set $ru
or $du to the address where you want to send and then just use forward().

Also, rewrite*() functions do not work with variables.

In assignments, inside the strings of expressions, the vars are not
evaluated, you need to use concatenation (+):

$du = "sip:" + $var(cancel_dst) + ":5060;transport=udp";

Cheers,
Daniel

On 21/03/16 13:17, Grant Bagdasarian wrote:
>
> Hi Daniel,
>
>  
>
> I’ve tried with htable implementation, but I can’t seem to use a
> variable as the argument for the forward function.
>
> I’ve tried multiple possibilities:
>
>  
>
> forward($avp(s:cancel_dst));
>
> forward(“$avp(s:cancel_dst)”);
>
>  
>
> forward($var(cancel_dst));
>
> forward(“$var(cancel_dst)”);
>
>  
>
> forward($sht(cancel=>$ci));
>
> forward(“$sht(cancel=>$ci)”);
>
>  
>
> I keep getting the following error:
>
>  
>
> CRITICAL:  [proxy.c:265]: mk_proxy(): could not resolve
> hostname: "$avp(s:cancel_dst)"
>
> Or when I don’t enclose the variable in quotes an error about the
> parameter requiring a string.
>
>  
>
> I’ve also tried using the following steps, but rewritehost doesn’t
> allow variables too L
>
>  
>
> rewritehost(“$var(cancel_dst)”);
>
> $du = "sip:$var(cancel_dst):5060;transport=udp";
>
>  
>
> Any ideas?
>
>
> Regards,
>
>  
>
> Grant
>
>  
>
> *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
> Behalf Of *Grant Bagdasarian
> *Sent:* Monday, March 21, 2016 10:01 AM
> *To:* 'mico...@gmail.com' ; Kamailio (SER) - Users
> Mailing List 
> *Subject:* Re: [SR-Users] Kamailio 4.3.4: receive_msg(): no via found
> in reply
>
>  
>
> Hello Daniel,
>
>  
>
> Thank you for figuring this out and explaining it to me! This has
> helped me a lot!
>
>  
>
> Regards,
>
>  
>
> Grant
>
>  
>
> *From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
> *Sent:* Friday, March 18, 2016 4:33 PM
> *To:* Grant Bagdasarian mailto:g...@cm.nl>>; Kamailio (SER) -
> Users Mailing List  >
> *Subject:* Re: [SR-Users] Kamailio 4.3.4: receive_msg(): no via found
> in reply
>
>  
>
> Hello,
>
> the problem is that the device you interconnect with (Server: sbc_5)
> is not sending all the Via headers from INVITE in the 487 -- it is
> only one Via:
>
> # U 10.0.0.1:5060 -> 10.14.0.1:5060
>
> SIP/2.0 487 Request Cancelled.
> Via: SIP/2.0/UDP
> 10.14.0.1;branch=z9hG4bK3c3b.a6603e0f92db305f775f8bf1d95dc7d9.0.
> From: "+31612345678" 
> ;tag=1f15682a.
> To: 
> ;tag=sbcsipuas_1_C52464_20160314100333554_b12sb10.
> Call-ID: 78100ZGIyZGM2ZTY4ODM4YWZlZGFjNTBjMDZmYjQzMzBkOGI.
> Contact:  .
> CSeq: 2 INVITE.
> Server: sbc_5.
> Content-Length: 0.
>
> Notice the 100 trying Via stack:
>
> # U 10.0.0.1:5060 -> 10.14.0.1:5060
>
> SIP/2.0 100 Trying.
> Via: SIP/2.0/UDP
> 10.14.0.1;branch=z9hG4bK3c3b.a6603e0f92db305f775f8bf1d95dc7d9.0.
> Via: SIP/2.0/UDP
> 10.14.0.2;branch=z9hG4bK3c3b.6002c178e1a0751f80857e10c4caeb35.0.
> Via: SIP/2.0/UDP
> 10.14.0.3;branch=z9hG4bK3c3b.9cad3c629aa5c2985e543c285f2f6d1d.0.
> Via: SIP/2.0/UDP
> 10.14.0.3;branch=z9hG4bKsr-jNXap0IRuJngh6iFuS1xpYUspYiRWQikWSisuQfjcQKOM-8C8odTwzW4V-4LMU1N8O2fWSINuYFmpSUfpcKXuq8NW0is8YdObqasuQuP.
> From: "+31612345678" 
> ;tag=1f15682a.
> To:  .
> Call-ID: 78100ZGIyZGM2ZTY4ODM4YWZlZGFjNTBjMDZmYjQzMzBkOGI.
> Contact:  .
> CSeq: 2 INVITE.
> Server: sbc_5.
> Content-Length: 0.
>
>
> My guess that the sbc_5 is so poor implemented that it takes the Via
> from last request, which is CANCEL, but CANCEL is a hop-by-hop request
> in this case. If my guess is confirmed, the implementation of sbc_5 is
> really far away from RFC3261, something that I haven't probably seen
> since 2002/3.
>
> To test, you can try to use forward() for CANCEL instead of t_relay().
> But you need to know where to send it -- same address as for INVITE --
> you can hardcode some values in config for sake of simplicity to test.
> A proper workaround can be built using htable module to store where
> the invite was sent, using call-id as a key.
>
> Cheers,
> Daniel
>
> On 18/03/16 15:43, Grant Bagdasarian wrote:
>
> Hi Daniel,
>
>  
>
> No problem J
>
>  
>
> Our devices are kamailios. Our customers use different equipment
> for sending traffic and I’m not sure what kind of equipment our
> carriers are using. So, I can’t really tell what device they’re
> using. My test was done using Bria (X-Lite) acting as a “customer”.
>
>  
>
> Regards,
>
>  
>
> Grant
>
>  
>
> *From:*Daniel-Constantin Mierla [mailto:mico...@gmail.com]
> *Sent:* Friday, March 18, 2016 10:25 AM
> *To:* Grant Bagdasarian  ; Kamailio
> (SER) - Users Mailing List 
> 
> *Subject:* Re: [SR-Users] Kamailio 4.3.4: receive_msg(): no via
> found in reply
>
>  
>
> Hello,
>
> with CeBIT trip this week, I didn't get the change to look too
> much at it...
>
> What is the device sending the rep

Re: [SR-Users] Removing Via and Record-Route headers

2016-03-21 Thread Alex Balashov
I grant that the necessary statekeeping is technically possible with 
enough spiritual commitment, yes, but would repeat my entreatment to ask 
whether it should be done just because it can be done.


Nothing to do with "RFC purity", just a question of best-practical 
solution with fewest failure modes, given that the objectives are to 
solve well-known problems (topology hiding, UDP fragmentation) to which 
there exist well-known, time-tested and standards-compliant solutions.


--
Alex Balashov | Principal | Evariste Systems LLC
1447 Peachtree Street NE, Suite 700
Atlanta, GA 30309
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.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] Missing pipelimit values in data returned by JSONRPC-S

2016-03-21 Thread Brooks Bridges
Ergh... never mind, stupid typo on my part.  It appears to be working.

[root@dev-server ~]# curl -s --header 'Content-Type: application/json' 
--data-binary '{"jsonrpc": "2.0", "method": "pl.stats"}' 
http://1.2.3.4:5060/jsonrpc
{"jsonrpc":"2.0","result":["PIPE: id=user_1 load=0 counter=0","PIPE: id=user_2 
load=0 counter=0"]}

Thanks!

Brooks Bridges | Sr. Voice Services Engineer
O1 Communications
5190 Golden Foothill Pkwy 
El Dorado Hills, CA 95762
office: 916.235.2097 | main: 888.444., Option 2
email: bbrid...@o1.com | web: www.o1.com


-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Brooks Bridges
Sent: Monday, March 21, 2016 7:59 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Missing pipelimit values in data returned by JSONRPC-S

Seems to have broken something.  The CLI is returning as expected, but 
jsonrpc-s is throwing an error now.

[root@dev-server pipelimit]# kamcmd pl.stats
PIPE: id=user_1 load=0 counter=0
PIPE: id=user_2 load=0 counter=0

[root@dev-server pipelimit]# curl -s --header 'Content-Type: application/json' 
--data-binary '{"jsonrpc": "2.0", "method": "pl.stats"}' 
http://1.2.3.4:5060/jsonrpc 
{"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}}


Brooks Bridges | Sr. Voice Services Engineer
O1 Communications
5190 Golden Foothill Pkwy
El Dorado Hills, CA 95762
office: 916.235.2097 | main: 888.444., Option 2
email: bbrid...@o1.com | web: www.o1.com

-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Brooks Bridges
Sent: Saturday, March 19, 2016 11:21 AM
To: mico...@gmail.com; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Missing pipelimit values in data returned by JSONRPC-S

Thanks Daniel, I'll give this patch a try as soon as I'm back in the office 
Monday.  I suspect it will sort out the issue as expected.

Brooks Bridges | Sr. Voice Services Engineer
O1 Communications
5190 Golden Foothill Pkwy
El Dorado Hills, CA 95762
office: 916.235.2097 | main: 888.444., Option 2
email: bbrid...@o1.com | web: www.o1.com


From: sr-users [sr-users-boun...@lists.sip-router.org] on behalf of 
Daniel-Constantin Mierla [mico...@gmail.com]
Sent: Thursday, March 17, 2016 2:49 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Missing pipelimit values in data returned by
JSONRPC-S

I pushed a patch in master branch for now -- commit id 
1c22f395df81dab09288ff945e97b0040894daaf

Can anyone test and see if solves it? Then, if all ok, I will backport.

Cheers,
Daniel

On 17/03/16 22:14, Alex Balashov wrote:
> Indeed, I can confirm that this happens even with two entries, running
> 4.3:9506574:
>
> [root@allegro-4 ~]# kamcmd -s /tmp/kamailio_ctl pl.stats
> PIPE: id=bg350_ingress load=0 counter=0
> PIPE: id=bg208_ingress load=0 counter=0
>
> [root@allegro-4 kamailio]# curl --digest --user:pass 
> http://10.150.20.6:5060/csrp_rpc/ --data '{"jsonrpc": "2.0", 
> "method":"pl.stats", "result": "0xd"}'; echo {
> "jsonrpc":"2.0",
> "result":"PIPE: id=bg208_ingress load=0 counter=0"
> }
>
> -- Alex
>

--
Daniel-Constantin Mierla
http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, Berlin, May 18-20, 2016 - 
http://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-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] Missing pipelimit values in data returned by JSONRPC-S

2016-03-21 Thread Brooks Bridges
Seems to have broken something.  The CLI is returning as expected, but 
jsonrpc-s is throwing an error now.

[root@dev-server pipelimit]# kamcmd pl.stats
PIPE: id=user_1 load=0 counter=0
PIPE: id=user_2 load=0 counter=0

[root@dev-server pipelimit]# curl -s --header 'Content-Type: application/json' 
--data-binary '{"jsonrpc": "2.0", "method": "pl.stats"}' 
http://1.2.3.4:5060/jsonrpc
{"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}}


Brooks Bridges | Sr. Voice Services Engineer
O1 Communications
5190 Golden Foothill Pkwy 
El Dorado Hills, CA 95762
office: 916.235.2097 | main: 888.444., Option 2
email: bbrid...@o1.com | web: www.o1.com

-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Brooks Bridges
Sent: Saturday, March 19, 2016 11:21 AM
To: mico...@gmail.com; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Missing pipelimit values in data returned by JSONRPC-S

Thanks Daniel, I'll give this patch a try as soon as I'm back in the office 
Monday.  I suspect it will sort out the issue as expected.

Brooks Bridges | Sr. Voice Services Engineer
O1 Communications
5190 Golden Foothill Pkwy
El Dorado Hills, CA 95762
office: 916.235.2097 | main: 888.444., Option 2
email: bbrid...@o1.com | web: www.o1.com


From: sr-users [sr-users-boun...@lists.sip-router.org] on behalf of 
Daniel-Constantin Mierla [mico...@gmail.com]
Sent: Thursday, March 17, 2016 2:49 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Missing pipelimit values in data returned by
JSONRPC-S

I pushed a patch in master branch for now -- commit id 
1c22f395df81dab09288ff945e97b0040894daaf

Can anyone test and see if solves it? Then, if all ok, I will backport.

Cheers,
Daniel

On 17/03/16 22:14, Alex Balashov wrote:
> Indeed, I can confirm that this happens even with two entries, running
> 4.3:9506574:
>
> [root@allegro-4 ~]# kamcmd -s /tmp/kamailio_ctl pl.stats
> PIPE: id=bg350_ingress load=0 counter=0
> PIPE: id=bg208_ingress load=0 counter=0
>
> [root@allegro-4 kamailio]# curl --digest --user:pass 
> http://10.150.20.6:5060/csrp_rpc/ --data '{"jsonrpc": "2.0", 
> "method":"pl.stats", "result": "0xd"}'; echo {
> "jsonrpc":"2.0",
> "result":"PIPE: id=bg208_ingress load=0 counter=0"
> }
>
> -- Alex
>

--
Daniel-Constantin Mierla
http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, Berlin, May 18-20, 2016 - 
http://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-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] Kamailio Bridge

2016-03-21 Thread Nelson Migliaro
Hello,

I am trying to set up a Kamailio in Bridge Mode with two interfaces using
rtpproxy.

The problem I have is SDP information port and IP is not updated from
outside to inside. But on the other hand the SDP is rewrited from inside to
outside.

In the rtpproxy log I am seeing this error:

Mar 21 14:21:21 kamailio rtpproxy[6119]: ERR:create_twinlistener: can't
bind to the IPv4 port 23414: Cannot assign requested address
Mar 21 14:21:21 kamailio rtpproxy[6119]: ERR:handle_command: can't create
listener

and in kamailio log:

ERROR: rtpproxy [rtpproxy.c:2727]: force_rtp_proxy(): incorrect port 0 in
reply from rtp proxy


Something strange and interesting is the port that shows up in the RTPPROXY
error (23414) does not corresponds to any ports used.

Thank you

Nelson.-


-
Everything is set up this way:

Kamailio

Asterisk (asterisk-inside-ip) <-> Kamailio (inside-kamailio-ip) / Kamailio
(outside-kamailio-ip) <-> sip-vendor-ip

listen=inside-kamailio-ip
listen=outside-kamailio-ip

mhomed=1

if(src_ip=="asterisk-inside-ip"){
rtpproxy_manage("faie");
}

if(src_ip=="sip-vendor-ip"){
rtpproxy_manage("faie");
}

rtpproxy

OPTIONS="rtpproxy -l inside-kamailio-ip/outside-kamailio-ip -m 2 -M
3 -u rtpproxy:rtpproxy -p /var/run/rtpproxy/rtpproxy.pid -s udp:
127.0.0.1:7722 -d DBUG:LOG_LOCAL6"

--

SIP TRACES

2016/03/21 14:46:52.121472 asterisk-inside-ip:5060 ->
inside-kamailio-ip:5060
INVITE sip:9@inside-kamailio-ip SIP/2.0
Via: SIP/2.0/UDP asterisk-inside-ip:5060;branch=z9hG4bK7f1ece8e;rport
Max-Forwards: 70
From: 1;tag=as497457e6
To: 
Contact: 
Call-ID: 57bd4ca457972f5a42502ba34bba4500@asterisk-inside-ip:5060
CSeq: 102 INVITE
User-Agent: Abantix
Date: Mon, 21 Mar 2016 13:46:52 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH
Supported: replaces, timer
Remote-Party-ID: ;privacy=off;party=calling
Content-Type: application/sdp
Content-Length: 251

v=0
o=root 478097443 478097443 IN IP4 asterisk-inside-ip ##
ASTERISK IP
s=asterisk
c=IN IP4 asterisk-inside-ip## ASTERISK IP
t=0 0
m=audio 17146 RTP/AVP 8 101## ASTERISK PORT
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv




2016/03/21 14:46:52.139435 outside-kamailio-ip:5060 ->sip-vendor-ip:5060
INVITE sip:9@sip-vendor-ip SIP/2.0
Record-Route:

Record-Route:

Via: SIP/2.0/UDP
outside-kamailio-ip;branch=z9hG4bK0bfd.7bd4d3ae01e5850c14a3a939a612a05a.0
Via: SIP/2.0/UDP
asterisk-inside-ip:5060;received=asterisk-inside-ip;branch=z9hG4bK7f1ece8e;rport=5060
Max-Forwards: 69
From: 11 ;tag=as497457e6
To: 
Contact: 
Call-ID: 57bd4ca457972f5a42502ba34bba4500@asterisk-inside-ip:5060
CSeq: 102 INVITE
User-Agent: Abantix Voice Sevices
Date: Mon, 21 Mar 2016 13:46:52 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH
Supported: replaces, timer
Remote-Party-ID: ;privacy=off;party=calling
Content-Type: application/sdp
Content-Length: 271

v=0
o=root 478097443 478097443 IN IP4 outside-kamailio-ip ## OUTSIDE
KAMAILIO IP REWRITED BY RTPPROXY
s=asterisk
c=IN IP4 outside-kamailio-ip## OUTSIDE KAMAILIO IP REWRITED
BY RTPPROXY
t=0 0
m=audio 24122 RTP/AVP 8 101## OUTSIDE KAMAILIO PORT
REWRITED BY RTPPROXY
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv





2016/03/21 14:46:57.393518sip-vendor-ip:5060 -> outside-kamailio-ip:5060
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP
outside-kamailio-ip;rport=5060;branch=z9hG4bK0bfd.7bd4d3ae01e5850c14a3a939a612a05a.1
Via: SIP/2.0/UDP
asterisk-inside-ip:5060;received=asterisk-inside-ip;branch=z9hG4bK7f1ece8e;rport=5060
From: 11 ;tag=as497457e6
To: ;tag=fkii1xm4-CC-26
Call-ID: 57bd4ca457972f5a42502ba34bba4500@asterisk-inside-ip:5060
CSeq: 102 INVITE
Record-Route:

Record-Route:

Record-Route:

Contact: 
Allow:
INVITE,ACK,OPTIONS,BYE,CANCEL,REGISTER,INFO,PRACK,SUBSCRIBE,NOTIFY,UPDATE,MESSAGE,REFER
Content-Length: 237
Content-Type: application/sdp

v=0
o=HuaweiSoftX3000 71167517 71167517 IN IP4sip-vendor-ip ## SIP
VENDOR IP
s=Sip Call
c=IN IP4sip-vendor-ip## SIP VENDOR IP
t=0 0
m=audio 44862 RTP/AVP 8 101## SIP VENDOR PORT
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=pt

Re: [SR-Users] Kamailio 4.3.4: receive_msg(): no via found in reply

2016-03-21 Thread Grant Bagdasarian
Hi Daniel,

I've tried with htable implementation, but I can't seem to use a variable as 
the argument for the forward function.
I've tried multiple possibilities:

forward($avp(s:cancel_dst));
forward("$avp(s:cancel_dst)");

forward($var(cancel_dst));
forward("$var(cancel_dst)");

forward($sht(cancel=>$ci));
forward("$sht(cancel=>$ci)");

I keep getting the following error:

CRITICAL:  [proxy.c:265]: mk_proxy(): could not resolve hostname: 
"$avp(s:cancel_dst)"
Or when I don't enclose the variable in quotes an error about the parameter 
requiring a string.

I've also tried using the following steps, but rewritehost doesn't allow 
variables too :(

rewritehost("$var(cancel_dst)");
$du = "sip:$var(cancel_dst):5060;transport=udp";

Any ideas?

Regards,

Grant

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Grant Bagdasarian
Sent: Monday, March 21, 2016 10:01 AM
To: 'mico...@gmail.com' ; Kamailio (SER) - Users Mailing 
List 
Subject: Re: [SR-Users] Kamailio 4.3.4: receive_msg(): no via found in reply

Hello Daniel,

Thank you for figuring this out and explaining it to me! This has helped me a 
lot!

Regards,

Grant

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
Sent: Friday, March 18, 2016 4:33 PM
To: Grant Bagdasarian mailto:g...@cm.nl>>; Kamailio (SER) - Users 
Mailing List 
mailto:sr-users@lists.sip-router.org>>
Subject: Re: [SR-Users] Kamailio 4.3.4: receive_msg(): no via found in reply

Hello,

the problem is that the device you interconnect with (Server: sbc_5) is not 
sending all the Via headers from INVITE in the 487 -- it is only one Via:

# U 10.0.0.1:5060 -> 10.14.0.1:5060

SIP/2.0 487 Request Cancelled.
Via: SIP/2.0/UDP 
10.14.0.1;branch=z9hG4bK3c3b.a6603e0f92db305f775f8bf1d95dc7d9.0.
From: "+31612345678" 
;tag=1f15682a.
To: 
;tag=sbcsipuas_1_C52464_20160314100333554_b12sb10.
Call-ID: 78100ZGIyZGM2ZTY4ODM4YWZlZGFjNTBjMDZmYjQzMzBkOGI.
Contact: .
CSeq: 2 INVITE.
Server: sbc_5.
Content-Length: 0.

Notice the 100 trying Via stack:

# U 10.0.0.1:5060 -> 10.14.0.1:5060

SIP/2.0 100 Trying.
Via: SIP/2.0/UDP 
10.14.0.1;branch=z9hG4bK3c3b.a6603e0f92db305f775f8bf1d95dc7d9.0.
Via: SIP/2.0/UDP 
10.14.0.2;branch=z9hG4bK3c3b.6002c178e1a0751f80857e10c4caeb35.0.
Via: SIP/2.0/UDP 
10.14.0.3;branch=z9hG4bK3c3b.9cad3c629aa5c2985e543c285f2f6d1d.0.
Via: SIP/2.0/UDP 
10.14.0.3;branch=z9hG4bKsr-jNXap0IRuJngh6iFuS1xpYUspYiRWQikWSisuQfjcQKOM-8C8odTwzW4V-4LMU1N8O2fWSINuYFmpSUfpcKXuq8NW0is8YdObqasuQuP.
From: "+31612345678" 
;tag=1f15682a.
To: .
Call-ID: 78100ZGIyZGM2ZTY4ODM4YWZlZGFjNTBjMDZmYjQzMzBkOGI.
Contact: .
CSeq: 2 INVITE.
Server: sbc_5.
Content-Length: 0.


My guess that the sbc_5 is so poor implemented that it takes the Via from last 
request, which is CANCEL, but CANCEL is a hop-by-hop request in this case. If 
my guess is confirmed, the implementation of sbc_5 is really far away from 
RFC3261, something that I haven't probably seen since 2002/3.

To test, you can try to use forward() for CANCEL instead of t_relay(). But you 
need to know where to send it -- same address as for INVITE -- you can hardcode 
some values in config for sake of simplicity to test. A proper workaround can 
be built using htable module to store where the invite was sent, using call-id 
as a key.

Cheers,
Daniel
On 18/03/16 15:43, Grant Bagdasarian wrote:
Hi Daniel,

No problem :)

Our devices are kamailios. Our customers use different equipment for sending 
traffic and I'm not sure what kind of equipment our carriers are using. So, I 
can't really tell what device they're using. My test was done using Bria 
(X-Lite) acting as a "customer".

Regards,

Grant

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
Sent: Friday, March 18, 2016 10:25 AM
To: Grant Bagdasarian ; Kamailio (SER) - Users 
Mailing List 

Subject: Re: [SR-Users] Kamailio 4.3.4: receive_msg(): no via found in reply

Hello,

with CeBIT trip this week, I didn't get the change to look too much at it...

What is the device sending the reply to INVITE?

Cheers,
Daniel
On 18/03/16 10:05, Grant Bagdasarian wrote:
Hello Community,

Could someone point me into the right direction for fixing this issue with 
CANCEL replies?

Regards,

Grant

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Grant Bagdasarian
Sent: Tuesday, March 15, 2016 8:47 PM
To: 'mico...@gmail.com' 
; Kamailio (SER) - Users Mailing 
List 
Subject: Re: [SR-Users] Kamailio 4.3.4: receive_msg(): no via found in reply

Any ideas how to solve this?

Regards,

Grant

From: sr-users 
mailto:sr-users-boun...@lists.sip-router.org>>
 on behalf of Grant Bagdasarian mailto:g...@cm.nl>>
Sent: Monday, March 14, 2016 3:09:47 PM
To: 'mico...@gmail.com'; Kamailio (SER) - Users 
Mailing List
Subject: Re: [SR-Users] Kamailio 4.3.4: receive_msg(): no via fou

Re: [SR-Users] TCP connection select problem

2016-03-21 Thread 张顺通
Have provided Callid, thanks.

register callid
2bbadd72-d733-434e-bd06-45d9ddb5289b
a7fa5d8f-1e46-4605-9a6e-08751bc75fee

call
626fec11-684b-1234-d0b9-ecf4bbde9ef8

2016-03-21 16:45 GMT+08:00 Daniel-Constantin Mierla :

> Quickly looked at the file and I see several calls there. All of them are
> exposing the issue? Or can you give the call-id of the call that didn't
> work fine? I don't want to lose time looking at all the calls, knowing one
> that is wrong is enough...
>
> Cheers,
> Daniel
>
>
> On 21/03/16 03:50, 张顺通 wrote:
>
> I Send you pcap Separatly.
>
> Sorry, can't send pcap to mail list.
>
> Thanks
>
> 2016-03-15 16:08 GMT+08:00 Daniel-Constantin Mierla < 
> mico...@gmail.com>:
>
>> Can you attach a pcap with such situation, which includes the REGISTER,
>> replies and the call showing the issue?
>>
>> Cheers,
>> Daniel
>>
>>
>> On 15/03/16 03:36, 张顺通 wrote:
>>
>> sorry,I have not expressed clearly.
>>
>> kamailio will recive two REGISTER at a time.In first 200 OK to REGISTER,
>> Server will tell Linphone the Linphone Nat Ip and Port.
>> like this:
>> Via:SIP/2.0/TCP 30.9.2.1:50691
>> ;received=42.1.7.1;alias;branch=z9hG4bK.kmhC2L9Rf;rport=33746
>> and Linphone will know it's outside nat Ip and port, Linphone while use
>> this Ip and Port in second REGISTER.
>> like this:
>> REGSITER
>> Contact:
>>
>> So kamailio server know Linphone's nated ip and port and save in
>> DB(contact field).
>>
>>
>> my question is KA_EDGE receive sip from KA_REGISTER already have right
>> nat ip and port like
>> INVITE 123456@42.1.7.1:33746;transport=tcp  SIP/2.0
>> but KA_EDGE do not send this sip msg to 42.1.7.1:33746, it send to
>> another nat ip and port(other Linphone's ip and port behind same NAT layer)
>>
>>
>> 2016-03-14 21:42 GMT+08:00 Daniel-Constantin Mierla :
>>
>>> Indeed, the ports are different, that's why adding received is important
>>> in this situation.
>>>
>>> While local ip and local port are in most of the cases also unique for
>>> devices behind a nat router, it is not 100% true, because there can be many
>>> layers of NATs, which can result in seeing same local ip/port for devices.
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 14/03/16 13:06, 张顺通 wrote:
>>>
>>> source IP  is same,  But port is different。
>>> like INVITE sip:Linphone_nat_Ip:Linphone_nat_port;tcp;
>>>
>>>
>>> 2016-03-14 18:26 GMT+08:00 Daniel-Constantin Mierla <
>>> mico...@gmail.com>:
>>>
 Adding received information to Path helps to identify properly the
 connection to be used. Because both devices are behind the same NAT,
 practically they show the same source IP when they send traffic to server.

 Cheers,
 Daniel


 On 14/03/16 04:05, 张顺通 wrote:

 KA_EDGE have two IP,external public IP and internal IP.
 I add modparam("path", "use_received", 1)  and replace add_path()
 to add_path_received() in edge server.
 add modparam("registrar", "path_use_received", 1) in KA_REGISTER
 server.

 DB path info 
 --> >>> >

 This kind of situation very little,It is not easy to reappear.
 Can you tell me why this situation happen? and Why this change can
 solve the problem?

 Thanks for Your Time.



 2016-03-09 22:37 GMT+08:00 Daniel Tryba < 
 d.tr...@pocos.nl>:

> On Wed, Mar 09, 2016 at 10:05:11PM +0800, 张顺通 wrote:
> > Yes,Use Path in DB. like  ;lr;ob>
> > KA_REGISTER wile the path info in DB.
>
> Should not be a problem if you use the use_received options in
> 
> http://kamailio.org/docs/modules/stable/modules/path.html#idp135216
> and
>
> 
> http://kamailio.org/docs/modules/stable/modules/registrar.html#registrar.p.path_use_received
>
> (and actually add the source as received on the kamailio edge server).
>
> ___
> 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 
 listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


 --
 Daniel-Constantin Mierlahttp://www.asipto.comhttp://twitter.com/#!/miconda 
 - http://www.linkedin.com/in/miconda
 Kamailio World Conference, Berlin, May 18-20, 2016 - 
 http://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/listi

Re: [SR-Users] Kamailio 4.3.4: receive_msg(): no via found in reply

2016-03-21 Thread Grant Bagdasarian
Hello Daniel,

Thank you for figuring this out and explaining it to me! This has helped me a 
lot!

Regards,

Grant

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
Sent: Friday, March 18, 2016 4:33 PM
To: Grant Bagdasarian ; Kamailio (SER) - Users Mailing List 

Subject: Re: [SR-Users] Kamailio 4.3.4: receive_msg(): no via found in reply

Hello,

the problem is that the device you interconnect with (Server: sbc_5) is not 
sending all the Via headers from INVITE in the 487 -- it is only one Via:

# U 10.0.0.1:5060 -> 10.14.0.1:5060

SIP/2.0 487 Request Cancelled.
Via: SIP/2.0/UDP 
10.14.0.1;branch=z9hG4bK3c3b.a6603e0f92db305f775f8bf1d95dc7d9.0.
From: "+31612345678" 
;tag=1f15682a.
To: 
;tag=sbcsipuas_1_C52464_20160314100333554_b12sb10.
Call-ID: 78100ZGIyZGM2ZTY4ODM4YWZlZGFjNTBjMDZmYjQzMzBkOGI.
Contact: .
CSeq: 2 INVITE.
Server: sbc_5.
Content-Length: 0.

Notice the 100 trying Via stack:

# U 10.0.0.1:5060 -> 10.14.0.1:5060

SIP/2.0 100 Trying.
Via: SIP/2.0/UDP 
10.14.0.1;branch=z9hG4bK3c3b.a6603e0f92db305f775f8bf1d95dc7d9.0.
Via: SIP/2.0/UDP 
10.14.0.2;branch=z9hG4bK3c3b.6002c178e1a0751f80857e10c4caeb35.0.
Via: SIP/2.0/UDP 
10.14.0.3;branch=z9hG4bK3c3b.9cad3c629aa5c2985e543c285f2f6d1d.0.
Via: SIP/2.0/UDP 
10.14.0.3;branch=z9hG4bKsr-jNXap0IRuJngh6iFuS1xpYUspYiRWQikWSisuQfjcQKOM-8C8odTwzW4V-4LMU1N8O2fWSINuYFmpSUfpcKXuq8NW0is8YdObqasuQuP.
From: "+31612345678" 
;tag=1f15682a.
To: .
Call-ID: 78100ZGIyZGM2ZTY4ODM4YWZlZGFjNTBjMDZmYjQzMzBkOGI.
Contact: .
CSeq: 2 INVITE.
Server: sbc_5.
Content-Length: 0.


My guess that the sbc_5 is so poor implemented that it takes the Via from last 
request, which is CANCEL, but CANCEL is a hop-by-hop request in this case. If 
my guess is confirmed, the implementation of sbc_5 is really far away from 
RFC3261, something that I haven't probably seen since 2002/3.

To test, you can try to use forward() for CANCEL instead of t_relay(). But you 
need to know where to send it -- same address as for INVITE -- you can hardcode 
some values in config for sake of simplicity to test. A proper workaround can 
be built using htable module to store where the invite was sent, using call-id 
as a key.

Cheers,
Daniel
On 18/03/16 15:43, Grant Bagdasarian wrote:
Hi Daniel,

No problem :)

Our devices are kamailios. Our customers use different equipment for sending 
traffic and I'm not sure what kind of equipment our carriers are using. So, I 
can't really tell what device they're using. My test was done using Bria 
(X-Lite) acting as a "customer".

Regards,

Grant

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
Sent: Friday, March 18, 2016 10:25 AM
To: Grant Bagdasarian ; Kamailio (SER) - Users 
Mailing List 

Subject: Re: [SR-Users] Kamailio 4.3.4: receive_msg(): no via found in reply

Hello,

with CeBIT trip this week, I didn't get the change to look too much at it...

What is the device sending the reply to INVITE?

Cheers,
Daniel
On 18/03/16 10:05, Grant Bagdasarian wrote:
Hello Community,

Could someone point me into the right direction for fixing this issue with 
CANCEL replies?

Regards,

Grant

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Grant Bagdasarian
Sent: Tuesday, March 15, 2016 8:47 PM
To: 'mico...@gmail.com' 
; Kamailio (SER) - Users Mailing 
List 
Subject: Re: [SR-Users] Kamailio 4.3.4: receive_msg(): no via found in reply

Any ideas how to solve this?

Regards,

Grant

From: sr-users 
mailto:sr-users-boun...@lists.sip-router.org>>
 on behalf of Grant Bagdasarian mailto:g...@cm.nl>>
Sent: Monday, March 14, 2016 3:09:47 PM
To: 'mico...@gmail.com'; Kamailio (SER) - Users 
Mailing List
Subject: Re: [SR-Users] Kamailio 4.3.4: receive_msg(): no via found in reply

Hello Daniel,

Carrier: 10.0.0.1
Kamailio 1: 10.14.0.1
Kamailio 2: 10.14.0.2

I also removed the SDP from the INVITE and the 183 messages.

This is the trace from the Kamailio which directly communicates with the 
Carrier.

U 10.14.0.2:5060 -> 10.14.0.1:5060
INVITE sip:0031123456789@10.14.0.1:5060 SIP/2.0.
Record-Route: .
Record-Route: .
Via: SIP/2.0/UDP 
10.14.0.2;branch=z9hG4bK3c3b.6002c178e1a0751f80857e10c4caeb35.0.
Via: SIP/2.0/UDP 
10.14.0.3;branch=z9hG4bK3c3b.9cad3c629aa5c2985e543c285f2f6d1d.0.
Via: SIP/2.0/UDP 
10.14.0.3;branch=z9hG4bKsr-jNXap0IRuJngh6iFuS1xpYUspYiRWQikWSisuQfjcQKOM-8C8odTwzW4V-4LMU1N8O2fWSINuYFmpSUfpcKXuq8NW0is8YdObqasuQuP.
Max-Forwards: 68.
Contact: .
To: .
From: "+31612345678";tag=1f15682a.
Call-ID: 78100ZGIyZGM2ZTY4ODM4YWZlZGFjNTBjMDZmYjQzMzBkOGI.
CSeq: 2 INVITE.
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE.
Content-Type: application/sdp.
User-Agent: Bria 4 release 4.2.1 stamp 78100.
Content-Length: 431.

#
U 10.14.0.1:5060 -> 10.14.0.2:5060
SIP/2.0 100 trying -- your call is important to us.
Via: SIP/2.0/UDP 
10.14.

Re: [SR-Users] What to read after RFC 3261 to get started with

2016-03-21 Thread Oivvio Polite
On ons, mar 16, 2016 at 08:46:22 +0100, Giovanni Maruzzelli wrote:
> There is also a most exquisite book, written by Daniel and Ramona for
> Asipto, called "Sip Routing with Kamailio", that is just what you are
> looking for.
> 
> Check it out, and buy it here:
> 
> https://www.asipto.com/sw/kamailio-admin-book/

Thanks! I filled out the order form. And by the way, thanks for writing
the FreeSwitch Cookbook. I found it very helpful.

regards Oivvio

___
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] LCR prefix based

2016-03-21 Thread Daniel-Constantin Mierla
Hello,

did you use t_relay() after all the lcr logic?

Cheers,
Daniel

On 10/03/16 23:19, Roberto Innaimi wrote:
> Hi to all, 
>
> i want to use prefix based LCR routing, but for some reason, something
> is not working as expected. 
>
> Can anyone help me? 
>
> This is the LCR configuration:
>
>
> #LCR MODULE
> loadmodule "lcr.so"
>
> modparam("lcr", "db_url",
> "mysql://kamailioro:kamailioro@localhost/kamailio")
> modparam("lcr", "lcr_gw_table","lcr_gw")
> modparam("lcr", "id_column", "id")
> modparam("lcr", "gw_name_column", "gw_name")
> modparam("lcr", "ip_addr_column", "ip_addr")
> modparam("lcr", "hostname_column", "hostname")
> modparam("lcr", "port_column", "port")
> modparam("lcr", "params_column", "params")
> modparam("lcr", "uri_scheme_column", "uri_scheme")
> modparam("lcr", "transport_column", "transport")
> modparam("lcr", "strip_column", "strip")
> modparam("lcr", "tag_column", "tag")
> modparam("lcr", "flags_column", "flags")
> modparam("lcr", "defunct_column", "defunct")
> modparam("lcr", "lcr_rule_table", "lcr_rule")
> modparam("lcr", "prefix_column", "prefix")
> modparam("lcr", "from_uri_column", "from_uri")
> modparam("lcr", "request_uri_column", "request_uri")
> modparam("lcr", "stopper_column", "stopper")
> modparam("lcr", "enabled_column", "enabled")
> modparam("lcr", "lcr_rule_target_table", "lcr_rule_target")
> modparam("lcr", "rule_id_column", "id")
> modparam("lcr", "gw_id_column", "gw_id")
> modparam("lcr", "priority_column", "priority")
> modparam("lcr","weight_column", "weight")
>
> modparam("lcr", "gw_uri_avp", "$avp(i:709)")
> modparam("lcr", "ruri_user_avp", "$avp(i:500)")
>
>
> modparam("lcr", "tag_avp", "$avp(lcr_tag)")
> modparam("lcr", "flags_avp", "$avp(i:712)")
> modparam("lcr", "lcr_id_avp", "$avp(s:lcr_id_avp)")
> modparam("lcr", "defunct_gw_avp", "$avp(s:defunct_gw_avp)")
>
>
> route[LCR] {
> if (status=="200")
> {
>   xlog("LCR: Inside the LCR route\n");
> }
>
> if(method=="INVITE")
> {
>   xlog("We got an invite");
>   if(!load_gws(1, $rU, $var(caller_uri))) {
> xlog("Couldn't load gateways");
> sl_send_reply("500", "Server Internal Error - Cannot load gateways");
> exit;
>   } else {
> xlog("GW Selected '$avp(i:709)'\n");
> xlog("Domain of destination: $dd\n");
> xlog("To URI: $tu\n");
>   }
>
>   if(!next_gw()) {
> xlog("Couldn't proceed to next gateway");
> sl_send_reply("503", "Service not available, no gateways found");
> exit;
>   } else {
> xlog("Calling the first matched gateway\n");
> xlog("ruri_user_avp: '$avp(i:500)'\n");
> xlog("To URI after next_gw: $tu\n");
> xlog("Request URI: $rU\n");
>
>   }
> }
> }
>
>
>
>
> AND this is the error which i have got:
>
>
>
> 17(7483) ERROR: 

Re: [SR-Users] Problem with Freeswitch with IP public and Kamailio behind NAT

2016-03-21 Thread Daniel-Constantin Mierla
Hello,

On 11/03/16 05:17, Hai Bui Duc Ha wrote:
> []
> View console log on Freeswitch, I see the ecallmgr response to FS3:
>
>  1. 
> bridge({outbound_redirect_fatal="false",call_timeout=20,originate_timeout=20,local_var_clobber="true"}[ecallmgr_Authorizing-ID="71310939684a2c8acc4e0e6dff1be6c2",ecallmgr_Owner-ID="188cd101dcea060d080261b328fdf1ca",ecallmgr_Account-ID="3f221d1ce6959ec04acd372923e253b9",sdp_secure_savp_only="false",sip_invite_domain="hahai1412.anttel-pro.ab-kz-02.antbuddy.com
> 
> ",presence_id="sharklas...@hahai1412.anttel-pro.ab-kz-02.antbuddy.com
> 
> ",sip_h_X-KAZOO-AOR=sip:sharklas...@hahai1412.anttel-pro.ab-kz-02.antbuddy.com,absolute_codec_string="^^:PCMU:VP8",leg_timeout="20",effective_callee_id_number="sharklasers",effective_callee_id_name="sharklasers
>   
> ",origination_callee_id_number="sharklasers",origination_callee_id_name="sharklasers
>   ",ecallmgr_Realm="hahai1412.anttel-pro.ab-kz-02.antbuddy.com
> 
> ",ecallmgr_Username="sharklasers"]sofia/sipinterface_1/sharklasers@113.161.89.159:5914
> 
> ;transport=ws;*fs_path=sip:10.127.15.36:5060*;lr;received="sip:113.161.89.159:5914
> ;transport=ws")
>
> I research fs_path
> parameter: 
> https://wiki.freeswitch.org/wiki/Sofia-SIP#Specifying_SIP_Proxy_With_fs_path
> I guess this is broken It should be Public
> IP: *fs_path=sip:125.212.212.40:5060*. But I don't know how I can
> change this parameter ! 
> Anybody faced that problem ? Any solution ?
is your question about how to set fs_path in FreeSwitch dialplan? If
yes, you should ask on freeswitch mailing list, there are more people
familiar with freeswitch there than here and can help faster.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, Berlin, May 18-20, 2016 - 
http://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 behind NAT

2016-03-21 Thread Daniel-Constantin Mierla
Hello,

do you have port 5060 forwarding from firewall to kamailio local IP address?

Cheers,
Daniel

On 17/03/16 08:24, Safdar Khan wrote:
> Hello
> I have been running kamailio on local network including rtpengine and
> freeswitch.
> Now i am configuring kamailio with my public IP(trying with stock
> kamailio configuration to get started)
> #define WITH_NAT 
>
> listen=udp:192.168.3.32:5060 
> listen=tcp:192.168.3.32:5060 
> advertised_address= "122.xx.xx.xx"
> advertised_port="5060"
>
> and also using rtpengine module at udp:192.168.3.32:2
> 
>
> now the problems i am facing are 
> 1.> UA can't register with UDP transport(not even recieving any
> packets at server ,testing with IMSdroid).
> 2.>TCP is registering the user, but users can't make calls .
> i've also noticed this error in /var/log/syslog when tcp ca't make calls
>
> ERROR:  [tcp_main.c:4250]: tcpconn_main_timeout(): connect
> 100.68.181.111:50842  failed (timeout)
>
> please help me out 
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, Berlin, May 18-20, 2016 - 
http://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] TCP connection select problem

2016-03-21 Thread Daniel-Constantin Mierla
Quickly looked at the file and I see several calls there. All of them
are exposing the issue? Or can you give the call-id of the call that
didn't work fine? I don't want to lose time looking at all the calls,
knowing one that is wrong is enough...

Cheers,
Daniel

On 21/03/16 03:50, 张顺通 wrote:
> I Send you pcap Separatly.
>
> Sorry, can't send pcap to mail list.
>
> Thanks
>
> 2016-03-15 16:08 GMT+08:00 Daniel-Constantin Mierla  >:
>
> Can you attach a pcap with such situation, which includes the
> REGISTER, replies and the call showing the issue?
>
> Cheers,
> Daniel
>
>
> On 15/03/16 03:36, 张顺通 wrote:
>> sorry,I have not expressed clearly.
>>
>> kamailio will recive two REGISTER at a time.In first 200 OK to
>> REGISTER, Server will tell Linphone the Linphone Nat Ip and Port.
>> like this:
>> Via:SIP/2.0/TCP
>> 
>> 30.9.2.1:50691;received=42.1.7.1;alias;branch=z9hG4bK.kmhC2L9Rf;rport=33746
>> and Linphone will know it's outside nat Ip and port, Linphone
>> while use this Ip and Port in second REGISTER.
>> like this:
>> REGSITER 
>> Contact:
>>
>> So kamailio server know Linphone's nated ip and port and save in
>> DB(contact field).
>>
>>
>> my question is KA_EDGE receive sip from KA_REGISTER already have
>> right nat ip and port like
>> INVITE 123456@42.1.7.1:33746;transport=tcp  SIP/2.0
>> but KA_EDGE do not send this sip msg to 42.1.7.1:33746
>> , it send to another nat ip and port(other
>> Linphone's ip and port behind same NAT layer)
>>
>>
>> 2016-03-14 21:42 GMT+08:00 Daniel-Constantin Mierla
>> mailto:mico...@gmail.com>>:
>>
>> Indeed, the ports are different, that's why adding received
>> is important in this situation.
>>
>> While local ip and local port are in most of the cases also
>> unique for devices behind a nat router, it is not 100% true,
>> because there can be many layers of NATs, which can result in
>> seeing same local ip/port for devices.
>>
>> Cheers,
>> Daniel
>>
>>
>> On 14/03/16 13:06, 张顺通 wrote:
>>> source IP  is same,  But port is different。
>>> like INVITE sip:Linphone_nat_Ip:Linphone_nat_port;tcp;
>>>
>>>
>>> 2016-03-14 18:26 GMT+08:00 Daniel-Constantin Mierla
>>> mailto:mico...@gmail.com>>:
>>>
>>> Adding received information to Path helps to identify
>>> properly the connection to be used. Because both devices
>>> are behind the same NAT, practically they show the same
>>> source IP when they send traffic to server.
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 14/03/16 04:05, 张顺通 wrote:
 KA_EDGE have two IP,external public IP and internal IP.
 I add modparam("path", "use_received", 1)  and replace
 add_path() to add_path_received() in edge server.
 add modparam("registrar", "path_use_received", 1)
 in KA_REGISTER server.

 DB path info >>> ;lr;ob>
 --> 
 

 This kind of situation very little,It is not easy to
 reappear.
 Can you tell me why this situation happen? and Why this
 change can solve the problem?

 Thanks for Your Time.



 2016-03-09 22:37 GMT+08:00 Daniel Tryba
 mailto:d.tr...@pocos.nl>>:

 On Wed, Mar 09, 2016 at 10:05:11PM +0800, 张顺通 wrote:
 > Yes,Use Path in DB. like
 >>> ;lr;ob>
 > KA_REGISTER wile the path info in DB.

 Should not be a problem if you use the use_received
 options in
 
 http://kamailio.org/docs/modules/stable/modules/path.html#idp135216
 and
 
 http://kamailio.org/docs/modules/stable/modules/registrar.html#registrar.p.path_use_received

 (and actually add the source as received on the
 kamailio edge server).

 ___
 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
 

Re: [SR-Users] Removing Via and Record-Route headers

2016-03-21 Thread Daniel-Constantin Mierla
Depending from case to case, the record-routing can be avoided,
especially if you know the environment and only one server is used
between two endpoints. At that moment you can store existing contact in
htable and replace it with one having the server ip. You can eventually
use uuid to generate the contact to be unique, but not a must.

The logic would be:

- call comes in, store $sht(x=>$ci::a1:contact) = contact uri
- store $sht(x=>$ci::a1:ftag) = From tag
- replace contact header with one using server ip and send out
- store new contact uri as $sht(x=>$ci::a2:contact)
- replies comes in, store $sht(x=>$ci::b1:contact) = contact uri
- replace contact header with another new one using server ip and send out
- store new contact uri as $sht(x=>$ci::b2:contact)
- when a request within dialog comes in, based on From tag and
$sht(x=>$ci::a1:ftag), you detect the direction and based on that you
set the appropriate r-uri using either $sht(x=>$ci::a1:contact) or
$sht(x=>$ci::b1:contact) and replace the contact with a2/b2 variants

Alternative to htable is to use database or other storage (e.g., nosql
like redis, mongo, ...).

As a matter of fact, upcoming 4.4 includes the topos module which should
do what you want here, but due to lack of time caused by some unexpected
events, at this moment works properly only for MESSAGE requests. By the
time of release I should have the time to fix the dialog routing as well.

Cheers,
Daniel

On 20/03/16 02:41, Matthew Harrold wrote:
>
> Thanks for your quick response.
>
> No, you can't remove those headers. They serve an essential
> purpose and the endpoints won't consider the requests or responses
> valid without them.
>
>
> It should be theoretically possible to remove some of the via and
> record-route headers, assuming the contact is also re-written. The end
> point's (phones) themselves do not need to be aware of anything
> downstream of the SIP server they're registered too. 
>  
>
>
> See my blog post on this topic:
>
> 
> http://blog.csrpswitch.com/sip-udp-fragmentation-and-kamailio-the-sip-header-diet/
>
>
> Thanks for the link!
>  
>
>
>
> And you certainly can't hide topology this way.
>
> -- Alex
>
>
> On 03/19/2016 09:26 PM, Marrold wrote:
>
> Hi,
>
> Is there any way to remove Via and Record-Route headers from
> requests
> sent to an endpoint and update the contact header, but have
> Kamailio
> statefully remember where the replies need to route?
>
> I imagine this would involve mangling the packets slightly to
> behave
> similar to a B2BUA.
>
> My motivations, in order of priority -
>
> 1) Reduce UDP packet size to avoid MTU limitations
> 2) Improve interoperability, don't expect end points to be able to
> properly parse / process many via / record-route headers
> 3) Hide topology.
>
> If someone could point me in the right direction in terms of
> configuration or modules, that would be great.
>
> Thanks
>
>
> ___
> 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
>
>
>
> -- 
> Alex Balashov | Principal | Evariste Systems LLC
> 1447 Peachtree Street NE, Suite 700
> Atlanta, GA 30309
> United States
>
> Tel: +1-800-250-5920  (toll-free) /
> +1-678-954-0671  (direct)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.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://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, Berlin, May 18-20, 2016 - 
http://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