Re: [SR-Users] ACK and BYE messages uses wrong socket.

2012-07-05 Thread Gary Chen
Yes, it is available when kamailio started. I tried the latest version (3.2.3) 
and it did the same thing.
If I removed listen=udp:x.x.130.34:5060  (primary IP on the NIC) from 
configuration file, it will report error when trying to relay() the message 
like this:
ERROR:  [forward.c:220]: ERROR: get_out_socket: no socket found
It seems that kamailio does not populate default socket with secondary IP 
(floating IP) and you have to use force_send_socket() to send the message.

Gary

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com]
Sent: Tuesday, July 03, 2012 12:23 PM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users 
Mailing List
Cc: Gary Chen
Subject: Re: [SR-Users] ACK and BYE messages uses wrong socket.

Hello,

is .36 address available on the network interface when kamailio is started?

Also, use at least v3.2.3 (the latest in 3.2 series) to be sure you get all the 
fixes since 3.2.0 and this is not related to some issue already fixed.

Cheers,
Daniel
On 7/3/12 4:52 PM, Gary Chen wrote:
Yes, I did the same thing as you mentioned and it still doing the same thing. 
Here is my setup:
mhomed=1
listen=udp:x.x.130.36:5060 # external IP
listen=udp:x.x.130.34:5060 # external IP
listen=udp:10.200.1.31:5060 # internal IP

If I removed .130.34, I got error saying no socket found.

