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
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
2010/5/18 Klaus Darilion klaus.mailinglists@pernau.at:
- install ngrep
apt-get install ngrep
- 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
Or just use ngrep-sip script:
http://dev.sipdoc.net/projects/sip-stuff/wiki/Ngrep-SIP
:)
Am 19.05.2010 13:40, schrieb Iñaki Baz Castillo:
2010/5/18 Klaus Darilionklaus.mailinglists@pernau.at:
- install ngrep
apt-get install ngrep
- 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
Or just use ngrep-sip script:
Ah, nice.
ngrep-sip proto \tcp and port 25
^^^^ What for are the back slashes needed here?
regards Klaus
Hi,
On Tue, May 18, 2010 at 09:46:09AM +0200, Klaus Darilion wrote:
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.
I've followed your instructions and I've used ngrep on the openser box.
sip.example.com <=> 10.125.0.1 pabx-alcatel.example.com <=> 10.125.0.2 my linux box with ekiga <=> 10.10.10.100 my real analog phone's number, connected to the pabx : 290081 my ekiga soft phone's number : 9888
Below is a trace of what happens :
sip:~# openserctl ul show database engine 'PGSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd ul_dump Domain:: location table=512 records=2 max_slot=1 AOR:: 9888 Contact:: sip:9888@10.10.10.100 Q=1 Expires:: 56 Callid:: 6667a393-ef61-df11-897f-002197011099@lafrime Cseq:: 25 User-agent:: Ekiga/3.2.6 State:: CS_SYNC Flags:: 0 Cflag:: 0 Socket:: udp:10.125.0.1:5060 Methods:: 22335 AOR:: alize Contact:: sip:alize@10.125.0.2;transport=UDP Q= Expires:: 1051 Callid:: 4b192ee9d1173056f4fbc3c317fb94ff@10.125.0.2 Cseq:: 1626385337 User-agent:: OxO_GW_710/115.006 State:: CS_SYNC Flags:: 0 Cflag:: 0 Socket:: udp:10.125.0.1:5060 Methods:: 0
Now I place a call from ekiga on my GNU/Linux box to my analog phone, by dialing 290081 :
sip:~# ngrep -d any -W byline -t -q -P "" port 5060
U 2010/05/20 07:11:08.471776 10.10.10.100:5060 -> 10.125.0.1:5060 INVITE sip:290081@sip.example.com SIP/2.0 Date: Wed, 19 May 2010 20:11:11 GMT CSeq: 1 INVITE Via: SIP/2.0/UDP 10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport User-Agent: Ekiga/3.2.6 From: "Jerome Alet" sip:9888@sip.example.com;tag=8c3a8756-f061-df11-897f-002197011099 Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime To: sip:290081@sip.example.com Contact: sip:9888@10.10.10.100 Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,MESSAGE,INFO,PING Content-Type: application/sdp Content-Length: 549 Max-Forwards: 70
v=0 o=- 1274299871 1 IN IP4 10.10.10.100 s=Opal SIP Session c=IN IP4 10.10.10.100 t=0 0 m=audio 5062 RTP/AVP 116 0 8 9 101 120 a=sendrecv a=rtpmap:116 Speex/16000/1 a=fmtp:116 sr=16000,mode=any a=rtpmap:0 PCMU/8000/1 a=rtpmap:8 PCMA/8000/1 a=rtpmap:9 G722/8000/1 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16,32,36 a=rtpmap:120 NSE/8000 a=fmtp:120 192-193 m=video 5064 RTP/AVP 99 31 b=AS:4096 b=TIAS:4096000 a=sendrecv a=rtpmap:99 theora/90000 a=fmtp:99 height=576;width=704 a=rtpmap:31 h261/90000 a=fmtp:31 CIF=1;QCIF=1
Here it seeems openser tells me it is trying :
U 2010/05/20 07:11:08.474968 10.125.0.1:5060 -> 10.10.10.100:5060 SIP/2.0 100 Giving a try CSeq: 1 INVITE Via: SIP/2.0/UDP 10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport=5060 From: "Jerome Alet" sip:9888@sip.example.com;tag=8c3a8756-f061-df11-897f-002197011099 Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime To: sip:290081@sip.example.com Server: OpenSER (1.3.2-notls (i386/linux)) Content-Length: 0
Now the host and port rewriting has taken place, so openser transmits the invite to the pabx :
U 2010/05/20 07:11:08.479225 10.125.0.1:5060 -> 10.125.0.2:5060 INVITE sip:290081@pabx-alcatel.example.com:5060 SIP/2.0 Record-Route: sip:10.125.0.1;lr=on Date: Wed, 19 May 2010 20:11:11 GMT CSeq: 1 INVITE Via: SIP/2.0/UDP 10.125.0.1;branch=z9hG4bK3be6.1a17aeb2.0 Via: SIP/2.0/UDP 10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport=5060 User-Agent: Ekiga/3.2.6 From: "Jerome Alet" sip:9888@sip.example.com;tag=8c3a8756-f061-df11-897f-002197011099 Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime To: sip:290081@sip.example.com Contact: sip:9888@10.10.10.100 Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,MESSAGE,INFO,PING Content-Type: application/sdp Content-Length: 549 Max-Forwards: 69
v=0 o=- 1274299871 1 IN IP4 10.10.10.100 s=Opal SIP Session c=IN IP4 10.10.10.100 t=0 0 m=audio 5062 RTP/AVP 116 0 8 9 101 120 a=sendrecv a=rtpmap:116 Speex/16000/1 a=fmtp:116 sr=16000,mode=any a=rtpmap:0 PCMU/8000/1 a=rtpmap:8 PCMA/8000/1 a=rtpmap:9 G722/8000/1 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16,32,36 a=rtpmap:120 NSE/8000 a=fmtp:120 192-193 m=video 5064 RTP/AVP 99 31 b=AS:4096 b=TIAS:4096000 a=sendrecv a=rtpmap:99 theora/90000 a=fmtp:99 height=576;width=704 a=rtpmap:31 h261/90000 a=fmtp:31 CIF=1;QCIF=1
The pabx answers it is trying :
U 2010/05/20 07:11:08.509995 10.125.0.2:5060 -> 10.125.0.1:5060 SIP/2.0 100 Trying To: sip:290081@sip.example.com From: "Jerome Alet" sip:9888@sip.example.com;tag=8c3a8756-f061-df11-897f-002197011099 Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime CSeq: 1 INVITE Via: SIP/2.0/UDP 10.125.0.1;branch=z9hG4bK3be6.1a17aeb2.0 Via: SIP/2.0/UDP 10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport=5060 Content-Length: 0
But then it says it can't find the recipient (or at least that's what I understand) :
U 2010/05/20 07:11:08.529453 10.125.0.2:5060 -> 10.125.0.1:5060 SIP/2.0 404 Not Found Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, PRACK, REFER, NOTIFY, UPDATE User-Agent: OxO_GW_710/115.006 To: sip:290081@sip.example.com;tag=3c9a6f069a4e18993408270150d6e3e6 From: "Jerome Alet" sip:9888@sip.example.com;tag=8c3a8756-f061-df11-897f-002197011099 Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime CSeq: 1 INVITE Via: SIP/2.0/UDP 10.125.0.1;branch=z9hG4bK3be6.1a17aeb2.0 Via: SIP/2.0/UDP 10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport=5060 Content-Length: 0
Then openser aknowledges :
U 2010/05/20 07:11:08.530454 10.125.0.1:5060 -> 10.125.0.2:5060 ACK sip:290081@pabx-alcatel.example.com:5060 SIP/2.0 Via: SIP/2.0/UDP 10.125.0.1;branch=z9hG4bK3be6.1a17aeb2.0 From: "Jerome Alet" sip:9888@sip.example.com;tag=8c3a8756-f061-df11-897f-002197011099 Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime To: sip:290081@sip.example.com;tag=3c9a6f069a4e18993408270150d6e3e6 CSeq: 1 ACK Max-Forwards: 70 User-Agent: OpenSER (1.3.2-notls (i386/linux)) Content-Length: 0
And then openser sends the Not Found answer back to my Ekiga :
U 2010/05/20 07:11:08.530934 10.125.0.1:5060 -> 10.10.10.100:5060 SIP/2.0 404 Not Found Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, PRACK, REFER, NOTIFY, UPDATE User-Agent: OxO_GW_710/115.006 To: sip:290081@sip.example.com;tag=3c9a6f069a4e18993408270150d6e3e6 From: "Jerome Alet" sip:9888@sip.example.com;tag=8c3a8756-f061-df11-897f-002197011099 Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime CSeq: 1 INVITE Via: SIP/2.0/UDP 10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport=5060 Content-Length: 0
And my Ekiga aknowledges :
U 2010/05/20 07:11:08.533180 10.10.10.100:5060 -> 10.125.0.1:5060 ACK sip:290081@sip.example.com SIP/2.0 CSeq: 1 ACK Via: SIP/2.0/UDP 10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport From: "Jerome Alet" sip:9888@sip.example.com;tag=8c3a8756-f061-df11-897f-002197011099 Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime To: sip:290081@sip.example.com;tag=3c9a6f069a4e18993408270150d6e3e6 Content-Length: 0 Max-Forwards: 70
What looks bizarre to me is that if from Ekiga I dial 290081@pabx-alcatel.example.com, so not passing through openser not the openser box, it works perfectly, as can be seen below (using ngrep on my GNU/Linux box) :
root@lafrime:~# ngrep -d any -W byline -t -q -P "" port 5060 interface: any filter: (ip or ip6) and ( port 5060 )
U 2010/05/20 07:34:49.070434 10.10.10.100:5060 -> 10.125.0.2:5060 INVITE sip:290081@pabx-alcatel.example.com SIP/2.0 Date: Wed, 19 May 2010 20:34:49 GMT CSeq: 1 INVITE Via: SIP/2.0/UDP 10.10.10.100:5060;branch=z9hG4bK044163a3-f361-df11-897f-002197011099;rport User-Agent: Ekiga/3.2.6 From: "Jerome Alet" sip:jerome@10.10.10.100;tag=be0f62a3-f361-df11-897f-002197011099 Call-ID: 421362a3-f361-df11-897f-002197011099@lafrime To: sip:290081@pabx-alcatel.example.com Contact: sip:jerome@10.10.10.100 Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,MESSAGE,INFO,PING Content-Type: application/sdp Content-Length: 549 Max-Forwards: 70
v=0 o=- 1274301289 1 IN IP4 10.10.10.100 s=Opal SIP Session c=IN IP4 10.10.10.100 t=0 0 m=audio 5072 RTP/AVP 116 0 8 9 101 120 a=sendrecv a=rtpmap:116 Speex/16000/1 a=fmtp:116 sr=16000,mode=any a=rtpmap:0 PCMU/8000/1 a=rtpmap:8 PCMA/8000/1 a=rtpmap:9 G722/8000/1 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16,32,36 a=rtpmap:120 NSE/8000 a=fmtp:120 192-193 m=video 5074 RTP/AVP 99 31 b=AS:4096 b=TIAS:4096000 a=sendrecv a=rtpmap:99 theora/90000 a=fmtp:99 height=576;width=704 a=rtpmap:31 h261/90000 a=fmtp:31 CIF=1;QCIF=1
So here the INVITE was sent to the pabx, and the pabx says it is trying :
U 2010/05/20 07:34:49.099009 10.125.0.2:5060 -> 10.10.10.100:5060 SIP/2.0 100 Trying To: sip:290081@pabx-alcatel.example.com From: "Jerome Alet" sip:jerome@10.10.10.100;tag=be0f62a3-f361-df11-897f-002197011099 Call-ID: 421362a3-f361-df11-897f-002197011099@lafrime CSeq: 1 INVITE Via: SIP/2.0/UDP 10.10.10.100:5060;received=10.10.10.100;branch=z9hG4bK044163a3-f361-df11-897f-002197011099;rport=5060 Content-Length: 0
And now, it seems it has found the 290081@pabx-alcatel.example.com :
U 2010/05/20 07:34:49.201710 10.125.0.2:5060 -> 10.10.10.100:5060 SIP/2.0 180 Ringing Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, PRACK, REFER, NOTIFY, UPDATE Contact: "ALET J 290081" sip:290081@10.125.0.2;user=phone Supported: from-change User-Agent: OxO_GW_710/115.006 P-Asserted-Identity: "ALET J 290081" sip:290081@example.com;user=phone To: sip:290081@pabx-alcatel.example.com;tag=51a1558a4e6ac3bf5c1819f278ae2ecc From: "Jerome Alet" sip:jerome@10.10.10.100;tag=be0f62a3-f361-df11-897f-002197011099 Call-ID: 421362a3-f361-df11-897f-002197011099@lafrime CSeq: 1 INVITE Via: SIP/2.0/UDP 10.10.10.100:5060;received=10.10.10.100;branch=z9hG4bK044163a3-f361-df11-897f-002197011099;rport=5060 Content-Length: 0
And from now on, the remaining of the "direct" call processes correctly.
The major difference I see is the "To:" header : in both cases it is equal to what was dialed, but in the former case (through openser) the INVITE and To differ. Another difference is that in the latter case it uses my name instead of the number configured in my ekiga account for the openser registrar (which seems to be normal)
Any idea what happens and what I should do to solve this problem ?
Thanks in advance
Jerome Alet
Lots of possible reasons: - different From: - different To - To and RURI differ ...
It would be interesting to verify if direct calling still works if you use a numerical username (as what happens when dialing via Openser), or the other way round, when going via the SIP proxy but in From still signal the name instead of the phone number.
Regarding RURI!=TO: Instead of rewritinghostport just rewrite the destination URI, leaving the RURI untouched: $du = "sip:pabx-alcatel.example.com:5060"; t_relay(); exit;
If still no luck, you can try setting RURI as you already did, but changing To header too. There is no nice way to do this, you have to do it manually, e.g: rewritehostport........ remove_hf("To"); append_hf("To: $tU@pabx-alcatel.example.com:5060\r\n"); ...
As 404 indicates that the target was not found, but RURIs are identical, I suspect that the PBX false uses the To header and wants its domain inside the To URI.
Regards Klaus
Am 19.05.2010 22:58, schrieb alet@librelogiciel.com:
Hi,
On Tue, May 18, 2010 at 09:46:09AM +0200, Klaus Darilion wrote:
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.
I've followed your instructions and I've used ngrep on the openser box.
sip.example.com<=> 10.125.0.1 pabx-alcatel.example.com<=> 10.125.0.2 my linux box with ekiga<=> 10.10.10.100 my real analog phone's number, connected to the pabx : 290081 my ekiga soft phone's number : 9888
Below is a trace of what happens :
sip:~# openserctl ul show database engine 'PGSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd ul_dump Domain:: location table=512 records=2 max_slot=1 AOR:: 9888 Contact:: sip:9888@10.10.10.100 Q=1 Expires:: 56 Callid:: 6667a393-ef61-df11-897f-002197011099@lafrime Cseq:: 25 User-agent:: Ekiga/3.2.6 State:: CS_SYNC Flags:: 0 Cflag:: 0 Socket:: udp:10.125.0.1:5060 Methods:: 22335 AOR:: alize Contact:: sip:alize@10.125.0.2;transport=UDP Q= Expires:: 1051 Callid:: 4b192ee9d1173056f4fbc3c317fb94ff@10.125.0.2 Cseq:: 1626385337 User-agent:: OxO_GW_710/115.006 State:: CS_SYNC Flags:: 0 Cflag:: 0 Socket:: udp:10.125.0.1:5060 Methods:: 0
Now I place a call from ekiga on my GNU/Linux box to my analog phone, by dialing 290081 :
sip:~# ngrep -d any -W byline -t -q -P "" port 5060
U 2010/05/20 07:11:08.471776 10.10.10.100:5060 -> 10.125.0.1:5060 INVITE sip:290081@sip.example.com SIP/2.0 Date: Wed, 19 May 2010 20:11:11 GMT CSeq: 1 INVITE Via: SIP/2.0/UDP 10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport User-Agent: Ekiga/3.2.6 From: "Jerome Alet"sip:9888@sip.example.com;tag=8c3a8756-f061-df11-897f-002197011099 Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime To:sip:290081@sip.example.com Contact:sip:9888@10.10.10.100 Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,MESSAGE,INFO,PING Content-Type: application/sdp Content-Length: 549 Max-Forwards: 70
v=0 o=- 1274299871 1 IN IP4 10.10.10.100 s=Opal SIP Session c=IN IP4 10.10.10.100 t=0 0 m=audio 5062 RTP/AVP 116 0 8 9 101 120 a=sendrecv a=rtpmap:116 Speex/16000/1 a=fmtp:116 sr=16000,mode=any a=rtpmap:0 PCMU/8000/1 a=rtpmap:8 PCMA/8000/1 a=rtpmap:9 G722/8000/1 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16,32,36 a=rtpmap:120 NSE/8000 a=fmtp:120 192-193 m=video 5064 RTP/AVP 99 31 b=AS:4096 b=TIAS:4096000 a=sendrecv a=rtpmap:99 theora/90000 a=fmtp:99 height=576;width=704 a=rtpmap:31 h261/90000 a=fmtp:31 CIF=1;QCIF=1
Here it seeems openser tells me it is trying :
U 2010/05/20 07:11:08.474968 10.125.0.1:5060 -> 10.10.10.100:5060 SIP/2.0 100 Giving a try CSeq: 1 INVITE Via: SIP/2.0/UDP 10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport=5060 From: "Jerome Alet"sip:9888@sip.example.com;tag=8c3a8756-f061-df11-897f-002197011099 Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime To:sip:290081@sip.example.com Server: OpenSER (1.3.2-notls (i386/linux)) Content-Length: 0
Now the host and port rewriting has taken place, so openser transmits the invite to the pabx :
U 2010/05/20 07:11:08.479225 10.125.0.1:5060 -> 10.125.0.2:5060 INVITE sip:290081@pabx-alcatel.example.com:5060 SIP/2.0 Record-Route:sip:10.125.0.1;lr=on Date: Wed, 19 May 2010 20:11:11 GMT CSeq: 1 INVITE Via: SIP/2.0/UDP 10.125.0.1;branch=z9hG4bK3be6.1a17aeb2.0 Via: SIP/2.0/UDP 10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport=5060 User-Agent: Ekiga/3.2.6 From: "Jerome Alet"sip:9888@sip.example.com;tag=8c3a8756-f061-df11-897f-002197011099 Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime To:sip:290081@sip.example.com Contact:sip:9888@10.10.10.100 Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,MESSAGE,INFO,PING Content-Type: application/sdp Content-Length: 549 Max-Forwards: 69
v=0 o=- 1274299871 1 IN IP4 10.10.10.100 s=Opal SIP Session c=IN IP4 10.10.10.100 t=0 0 m=audio 5062 RTP/AVP 116 0 8 9 101 120 a=sendrecv a=rtpmap:116 Speex/16000/1 a=fmtp:116 sr=16000,mode=any a=rtpmap:0 PCMU/8000/1 a=rtpmap:8 PCMA/8000/1 a=rtpmap:9 G722/8000/1 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16,32,36 a=rtpmap:120 NSE/8000 a=fmtp:120 192-193 m=video 5064 RTP/AVP 99 31 b=AS:4096 b=TIAS:4096000 a=sendrecv a=rtpmap:99 theora/90000 a=fmtp:99 height=576;width=704 a=rtpmap:31 h261/90000 a=fmtp:31 CIF=1;QCIF=1
The pabx answers it is trying :
U 2010/05/20 07:11:08.509995 10.125.0.2:5060 -> 10.125.0.1:5060 SIP/2.0 100 Trying To:sip:290081@sip.example.com From: "Jerome Alet"sip:9888@sip.example.com;tag=8c3a8756-f061-df11-897f-002197011099 Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime CSeq: 1 INVITE Via: SIP/2.0/UDP 10.125.0.1;branch=z9hG4bK3be6.1a17aeb2.0 Via: SIP/2.0/UDP 10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport=5060 Content-Length: 0
But then it says it can't find the recipient (or at least that's what I understand) :
U 2010/05/20 07:11:08.529453 10.125.0.2:5060 -> 10.125.0.1:5060 SIP/2.0 404 Not Found Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, PRACK, REFER, NOTIFY, UPDATE User-Agent: OxO_GW_710/115.006 To:sip:290081@sip.example.com;tag=3c9a6f069a4e18993408270150d6e3e6 From: "Jerome Alet"sip:9888@sip.example.com;tag=8c3a8756-f061-df11-897f-002197011099 Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime CSeq: 1 INVITE Via: SIP/2.0/UDP 10.125.0.1;branch=z9hG4bK3be6.1a17aeb2.0 Via: SIP/2.0/UDP 10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport=5060 Content-Length: 0
Then openser aknowledges :
U 2010/05/20 07:11:08.530454 10.125.0.1:5060 -> 10.125.0.2:5060 ACK sip:290081@pabx-alcatel.example.com:5060 SIP/2.0 Via: SIP/2.0/UDP 10.125.0.1;branch=z9hG4bK3be6.1a17aeb2.0 From: "Jerome Alet"sip:9888@sip.example.com;tag=8c3a8756-f061-df11-897f-002197011099 Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime To:sip:290081@sip.example.com;tag=3c9a6f069a4e18993408270150d6e3e6 CSeq: 1 ACK Max-Forwards: 70 User-Agent: OpenSER (1.3.2-notls (i386/linux)) Content-Length: 0
And then openser sends the Not Found answer back to my Ekiga :
U 2010/05/20 07:11:08.530934 10.125.0.1:5060 -> 10.10.10.100:5060 SIP/2.0 404 Not Found Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, PRACK, REFER, NOTIFY, UPDATE User-Agent: OxO_GW_710/115.006 To:sip:290081@sip.example.com;tag=3c9a6f069a4e18993408270150d6e3e6 From: "Jerome Alet"sip:9888@sip.example.com;tag=8c3a8756-f061-df11-897f-002197011099 Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime CSeq: 1 INVITE Via: SIP/2.0/UDP 10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport=5060 Content-Length: 0
And my Ekiga aknowledges :
U 2010/05/20 07:11:08.533180 10.10.10.100:5060 -> 10.125.0.1:5060 ACK sip:290081@sip.example.com SIP/2.0 CSeq: 1 ACK Via: SIP/2.0/UDP 10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport From: "Jerome Alet"sip:9888@sip.example.com;tag=8c3a8756-f061-df11-897f-002197011099 Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime To:sip:290081@sip.example.com;tag=3c9a6f069a4e18993408270150d6e3e6 Content-Length: 0 Max-Forwards: 70
What looks bizarre to me is that if from Ekiga I dial 290081@pabx-alcatel.example.com, so not passing through openser not the openser box, it works perfectly, as can be seen below (using ngrep on my GNU/Linux box) :
root@lafrime:~# ngrep -d any -W byline -t -q -P "" port 5060 interface: any filter: (ip or ip6) and ( port 5060 )
U 2010/05/20 07:34:49.070434 10.10.10.100:5060 -> 10.125.0.2:5060 INVITE sip:290081@pabx-alcatel.example.com SIP/2.0 Date: Wed, 19 May 2010 20:34:49 GMT CSeq: 1 INVITE Via: SIP/2.0/UDP 10.10.10.100:5060;branch=z9hG4bK044163a3-f361-df11-897f-002197011099;rport User-Agent: Ekiga/3.2.6 From: "Jerome Alet"sip:jerome@10.10.10.100;tag=be0f62a3-f361-df11-897f-002197011099 Call-ID: 421362a3-f361-df11-897f-002197011099@lafrime To:sip:290081@pabx-alcatel.example.com Contact:sip:jerome@10.10.10.100 Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,MESSAGE,INFO,PING Content-Type: application/sdp Content-Length: 549 Max-Forwards: 70
v=0 o=- 1274301289 1 IN IP4 10.10.10.100 s=Opal SIP Session c=IN IP4 10.10.10.100 t=0 0 m=audio 5072 RTP/AVP 116 0 8 9 101 120 a=sendrecv a=rtpmap:116 Speex/16000/1 a=fmtp:116 sr=16000,mode=any a=rtpmap:0 PCMU/8000/1 a=rtpmap:8 PCMA/8000/1 a=rtpmap:9 G722/8000/1 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16,32,36 a=rtpmap:120 NSE/8000 a=fmtp:120 192-193 m=video 5074 RTP/AVP 99 31 b=AS:4096 b=TIAS:4096000 a=sendrecv a=rtpmap:99 theora/90000 a=fmtp:99 height=576;width=704 a=rtpmap:31 h261/90000 a=fmtp:31 CIF=1;QCIF=1
So here the INVITE was sent to the pabx, and the pabx says it is trying :
U 2010/05/20 07:34:49.099009 10.125.0.2:5060 -> 10.10.10.100:5060 SIP/2.0 100 Trying To:sip:290081@pabx-alcatel.example.com From: "Jerome Alet"sip:jerome@10.10.10.100;tag=be0f62a3-f361-df11-897f-002197011099 Call-ID: 421362a3-f361-df11-897f-002197011099@lafrime CSeq: 1 INVITE Via: SIP/2.0/UDP 10.10.10.100:5060;received=10.10.10.100;branch=z9hG4bK044163a3-f361-df11-897f-002197011099;rport=5060 Content-Length: 0
And now, it seems it has found the 290081@pabx-alcatel.example.com :
U 2010/05/20 07:34:49.201710 10.125.0.2:5060 -> 10.10.10.100:5060 SIP/2.0 180 Ringing Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, PRACK, REFER, NOTIFY, UPDATE Contact: "ALET J 290081"sip:290081@10.125.0.2;user=phone Supported: from-change User-Agent: OxO_GW_710/115.006 P-Asserted-Identity: "ALET J 290081"sip:290081@example.com;user=phone To:sip:290081@pabx-alcatel.example.com;tag=51a1558a4e6ac3bf5c1819f278ae2ecc From: "Jerome Alet"sip:jerome@10.10.10.100;tag=be0f62a3-f361-df11-897f-002197011099 Call-ID: 421362a3-f361-df11-897f-002197011099@lafrime CSeq: 1 INVITE Via: SIP/2.0/UDP 10.10.10.100:5060;received=10.10.10.100;branch=z9hG4bK044163a3-f361-df11-897f-002197011099;rport=5060 Content-Length: 0
And from now on, the remaining of the "direct" call processes correctly.
The major difference I see is the "To:" header : in both cases it is equal to what was dialed, but in the former case (through openser) the INVITE and To differ. Another difference is that in the latter case it uses my name instead of the number configured in my ekiga account for the openser registrar (which seems to be normal)
Any idea what happens and what I should do to solve this problem ?
Thanks in advance
Jerome Alet