Hi Daniel,
Thanks for your response. But I don't want the IP in the received parameter of the incoming request.
Instead, I want to read it (i.e. the public IP address of my own network where the local user and Kamailio are located) from the incoming response received from another proxy located outside the network. And I need that because Kamailio strips the top most via (where the received parameter is present ) in the incoming response before sending it back to the local user, which I guess is correct. But the user needs to know that IP address. So we are planning to send that IP address in a custom header in the response back to the user.
After going through some Kamailio documents I found that $sel(via.received) would return the IP address in top most via of a message. Can I store it in a variable inside onreply_route[MANAGE_REPLY] block and use that variable later in some appropriate route block to insert a new header in the response to the local user?
Can I do something as given below to fetch and store the IP address from received parameter in the via header of incoming response
onreply_route[MANAGE_REPLY] {
...
if(search_hf("Via", "received", "f")) {
xdbg("received param exists on top most via header \n");
$var(public_ip) = $sel(via.received);
}
...
}
and insert a new header as given below in an appropriate route block which is executed while sending response back?
append_hf("My-custom-hdr: $var(public_ip) \r\n");
I am not sure if this logic would work. Is the $var() variable retained through two different sip transactions? And which route block should be used to insert the header as mentioned above? Please help.
Thanks,
Ajay
Hello,
the received parameter is constructed from source IP of the incoming request. You get it via $si script variable.
Cheers,
Daniel
On 3/12/13 7:22 PM, Ajay Sabat wrote:
>
> Hi,
>
> I want to extract the IP address in the received parameter of the top
> most via header of a response and use that in a custom header while
> sending response back to the caller. Can somebody please tell how to
> implement that in the Kamailio configuration file?
>
> I need to handle a NAT traversal scenario without enabling NAT in
> Kamailio which is used as the proxy server. The caller which is in the
> same network as Kamailio first sends a OPTIONS request to the callee
> before sending the INVITE. It uses the public IP address returned in
> the custom header of the OPTIONS response to build the contact header
> and SDP of the INVITE request. In fact, it first looks for the IP
> address in the received parameter of the via header to do that. But
> Kamailio removes the top most via with received parameter and then
> sends the OPTIONS response back to the caller. So we are using a
> custom header for that purpose.
>
> I would appreciate other suggestions to achieve this in Kamailio, may
> be by enabling NAT or some other alternative.
>
> Thanks,
>
> Ajay
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
> list sr-users(a)lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
- http://conference.kamailio.com -
Hello,
I want to separate signaling and media in our architecture but I'm not entirely sure if the following will work (note that it is still in a design phase and these kinds of constructs are still new to me):
User Agent 1-------------- Kamailio -------------- User Agent 2
| |
| |
| |
-------------- Media Server Cluster --------------
The signaling will go through Kamailio but the media stream should pass through one of the media servers in the cluster for each call.
Is it possible to achieve this by having Kamailio instruct the media server which ports to open and alter sdp information?
I think that the RTP Proxy module does precisely this, but what I still don't understand is how the rtp stream is passed between these two agents for each call.
Also, is RTP proxy the best way to do this or are there any other third party media servers which I could use? I don't need any fancy functionality, just basic media handling/pass-through.
Regards,
Grant
Hi,
I have a kamailio proxy server that´s controlling the limit of calls that
clients can make with profile grouping. In other side I also limit clients
call duration base on users credit ( DATABASE) and *timeout *feature .
Before the calls get answer I calculate how much time the client has left
for this call and set the timeout variable. When the time is reached the
proxy sends BYEs two both sides of this call.
I want when the call timeout, as before explain, all other calls in the
same profile end too, because the client has expired his credit.
Is there a way to achieve this?
Regards,
Camila
*Camila Troncoso **|* Ingeniero de Desarrollo
RedVoiss *|*ctroncoso(a)redvoiss.net
Santiago - Chile *|* +56 2 2408535
www.redvoiss.net
Dear Sir,
I want to authenticate users as well as getting buddy list from
kamailio using java .Is there any existing library already in place.
Rupayan Dutta
Hi,
I want to extract the IP address in the received parameter of the top most via header of a response and use that in a custom header while sending response back to the caller. Can somebody please tell how to implement that in the Kamailio configuration file?
I need to handle a NAT traversal scenario without enabling NAT in Kamailio which is used as the proxy server. The caller which is in the same network as Kamailio first sends a OPTIONS request to the callee before sending the INVITE. It uses the public IP address returned in the custom header of the OPTIONS response to build the contact header and SDP of the INVITE request. In fact, it first looks for the IP address in the received parameter of the via header to do that. But Kamailio removes the top most via with received parameter and then sends the OPTIONS response back to the caller. So we are using a custom header for that purpose.
I would appreciate other suggestions to achieve this in Kamailio, may be by enabling NAT or some other alternative.
Thanks,
Ajay
Hi all,
We are testing 4.0.0 in the lab and since upgrading, PUBLISHes generated by
pua_dialoginfo appear to be malformed (content-length mismatch).
Please see attached output from Wireshark for both the PUBLISH and the 400
response from Kamailio. PUBLISH is being sent from one Kamailio to another
- nothing has changed other than upgrading from 3.3.3 to 4.0.0.
Has anyone else noticed the same?
Regards,
Charles
--
www.sipcentric.com
Follow us on twitter @sipcentric <http://twitter.com/sipcentric>
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered
office: Unit 10 iBIC, Birmingham Science Park, Holt Court South, Birmingham
B7 4EJ.
Hi
I did setup carrierroute with failover using t_on_failure, I do have 4 ".25
ratio" primary gateways for one carrier and 4 ".25 ratio"secondary gateways
for a secondary carrier. However, given the current setup, if one gateway
is down carrieroute does use the secondary carrier if one gateway of the
primary carrier is down.
What I need is to only go to the secondary carrier if all the gateways of
the primary carrier are down. I thought of setting up 4 t_on_failure
branches with carrierroute but that will be troublesome to maintain.
Is there another method for this ?
Regards
Hi, What would be the community's architecture advice for deploying Kamailio in a high availability environment? I am looking for something simple, still efficient. Thanks,
Hello everyone,
I am new to this list and I am a newbie when it comes to Kamailio details, so sorry for any of my misunderstandings. I am the author of kamailio3 package in OpenWrt and currently I am trying to port recent major release of kamailio to OpenWrt. Let's jump directly to my question.
The current state of my Kamailio4 package is that all modules which does not depend on any external libraries, are succesfully built. Any module that depends on external library is not built at all.
But if I pass LD="$(TARGET_CC)" to the linker via:
make -C/path/to/module LD="$(TARGET_CC)"
then the module is succesfully compiled. I build kamailio4 via macro Build/Compile in following Makefile - http://liptel.vsb.cz/svn/besip/Trunk/packages-trunk/net/kamailio4/Makefile
My question is - has anything changed in build procedures or variables significantly? It seems that LD variable is not passed into Makefiles of specific modules. Am I doing anything wrong?
I am open to any suggestions.
Thank you!
~ Jiri Slachta
---------- Forwarded Message ----------
Subject: Re: memcached module problems
Date: Dienstag, 12. März 2013, 14:50:41
From: Dragos Oancea <droancea(a)yahoo.com>
To: Bis: Henning Westerholt <henning.westerholt(a)1und1.de>
Thank you Henning, that was a good hint.
I've noticed that kamailio and my perl script (which is
using Cache::Memcached) set the value in memcached somehow differently.
kamailio:
set 888_HA1 1 10800 32.
6fa22552ea04d443ab5864a7b3c2168c.
perl script:
set 888_HA1 0 0 32.
6fa22552ea04d443ab5864a7b3c2168c.
VAR_VAL_STR is 1.
I will investigate further.
Regards,
Dragos
ps: I will also subscribe to sr-users .
From: Henning Westerholt <henning.westerholt(a)1und1.de>
To: Dragos Oancea <droancea(a)yahoo.com>
Cc: Kamailio (SER) - Users Mailing List <sr-users(a)lists.sip-router.org>
Sent: Tuesday, March 12, 2013 9:35 AM
Subject: RE: memcached module problems
Hi Dragos,
(setting sr-users to CC)
Ok, If you’ve set this by other means you need to set the appropriate
“Kamailio” type flag to the value as well, that Kamailio can parse it
correctly. You can get the appropriate value if you grep for “VAR_VAL_STR” in
the source code.
Your perl script function call should also export the appropriate flag setting
from the memcache library function call, then just add it here.
Best regards,
Henning
From: Dragos Oancea [mailto:droancea@yahoo.com]
Sent: Monday, March 11, 2013 8:24 PM
To: Henning Westerholt
Subject: Re: memcached and other things
Hi Henning,
Other means. a perl script.
Dragos
> 0(21130) DEBUG: memcached [mcd_var.c:87]: allocate new memcache request at
> 0x7f747fb798f0
> 0(21130) DEBUG: memcached [mcd_var.c:93]: allocate new
> memcache result at 0x7f747fb79a70 0(21130)
> DEBUG: memcached [mcd_var.c:103]: result: 'just_A_text' for key 888_HA1 with
> flag 0
> 0(21130) ERROR: memcached [mcd_var.c:146]: could not convert string
> 'just_A_text' to integer value
> 0(21130) DEBUG: memcached [mcd_var.c:159]: free memcache request and result
> at 0x7f747fb798f0
The issue is that the module somehow does not evaluate the string variable
_from memcached_ as a string, it tries to evaluate it as integer. This
obviously fails.
Has this value set from kamailio or is this from some external application?
Then probably this application does not set the proper flags which kamailio
expects.
Regards,
Henning Westerholt
-------------------------------------------------------------