We have setup Kamailio front and SIP Proxy, Now i want to Trunk it with other SIP provide they gave me IP, Username/Password. How do i configure username/password on Kamailio SIP Proxy?
Use UAC module for this 20.08.2014 7:40 пользователь "Satish Patel" satish.txt@gmail.com написал:
Hi,
We are using Kamailio as a WebRTC proxy. We have converted the signaling successfully.
Now, for media, is it possible to convert srtp to rtp using rtpproxy_ng or mediaproxy? If yes can you provide me with some details?
Thanks in advanced! Sent from my “contract free” BlackBerry® smartphone on the WIND network.
-----Original Message----- From: Yuriy Gorlichenko ovoshlook@gmail.com Sender: sr-users-bounces@lists.sip-router.org Date: Wed, 20 Aug 2014 08:33:48 To: Kamailio (SER) - Users Mailing Listsr-users@lists.sip-router.org Reply-To: "Kamailio (SER) - Users Mailing List" sr-users@lists.sip-router.org Subject: Re: [SR-Users] SIP Trunk
_______________________________________________ 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
Use rtpengine for this. You may use rtpproxy-ng module to manipulate options of rtpengine. 20.08.2014 11:07 пользователь dodul@live.com написал:
Great! I registered remote Trunk using UAC module. so now i can just use following function to forward my call right?
rewritehost()
On Wed, Aug 20, 2014 at 12:33 AM, Yuriy Gorlichenko ovoshlook@gmail.com wrote:
You can use t_relay() too. One thing that you need - to have right packet, that will be relays to Provider. I have multiple providers and manually change packets that will send to provider.
2014-08-20 15:57 GMT+04:00 Satish Patel satish.txt@gmail.com:
I am new in Kamailio so could you please give me code example how to use t_relay() to forward traffic to Provide, I know how to use rewritehost() but i never use t_relay() function
On Wed, Aug 20, 2014 at 8:22 AM, Yuriy Gorlichenko ovoshlook@gmail.com wrote:
My example don`t help you. you must read about t_relay there.
t_relay() is not central thing. I must stop your attension at SIP invite that goes to provider. t_relay simple to use- just customise your INVITE and call t_relay() from your route.
http://kamailio.org/docs/modules/devel/modules/tm.html
2014-08-20 16:54 GMT+04:00 Satish Patel satish.txt@gmail.com:
On Wednesday 20 August 2014 14:54:42 Satish Patel wrote:
Well, my guess is your routing ends with t_relay().
But routing will normally be done based on $ru unless $du is set (after for example location()). http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#ru_-_request_ur... http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#du_- _destination_uri
So changing destination can be accomplished by simply setting $rd to an other ip/domain (and setting $du=null). But TIMTOWTDI.
This is what i did but its not working, getting error SIP/2.0 403 Forbidden, it is thinking number i am dialing is local and checking in local DB . by the way SIP provider Trunk is already registered using UAC module. I am using Multi-domain setup.
# do lookup with method filtering if (!lookup("location","m")) { if (!db_does_uri_exist()) {
if ( $rU =~ "sip:1[0-9]@*") { t_relay("65.xxx.xxx.xxx:5065"); xlog("Redirecting to SIP Provider... $rU\n"); exit; };
On Wed, Aug 20, 2014 at 10:04 AM, Daniel Tryba daniel@pocos.nl wrote:
On Thursday 21 August 2014 05:56:46 Satish Patel wrote:
if ( $rU =~ "sip:1[0-9]@*") {
Try $ru instead, $rU only contains the dialled "number". So $ru =~ "sip:1[0-9]@*" or $rU =~ "1[0-9]"
But note the regexp, that only matches the exact numbers 10 to 19, if you are trying to match prefixes you are doing it wrong (tm).
I will give it a try again today, can you please make sure my t_relay() syntax is correct?
So t_relay will rewrite my host past right and send call to trunk.
While ago I was using rewritehost() function but I think it's not working with UAC registrant module.
Sent from my iPhone
On Aug 21, 2014, at 3:53 AM, Daniel Tryba daniel@pocos.nl wrote:
rewritehost() sucessfully work with UAC. But As I know 1) It statless function 2) It read only string argumetns, and do not read variables
2014-08-21 14:43 GMT+04:00 Satish Patel satish.txt@gmail.com:
I have tried following rule but somehow opensips challenging it from authentication
route[3]{
if ( $ru =~ "^sip:011[0-9]*@") { rewritehostport("65.65.65.65:5065"); xlog("Redirecting to SIP Provider... $ru\n"); exit; }; }
U 198.198.198.198:56186 -> 182.182.182.182:5060 INVITE sip:0116663332222@sip.a1routes.com SIP/2.0. Via: SIP/2.0/UDP 198.198.198.198:56186 ;branch=z9hG4bK-524287-1---cf509553a10c6e60;rport. Max-Forwards: 70. Contact: sip:1001@198.198.198.198:56186;transport=UDP. To: sip:0116663332222@sip.a1routes.com. From: "1001"sip:1001@sip.a1routes.com;tag=3894f90f. Call-ID: rcKLOO3Z1CXYS2EtiCLt3w... CSeq: 1 INVITE. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, SUBSCRIBE. Content-Type: application/sdp. Supported: replaces, norefersub. User-Agent: SessionTalk Version 4.52. Content-Length: 334. . v=0. o=- 1408648022732773 1408648022732773 IN IP4 10.199.232.27. s=-. c=IN IP4 10.199.232.27. t=0 0. m=audio 4004 RTP/AVP 3 102 0 8 9 101. a=rtpmap:3 GSM/8000. a=rtpmap:102 iLBC/8000. a=fmtp:102 mode=30. a=rtpmap:0 PCMU/8000. a=rtpmap:8 PCMA/8000. a=rtpmap:9 G722/8000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-15. a=sendrecv.
# U 182.182.182.182:5060 -> 198.198.198.198:56186 SIP/2.0 407 Proxy Authentication Required. Via: SIP/2.0/UDP 198.198.198.198:56186 ;received=198.198.198.198;branch=z9hG4bK-524287-1---cf509553a10c6e60;rport=56186. To: <sip:0116663332222@sip.a1routes.com
;tag=c223d9b6a566b5450d01aad8764c61fe.1e68.
From: "1001"sip:1001@sip.a1routes.com;tag=3894f90f. Call-ID: rcKLOO3Z1CXYS2EtiCLt3w... CSeq: 1 INVITE. Proxy-Authenticate: Digest realm="sip.a1routes.com", nonce="53f6436f0000009672b0aa913a92b9afaecefe5810253453". Server: OpenSIPS (1.11.2-tls (x86_64/linux)). Content-Length: 0. .
On Thu, Aug 21, 2014 at 7:37 AM, Yuriy Gorlichenko ovoshlook@gmail.com wrote: