Hi,
First I'm a complete SIP newbie.
We've purchased a new pabx which is a complete piece of crap (Alcatel
OmniPCX OXO) : no LDAP support, no registrar functionnality, and so
on... and it seems there's no way to upgrade.
This pabx is on a subnet different from the one used by desktop
computers.
What I'd like to achieve is to be able to install SIP soft phones onto
desktop computers (like ekiga for example), allow them to call all
non-IP phones already configured in the pabx, and be called by any
non-IP phone through the pabx.
Since the pabx doesn't have a registrar mode, it can't associate IP
addresses with phone numbers. So in ekiga, I can configure the pabx as a
SIP proxy, and my ekiga can call any normal (non-IP) phone connected to
the pabx. This works fine, but is only one half of what I want, since I
want these SIP phones to be callable from non-IP phones.
Enters openser, which I plan to use as a registrar and router.
So I've installed openser 1.3.2 onto a Debian Squeeze box. I can
successfully register SIP soft phones to it, and they can call each
other just fine calling (number(a)sip.example.com). This openser box is on
the same subnet as the Alcatel pabx (so different from the one used by
SIP soft phones).
All our "normal" phone numbers are 6 digits long and begin with 290,
so I want to route all call numbers beginning with "290" to the Alcatel
pabx.
So I've modified the default openser.cfg to contain :
--- CUT ---
port=5060
listen=udp:10.125.0.1:5060
...
route {
...
if (is_method("INVITE")) {
setflag(1);
if (uri=~"sip:290[0-9]{3}@sip.example.com") {
xlog("#### CALL TO NON-IP PHONE ####\n");
route(2);
}
}
...
}
...
# route[1] was in original openser.cfg
route[1] {
# for INVITEs enable some additional helper routes
if (is_method("INVITE")) {
t_on_branch("2");
t_on_reply("2");
t_on_failure("1");
}
if (!t_relay()) {
sl_reply_error();
};
exit;
}
#
# I've added the following
route[2] {
rewritehostport("pabx-alcatel.example.com:5060");
xlog("#### Server and port rewritten ####\n");
route(1);
}...
--- CUT ---
Now in ekiga if I dial sip:number@pabx-alcatel.example.com:5060 it works
fine as it always did, because this call is direct.
However if I dial sip:number@sip.example.com:5060 the host and port in
URL are correctly rewritten in sip:number@pabx-alcatel.example.com:5060
but nothing happens : the call doesn't ring and fails immediately.
In the logs when dialing sip:290081@sip.example.com:5060 I've got this,
so I suppose it *SHOULD* work :
--- CUT ---
/usr/sbin/openser[759]: #### CALL TO NON-IP PHONE ####
/usr/sbin/openser[759]: #### Server and port rewritten ####
/usr/sbin/openser[759]: new branch at sip:290081@pabx-alcatel.example.com:5060
/usr/sbin/openser[760]: incoming reply
/usr/sbin/openser[758]: incoming reply
--- CUT ---
but it doesn't work as expected.
any idea why ?
NB : I understand this would only solve half of my problem, the other
part will be solved (I hope) with the help of the guy who installed the
pabx.
Thanks in advance
Jerome Alet