Gary Chen
From: 
sr-users-boun...@lists.sip-router.org
 [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Vitaliy Aleksandrov
Sent: Tuesday, July 03, 2012 10:27 AM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users 
Mailing List
Subject: Re: [SR-Users] ACK and BYE messages uses wrong socket.

Have you specified interfaces with "listen" command ?
I had a problem as you described and have fixed it by moving a listen directive 
with a "floating ip" to the top of the list.
So you can try to specify interfaces you will use for SIP and set a "virtual 
ip" at the top of that list.



Kamailio 3.2.0
I am trying to setup kamailio to do the sip trunking. It  receive the sip 
traffic from customer and then send it to carrier.
I have two NIC interface's assigned with three IP's:
Interface 1: ( Public IP's)
x.x.130.34
x.x.130.36  floating IP
interface 2: (private IP's)
10.10.1.31

.36 is a floating IP  assigned by Linux-HA (heartbeat/pacemaker).

I only want to use .36 to receive and send sip traffic.
I uses  force_send_socket() to send INVITE with .36 IP.  But the ACK message 
always want to use .34 IP even the Route header has .36 in it unless I force it 
with force_send_socket() .

How can I fix this problem?
See below for the SIP messages: (x.x.128.205 is customer IP, x.x.129.200 is 
PSTN gateway IP)
U x.x.128.205:51694 -> x.x.130.36:5060
  INVITE sip:5033441174@x.x.130.36:5060 
SIP/2.0..Via: SIP/2.0/UDP  x.x.128.205:5060;branch=z9hG
  4bK1D3CD1..From: 
;tag=24513088-D59..To:
 mailto:sip:5033441174@x.x.130.3>
  6>..Date: Tue, 03 Jul 2012 13:37:41 GMT..Call-ID: 
1887588D-C44B11E1-BE38D697-98A3E39A@x.x.128.20
  5..Supported: 100rel,timer,replaces..Min-SE:  1800..Cisco-Guid: 
411443261-3293254113-3191264919-256
  0877466..User-Agent: Cisco-SIPGateway/IOS-12.x..Allow: INVITE, OPTIONS, BYE, 
CANCEL, ACK, PRACK, CO
  MET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER..CSeq: 101 
INVITE..Max-Forwards: 70..Remote-P
  arty-ID: 
;party=calling;screen=no;privacy=off..Timestamp:
 1341322661
  ..Contact: 
..Expires:
 180..Allow-Events: telephone-event..Conte
  nt-Type: application/sdp..Content-Length: 
366v=0..o=CiscoSystemsSIP-GW-UserAgent 9094 579 IN IP
  4 x.x.128.205..s=SIP Call..c=IN IP4 x.x.128.205..t=0 0..m=audio 19312 RTP/AVP 
125 0 18 100 10
  1..c=IN IP4 x.x.128.205..a=rtpmap:125 X-CCD/8000..a=rtpmap:0 
PCMU/8000..a=rtpmap:18 G729/8000..a
  =fmtp:18 annexb=yes..a=rtpmap:100 X-NSE/8000..a=fmtp:100 
192-194..a=rtpmap:101 telephone-event/8000
  ..a=fmtp:101 0-16..
#
U x.x.130.36:5060 -> x.x.128.205:51694
  SIP/2.0 100 trying -- your call is important to us..Via: SIP/2.0/UDP  
x.x.128.205:5060;branch=z9
  hG4bK1D3CD1;rport=51694..From: 
;tag=24513088-D59..To:
 mailto:4@x.x.130.36>>..Call-ID: 
1887588d-c44b11e1-be38d697-98a3e...@x.x.128.205..cseq:
 101 INVITE..Se
  rver: LVS Proxy 1.0..Content-Length: 0
#
U x.x.130.36:5060 -> x.x.129.200:5060
  INVITE 
sip:15033441174@x.x.129.200:5060 
SIP/2.0..Record-Route: ..Via: S
  IP/2.0/UDP x.x.130.36;branch=z9hG4bKc2ce.17a955a3.0..Via: SIP/2.0/UDP  
x.x.128.205:5060;rport
  =51694;branch=z9hG4bK1D3CD1..From: 
;tag=24513088-D59..To:
 mailto:41174@x.x.130.36>>..Date: Tue, 03 Jul 2012 13:37:41 
GMT..Call-ID: 1887588D-C44B11E1-

Re: [SR-Users] Removing display-name with uac_replace_from

2012-07-05 Thread Andreas Granig
Hi,

The attached patch does the trick for me, but I'd rather like to have a
second opinion on it for any potential side effects before pushing it.

The point here is that the fixup function didn't change (beside the
name) between 3.1 and 3.3, however 3.1 used dedicated w_replace_from1()
and w_replace_from2(), whereas 3.3 uses one unified w_replace_from(),
which breaks the behavior the fixup function is providing.

Thanks,
Andreas

On 07/05/2012 12:32 AM, Andreas Granig wrote:
> Hi,
> 
> On 07/04/2012 09:42 PM, Daniel-Constantin Mierla wrote:
>> quick look into the sources shows that fixup makes the display parameter
>> null if its length is 0 -- perhaps introduced in the patch that unified
>> the fixup to work also for replacing the To header display. If you have
>> time and urgent need, you can push a fix for it asap, otherwise I will
>> look at it once getting some spare time out of traveling.
> 
> Ok, I'll have a look at it tomorrow and push a fix.
> 
> Andreas
> 
> 
> 
> ___
> 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
> 

diff --git a/modules_k/uac/uac.c b/modules_k/uac/uac.c
index 8de09b1..763dd5a 100644
--- a/modules_k/uac/uac.c
+++ b/modules_k/uac/uac.c
@@ -435,14 +435,11 @@ static int fixup_replace_disp_uri(void** param, int param_no)
 			s.len += 2;
 		}
 	}
-	if(s.len!=0)
+	if(pv_parse_format(&s ,&model)<0)
 	{
-		if(pv_parse_format(&s ,&model)<0)
-		{
-			LM_ERR("wrong format [%s] for param no %d!\n", s.s, param_no);
-			pkg_free(s.s);
-			return E_UNSPEC;
-		}
+		LM_ERR("wrong format [%s] for param no %d!\n", s.s, param_no);
+		pkg_free(s.s);
+		return E_UNSPEC;
 	}
 	*param = (void*)model;
 


signature.asc
Description: OpenPGP digital signature
___
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