[SR-Users] 403 Proxy forbidden replay for invite that send sip gateway

Carsten Bock carsten at ng-voice.com
Thu May 19 10:00:43 CEST 2011


Hi,

one way to achieve this, would be to modify the following block:
Your Block now:
##### ----- AUTHENTICATE ----------------------------------------------

	if(!is_domain_local(“$fd”))
	{
		if(!is_domain_local(“$rd”))
		{
			xlog(“+++++ bad from fd from IP: $fd\n”);
			
			xlog(“+++++ bad from $rd from IP: $rd \n”);

			sl_send_reply(“403”, “Proxy forbidden”);
			exit;
		}
	} else {
		$var(u) = $fU;
		$var(d) = $fd;
		$var(p) = 0;
		if(!route(9))
		{
			sl_send_reply(“404”, “Non-local user”);
			exit;
		}
		if(!route(8))
		{
			sl_send_reply(“404”, “No user profile”);
			exit;
		}
		if($avp(i:323)==1
			|| $avp(i:323)==2)
		{
			sl_send_reply(“403”, “Not allowed”);
			exit;
		}
		route(6);
		setflag(4);
	}

Change this to:

# Only Authenticate INVITE's


if (method == "INVITE") {

(... insert your original block here ...)

}


Carsten



2011/5/18 hala alramli <doreme202002 at yahoo.com>

