Hi!
Description of the problem:
The some UA can send only IP addresses as domains.
Some subscribers incorrectly configure their UA and as a result as the
domain IP of SIP Proxy comes.
In result in the table location the part of subscribers has the
symbolical domain (voapp.ru) and part - IP address of SIP Proxy
(62.33.22.14)
It leads to to the certain complexities in switching incming calls.
The problem disappears if to tell:
modparam("usrloc", "use_domain", 0)
modparam("registrar", "use_domain", 0)
And use only names without domains.
But in our case it does not approach since we have some independent
domains.
I tried to rewrite fields From and To
route(8);
save("location");
route[8] {
#correct From and To in REGISTER messages with IP address instead of
domain name
if (search("From:.*@[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+.*") or
search("To:.*@[0-9+\.[0-9]+\.[0-9]+\.[0-9]+.*")) {
subst("/^From:(.*)sip:(.*)@([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(.*)/Fr
om:\1sip:\2@voapp.ru\7/i");
subst("/^To:(.*)sip:(.*)@([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(.*)/To:\
1sip:\2@voapp.ru\7/i");
xlog("L_ERR", "REGISTER From To done\n");
return(-1);
};
return(1);
}
Fields varied but function save took their not changed values from
initial message.
After that I have tried to send REGISTER message once again to myself
for processing:
if (!route(8)) {
t_relay();
} else {
save("location");
};
In this case in the location table there was a record with the corrected
name of the domain.
But in Contact field there was an address of SIP Proxy server instead of
address of UA.
Can anybody prompt idea how to to change domain in From To fields at
reception of REGISTER message?
Tnx.
How to change domain when REGISTERing UA?
Hi!
Description of the problem:
The some UA can send only IP addresses as domains.
Some subscribers incorrectly configure their UA and as a result as the
domain IP of SIP Proxy comes.
In result in the table location the part of subscribers has the
symbolical domain (voapp.ru) and part - IP address of SIP Proxy
(62.33.22.14)
It leads to to the certain complexities in switching incming calls.
The problem disappears if to tell:
modparam("usrloc", "use_domain", 0)
modparam("registrar", "use_domain", 0)
And use only names without domains.
But in our case it does not approach since we have some independent
domains.
I tried to rewrite fields From and To
route(8);
save("location");
route[8] {
#correct From and To in REGISTER messages with IP address instead of
domain name
if (search("From:.*@[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+.*") or
search("To:.*@[0-9+\.[0-9]+\.[0-9]+\.[0-9]+.*")) {
subst("/^From:(.*)sip:(.*)@([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(.*)/Fr
om:\1sip:\2@voapp.ru\7/i");
subst("/^To:(.*)sip:(.*)@([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(.*)/To:\
1sip:\2@voapp.ru\7/i");
xlog("L_ERR", "REGISTER From To done\n");
return(-1);
};
return(1);
}
Fields varied but function save took their not changed values from
initial message.
After that I have tried to send REGISTER message once again to myself
for processing:
if (!route(8)) {
t_relay();
} else {
save("location");
};
In this case in the location table there was a record with the corrected
name of the domain.
But in Contact field there was an address of SIP Proxy server instead of
address of UA.
Can anybody prompt idea how to to change domain in From To fields at
reception of REGISTER message?
Tnx.
Dmitry