Sorry if I repeat myself - I just subscribed properly to the list:
if you don't need to change it back for replies and next requests, try:
$td = "xyz.com";
IIRC, that is available on 3.2.x. If not, either you upgrade or use replace functions from textops.
Cheers, Daniel
Thank you for replying. We tried the direct assignment of $td="xyz.com" but the variable doesn't change. We are doing an xlog print right after and an ngrep and we confirmed that the domain part of the URI doesn't change. I also tried a subst() and it's the same problem. I read on the online documentation that the variable is read-only and I figured it can't be changed through these methods. That's why I tried uac_replace_to().
To sum it up, is that variable read-only or not ?
Let me also explain a bit what I'm trying to fix through this method.
We have an Asterisk box that forwards call through kamailio to one of our carriers. That works great. The calls are being forwarded with a To of: 5551112222@kamail1.domain.com towards our carrier
We also added another kamailio 'load-balancer' (using dispatch module ) box in the middle of all this to try and eventually load balance the calls. So the setup looks like this: Asterisk -> Kamailio Load Balancer -> Kamailio gateway -> Carrier. The problem with this setup is that now our carrier doesn't accept the calls and returns a 500 - Internal error message. The only difference I saw is that the To in the packets now look like this: 5551112222@kamail-load-balance.domain.com
I'm thinking the carrier is blocking us based on not recognizing the domain part in the URI and that's why I'm trying to change it. Does it make sense ?
Quoting qmail@polarismail.com:
Sorry if I repeat myself - I just subscribed properly to the list:
if you don't need to change it back for replies and next requests, try:
$td = "xyz.com";
IIRC, that is available on 3.2.x. If not, either you upgrade or use replace functions from textops.
Cheers, Daniel
Thank you for replying. We tried the direct assignment of $td="xyz.com" but the variable doesn't change. We are doing an xlog print right after and an ngrep and we confirmed that the domain part of the URI doesn't change. I also tried a subst() and it's the same problem. I read on the online documentation that the variable is read-only and I figured it can't be changed through these methods. That's why I tried uac_replace_to().
To sum it up, is that variable read-only or not ?
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
http://kamailio.org/docs/modules/3.2.x/modules_k/textops.html#id2495808 I use this subst("/^To:.*$/To: $var(new_to)\r/i") where $var(new_to) is a new value of the "To" header and it works fine on kamailio-3.2.4
Sorry if I repeat myself - I just subscribed properly to the list:
if you don't need to change it back for replies and next requests, try:
$td = "xyz.com";
IIRC, that is available on 3.2.x. If not, either you upgrade or use replace functions from textops.
Cheers, Daniel
Thank you for replying. We tried the direct assignment of $td="xyz.com" but the variable doesn't change. We are doing an xlog print right after and an ngrep and we confirmed that the domain part of the URI doesn't change. I also tried a subst() and it's the same problem. I read on the online documentation that the variable is read-only and I figured it can't be changed through these methods. That's why I tried uac_replace_to().
To sum it up, is that variable read-only or not ?
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
Changes are not immediately visible, this is the internal design from the time of SER back in 2001 -- I made a FAQ entry with more details:
- http://www.kamailio.org/wiki/tutorials/faq/main#why_changes_made_to_headers_...
In short, you have to use msg_apply_changes() function after changing headers.
Cheers, Daniel
On 4/5/13 10:35 PM, Vitaliy Aleksandrov wrote:
http://kamailio.org/docs/modules/3.2.x/modules_k/textops.html#id2495808 I use this subst("/^To:.*$/To: $var(new_to)\r/i") where $var(new_to) is a new value of the "To" header and it works fine on kamailio-3.2.4
Sorry if I repeat myself - I just subscribed properly to the list:
if you don't need to change it back for replies and next requests, try:
$td = "xyz.com";
IIRC, that is available on 3.2.x. If not, either you upgrade or use replace functions from textops.
Cheers, Daniel
Thank you for replying. We tried the direct assignment of $td="xyz.com" but the variable doesn't change. We are doing an xlog print right after and an ngrep and we confirmed that the domain part of the URI doesn't change. I also tried a subst() and it's the same problem. I read on the online documentation that the variable is read-only and I figured it can't be changed through these methods. That's why I tried uac_replace_to().
To sum it up, is that variable read-only or not ?
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
Mersi mult Daniel! It worked but unfortunately it didn't fix the issue.
As I mentioned previously the original setup is like this:
Asterisk -> Kamailio gateway -> carrier. All calls go through just fine
The new setup we are trying is:
Asterisk -> Kamailio load balancer ( dispatch module ) -> Kamailio gateway -> carrier
With this setup the calls come back from the carrier with 500 - Internal error
I've looked at the SIP packets in both cases and they look similar. The only difference is that when going through the load balancer the To is different ( fixed now ) and it has 3 more VIA lines in the header. Where can I start looking at what's causing this ?
Thank you!
Quoting Daniel-Constantin Mierla miconda@gmail.com:
Changes are not immediately visible, this is the internal design from the time of SER back in 2001 -- I made a FAQ entry with more details:
http://www.kamailio.org/wiki/tutorials/faq/main#why_changes_made_to_headers_...
In short, you have to use msg_apply_changes() function after changing headers.
Cheers, Daniel
On 4/5/13 10:35 PM, Vitaliy Aleksandrov wrote:
http://kamailio.org/docs/modules/3.2.x/modules_k/textops.html#id2495808 I use this subst("/^To:.*$/To: $var(new_to)\r/i") where $var(new_to) is a new value of the "To" header and it works fine on kamailio-3.2.4
Sorry if I repeat myself - I just subscribed properly to the list:
if you don't need to change it back for replies and next requests, try:
$td = "xyz.com";
IIRC, that is available on 3.2.x. If not, either you upgrade or use replace functions from textops.
Cheers, Daniel
Thank you for replying. We tried the direct assignment of $td="xyz.com" but the variable doesn't change. We are doing an xlog print right after and an ngrep and we confirmed that the domain part of the URI doesn't change. I also tried a subst() and it's the same problem. I read on the online documentation that the variable is read-only and I figured it can't be changed through these methods. That's why I tried uac_replace_to().
To sum it up, is that variable read-only or not ?
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, April 16-17, 2013, Berlin
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
Hello,
On 4/6/13 1:29 AM, qmail@polarismail.com wrote:
Mersi mult Daniel! It worked but unfortunately it didn't fix the issue.
As I mentioned previously the original setup is like this:
Asterisk -> Kamailio gateway -> carrier. All calls go through just fine
The new setup we are trying is:
Asterisk -> Kamailio load balancer ( dispatch module ) -> Kamailio gateway -> carrier
With this setup the calls come back from the carrier with 500 - Internal error
maybe if you paste the ngrep output for such messages we can spot if something is wrong.
I've looked at the SIP packets in both cases and they look similar. The only difference is that when going through the load balancer the To is different ( fixed now ) and it has 3 more VIA lines in the header. Where can I start looking at what's causing this ?
Three more via headers, added by the load balancer? That means the request is looping back two times? Have you watched the loopback interface? Sound like broken routing logic in the config.
Cheers, Daniel
Thank you!
Quoting Daniel-Constantin Mierla miconda@gmail.com:
Changes are not immediately visible, this is the internal design from the time of SER back in 2001 -- I made a FAQ entry with more details:
http://www.kamailio.org/wiki/tutorials/faq/main#why_changes_made_to_headers_...
In short, you have to use msg_apply_changes() function after changing headers.
Cheers, Daniel
On 4/5/13 10:35 PM, Vitaliy Aleksandrov wrote:
http://kamailio.org/docs/modules/3.2.x/modules_k/textops.html#id2495808 I use this subst("/^To:.*$/To: $var(new_to)\r/i") where $var(new_to) is a new value of the "To" header and it works fine on kamailio-3.2.4
Sorry if I repeat myself - I just subscribed properly to the list:
if you don't need to change it back for replies and next requests, try:
$td = "xyz.com";
IIRC, that is available on 3.2.x. If not, either you upgrade or use replace functions from textops.
Cheers, Daniel
Thank you for replying. We tried the direct assignment of $td="xyz.com" but the variable doesn't change. We are doing an xlog print right after and an ngrep and we confirmed that the domain part of the URI doesn't change. I also tried a subst() and it's the same problem. I read on the online documentation that the variable is read-only and I figured it can't be changed through these methods. That's why I tried uac_replace_to().
To sum it up, is that variable read-only or not ?
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, April 16-17, 2013, Berlin
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