>
>
> thanks for your reply Klaus ,attached my config file could you please take
> a look ,i found the line that send that replay  but i do not know why .?
> could you help me i am stuck
>
>
>
>
>
> --- *Mer 18/5/11, Klaus Darilion <klaus.mailinglists at pernau.at>* ha
> scritto:
>
>
> Da: Klaus Darilion <klaus.mailinglists at pernau.at>
> Oggetto: Re: [SR-Users] 403 Proxy forbidden replay for invite that send sip
> gateway
> A: sr-users at lists.sip-router.org
> Data: Mercoledì 18 maggio 2011, 13:04
>
> Check your config and verify where 403 is sent. You have something like
>
> sl_send_reply("403","Proxy forbidden") in your config.
>
> regards
> Klaus
>
> Am 18.05.2011 10:48, schrieb hala alramli:
> > Hello every body,
> > could you help me ?
> >
> > i bought Geographical DID numbers from gateway provider ,  to  receive
> > calls from pstn
> >
> > my problem that when gateway send invite my proxy send 403 forbidden ,i
> > dont know why what is wrong ,any help please.
> >
> > this is a track for th gateway invite.
> >
> > my proxy ip:79.12.254.153
> > gateway IP :77.239.128.10
> > my geographical number :0698962030
> >
> >
> >
> >
> >
> > INVITE sip:0698962030 at 79.12.254.153:5060;user=phone SIP/2.0
> >
> > Via: SIP/2.0/UDP 77.239.128.10:5060
> ;branch=z9hG4bKf89p48m8dkuco1tumbnfaemc44
> >
> > From:
> > <sip:0289089500 at 10.39.1.16:5060
> ;user=phone>;tag=SDml08d01--45026-1f4d3a5-203bbf09-1f4d3a5
> >
> > To: <sip:0698962030 at 10.39.6.207:5060;user=phone>
> >
> > Call-ID: SDml08d01-daae53b1c06b7367e53d68ad67a63d13-ao92061
> >
> > CSeq: 1 INVITE
> >
> > User-Agent: CS2000_NGSS/8.0
> >
> > Remote-Party-ID: <sip:0289089500 at 10.39.1.16;user=phone>; party=calling;
> > privacy=off; screen=yes
> >
> > Allow: ACK,BYE,CANCEL,INVITE,OPTIONS,INFO,SUBSCRIBE,REFER,NOTIFY,PRACK
> >
> > P-Asserted-Identity: <sip:0289089500 at 10.39.1.16;user=phone>
> >
> > Max-Forwards: 69
> >
> > Contact: <sip:77.239.128.10:5060;transport=UDP>
> >
> > Supported: 100rel
> >
> > Content-Type: application/sdp
> >
> > Content-Length: 236
> >
> >
> >
> > v=0
> >
> > o=PVG 1305215180830 1305215180830 IN IP4 77.239.128.10
> >
> > s=-
> >
> > p=+1 6135555555
> >
> > c=IN IP4 77.239.128.10
> >
> > t=0 0
> >
> > m=audio 49264 RTP/AVP 18 8 0 13 101
> >
> > a=rtpmap:101 telephone-event/8000
> >
> > a=fmtp:101 0-15
> >
> > a=ptime:20
> >
> > a=fmtp:18 annexb=no
> >
> >
> >
> >
> >
> >
> >
> > SIP/2.0 403 Proxy forbidden
> >
> > Via: SIP/2.0/UDP
> > 77.239.128.10:5060
> ;branch=z9hG4bKf89p48m8dkuco1tumbnfaemc44;rport=5060;received=77.239.128.10
> >
> > From:
> > <sip:0289089500 at 10.39.1.16:5060
> ;user=phone>;tag=SDml08d01--45026-1f4d3a5-203bbf09-1f4d3a5
> >
> > To:
> > <sip:0698962030 at 10.39.6.207:5060
> ;user=phone>;tag=4471d251144740103ef2d5e5631bdc66.799c
> >
> > Call-ID: SDml08d01-daae53b1c06b7367e53d68ad67a63d13-ao92061
> >
> > CSeq: 1 INVITE
> >
> > Server: Kamailio (1.4.4-notls (x86_64/linux))
> >
> > Content-Length: 0
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ACK sip:0698962030 at 79.12.254.153:5060;user=phone SIP/2.0
> >
> > Via: SIP/2.0/UDP
> > 77.239.128.10:5060
> ;branch=z9hG4bKf89p48m8dkuco1tumbnfaemc44;rport=5060;received=77.239.128.10
> >
> > From:
> > <sip:0289089500 at 10.39.1.16:5060
> ;user=phone>;tag=SDml08d01--45026-1f4d3a5-203bbf09-1f4d3a5
> >
> > To:
> > <sip:0698962030 at 10.39.6.207:5060
> ;user=phone>;tag=4471d251144740103ef2d5e5631bdc66.799c
> >
> > Call-ID: SDml08d01-daae53b1c06b7367e53d68ad67a63d13-ao92061
> >
> > CSeq: 1 ACK
> >
> > Max-Forwards: 69
> >
> > Content-Length: 0
> >
> >
> >
> >
> >
> >
> > INVITE sip:0698962030 at 79.12.254.153:5060;user=phone SIP/2.0
> >
> > Via: SIP/2.0/UDP 77.239.128.10:5060
> ;branch=z9hG4bK4t5g11q75ccl8k5vnbgabnlct2
> >
> > From:
> > <sip:026683011 at 10.39.1.16:5060
> ;user=phone>;tag=SDa7sn401--45026-1f4d3ad-69943699-1f4d3ad
> >
> > To: <sip:0698962030 at 10.39.6.207:5060;user=phone>
> >
> > Call-ID: SDa7sn401-c505e58e02da5e4449475a8d28dbcb07-ao92061
> >
> > CSeq: 1 INVITE
> >
> > User-Agent: CS2000_NGSS/8.0
> >
> > Remote-Party-ID: <sip:026683011 at 10.39.1.16;user=phone>; party=calling;
> > privacy=off; screen=yes
> >
> > Allow: ACK,BYE,CANCEL,INVITE,OPTIONS,INFO,SUBSCRIBE,REFER,NOTIFY,PRACK
> >
> > P-Asserted-Identity: <sip:026683011 at 10.39.1.16;user=phone>
> >
> > Max-Forwards: 69
> >
> > Contact: <sip:77.239.128.10:5060;transport=UDP>
> >
> > Supported: 100rel
> >
> > Content-Type: application/sdp
> >
> > Content-Length: 236
> >
> >
> >
> > v=0
> >
> > o=PVG 1305215458700 1305215458700 IN IP4 77.239.128.10
> >
> > s=-
> >
> > p=+1 6135555555
> >
> > c=IN IP4 77.239.128.10
> >
> > t=0 0
> >
> > m=audio 41892 RTP/AVP 18 8 0 13 101
> >
> > a=rtpmap:101 telephone-event/8000
> >
> > a=fmtp:101 0-15
> >
> > a=ptime:20
> >
> > a=fmtp:18 annexb=no
> >
> >
> >
> >
> >
> >
> >
> > SIP/2.0 403 Proxy forbidden
> >
> > Via: SIP/2.0/UDP
> > 77.239.128.10:5060
> ;branch=z9hG4bK4t5g11q75ccl8k5vnbgabnlct2;rport=5060;received=77.239.128.10
> >
> > From:
> > <sip:026683011 at 10.39.1.16:5060
> ;user=phone>;tag=SDa7sn401--45026-1f4d3ad-69943699-1f4d3ad
> >
> > To:
> > <sip:0698962030 at 10.39.6.207:5060
> ;user=phone>;tag=4471d251144740103ef2d5e5631bdc66.fe6e
> >
> > Call-ID: SDa7sn401-c505e58e02da5e4449475a8d28dbcb07-ao92061
> >
> > CSeq: 1 INVITE
> >
> > Server: Kamailio (1.4.4-notls (x86_64/linux))
> >
> > Content-Length: 0
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > sip:0698962030 at 79.12.254.153:5060;user=phone SIP/2.0
> >
> > Via: SIP/2.0/UDP
> > 77.239.128.10:5060
> ;branch=z9hG4bK4t5g11q75ccl8k5vnbgabnlct2;rport=5060;received=77.239.128.10
> >
> > From:
> > <sip:026683011 at 10.39.1.16:5060
> ;user=phone>;tag=SDa7sn401--45026-1f4d3ad-69943699-1f4d3ad
> >
> > To:
> > <sip:0698962030 at 10.39.6.207:5060
> ;user=phone>;tag=4471d251144740103ef2d5e5631bdc66.fe6e
> >
> > Call-ID: SDa7sn401-c505e58e02da5e4449475a8d28dbcb07-ao92061
> >
> > CSeq: 1 ACK
> >
> > Max-Forwards: 69
> >
> > Content-Length: 0
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> > sr-users at 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 at 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 at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>


-- 
Carsten Bock
http://www.ng-voice.com
mailto:carsten at ng-voice.com

Schomburgstr. 80
22767 Hamburg
Germany

Mobile +49 179 2021244
Office +49 40 34927219
Fax +49 40 34927220
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110519/a8f88851/attachment-0001.htm>


More information about the sr-users mailing list