Hi Jerome!
As your config and the log messages seems to be correct, you should debug on the network and verify which SIP messages are sent to which location. You can use tcpdump/wireshark or the simple (my preferred choice) ngrep tool.
1. install ngrep apt-get install ngrep
2. capture the SIP traffic ngrep -d any -W byline -t -q -P "" port 5060
-d any: sniff on every interface (sometimes messages get lopped via the loopback interface, using -d any shows you alos the looped messages). -W byline: nice line-break -t: timestamp -q: quiet mode -P "": replace non printable charcaters with "" (e.g. CR LF) finally the capture filter: port 5060
Start ngrep on the server where openser is installed and then compare the signalling of a successful call (sip:number@pabx-alcatel.example.com) with an unsuccessful call.
Once that work, it should be possible to solve the other direction too, e.g. by defining a trunk on the PABX and route certain extensions, e.g. 390abc to the SIP proxy. Then openser can do the mapping of the address and forwarding of the call.
btw: openser 1.3 is rather old. Using Kamailio 3.0 gives you much more flexibility when writing the configuration. Anyway, using 1.3 should work too, you setup is rather simple, and is for sure not the cause of your problem.
regards klaus
Am 18.05.2010 05:22, schrieb alet@librelogiciel.com:
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@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
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