Ok, for User2 i added in Xlite Domain : 10.10.10.2 Proxy : 192.168.0.2
And i am able to call User1, and User1 is able to call User2.
Now the problem is i there is no RTP packets :s. That's weird because i enable rtpproxy with bridge mode, with the command : rtpproxy -l 10.10.10.2 192.168.0.2 -s udp:127.0.0.1:7890. Obviously in my .conf file kamailio is listening on udp:127.0.0.1:7890.
Cheers
On Freitag, 15. Mai 2009, karhu wrote:
Ok, for User2 i added in Xlite Domain : 10.10.10.2 Proxy : 192.168.0.2
And i am able to call User1, and User1 is able to call User2.
Now the problem is i there is no RTP packets :s. That's weird because i enable rtpproxy with bridge mode, with the command : rtpproxy -l 10.10.10.2 192.168.0.2 -s udp:127.0.0.1:7890. Obviously in my .conf file kamailio is listening on udp:127.0.0.1:7890.
Hi Karhu,
do you get any error in the kamailio log file related to connection to/ operation of rtpproxy? And have you checked that the SDP in the SIP contains the correct IP and port of your rtpproxy?
Cheers,
Henning
Hi,
First of all the rtpproxy command must be like that : rtpptoxy -l 192.168.0.2/10.10.10.2 -s udp:127.0.0.1:7890 :)
I don't know if it is important but when i run rtpproxy and start wireshark on localhost, there is UDP checksum on UDP messages (with 7890 port) so i don't really know what does it mean ..
In my kamailio log file there is no error about rtpproxy, i get : INFO:nathelper:rtpp_test: rtpproxy udp:127.0.0.1:7890 found, support for it enabled.
I don't know where to find an issue, maybe on my .conf there is route mistakes, i don't really know !!
Below is what the callee receive (it doesn't seem that rtpproxy modify the sdp pararameters...)
############################################################# NOTIFY sip:1000@10.10.10.3:28622 SIP/2.0 Via: SIP/2.0/UDP 10.10.10.2;branch=z9hG4bK32a6.59d2c88.0 Via: SIP/2.0/UDP 192.168.0.10:52584;received=192.168.0.10;branch=z9hG4bK-d87543-0077b61ebc07ec6c-1--d87543-;rport=52584 Max-Forwards: 69 Contact: sip:jimmy@192.168.0.10:52584;rinstance=8085570d8870a91d To: "toto"sip:1000@10.10.10.2;tag=88747918 From: sip:jimmy@10.10.10.2;tag=592de522 Call-ID: NDg4NTQyNWZlZjdjM2U0YjJjZmRhZWZiN2YwMTA1ODk. CSeq: 5 NOTIFY Content-Type: application/pidf+xml User-Agent: X-Lite release 1006e stamp 34025 Subscription-State: active;expires=3017 Event: presence Content-Length: 456
<?xml version='1.0' encoding='UTF-8'?><presence xmlns='urn:ietf:params:xml:ns:pidf' xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model' xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid' xmlns:c='urn:ietf:params:xml:ns:pidf:cipid' entity='pres:jimmy@10.10.10.2'><tuple id='t2b5a3154'><status><basic>open</basic></status></tuple>dm:person id='p827b2116'rpid:activitiesrpid:on-the-phone/</rpid:activities>dm:noteOn the Phone</dm:note></dm:person></presence>INVITE sip:1000@10.10.10.3:28622;rinstance=5d88dda3f0385118 SIP/2.0 Record-Route: sip:10.10.10.2;r2=on;lr=on Record-Route: sip:192.168.0.2;r2=on;lr=on Via: SIP/2.0/UDP 10.10.10.2;branch=z9hG4bK7fd9.5888b3b.0 Via: SIP/2.0/UDP 192.168.0.10:52584;received=192.168.0.10;branch=z9hG4bK-d87543-216aba407d69f837-1--d87543-;rport=52584 Max-Forwards: 69 Contact: sip:jimmy@192.168.0.10:52584 To: "toto"sip:1000@10.10.10.2 From: "Yo"sip:jimmy@10.10.10.2;tag=943cfb55 Call-ID: NzFiZGMxZjNmMTgxMmM4Y2NjOWQ3ODk5NGUxOGNlM2Y. CSeq: 2 INVITE Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO Content-Type: application/sdp User-Agent: X-Lite release 1006e stamp 34025 Content-Length: 376
v=0 o=- 1 2 IN IP4 192.168.0.10 s=CounterPath X-Lite 3.0 c=IN IP4 192.168.0.10 t=0 0 m=audio 40576 RTP/AVP 107 119 0 98 8 3 101 a=alt:1 2 : qYRR6+kO KIe+GIui 10.193.15.206 40576 a=alt:2 1 : 9vpxIra9 F/yz8wCU 192.168.0.10 40576 a=fmtp:101 0-15 a=rtpmap:107 BV32/16000 a=rtpmap:119 BV32-FEC/16000 a=rtpmap:98 iLBC/8000 a=rtpmap:101 telephone-event/8000 a=sendrecv SIP/2.0 200 OK Via: SIP/2.0/UDP 10.10.10.2;branch=z9hG4bK32a6.59d2c88.0 Via: SIP/2.0/UDP 192.168.0.10:52584;received=192.168.0.10;branch=z9hG4bK-d87543-0077b61ebc07ec6c-1--d87543-;rport=52584 Contact: sip:1000@10.10.10.3:28622 To: "toto"sip:1000@10.10.10.2;tag=88747918 From: sip:jimmy@10.10.10.2;tag=592de522 Call-ID: NDg4NTQyNWZlZjdjM2U0YjJjZmRhZWZiN2YwMTA1ODk. CSeq: 5 NOTIFY User-Agent: X-Lite release 1006e stamp 34025 Content-Length: 0
SIP/2.0 180 Ringing Via: SIP/2.0/UDP 10.10.10.2;branch=z9hG4bK7fd9.5888b3b.0 Via: SIP/2.0/UDP 192.168.0.10:52584;received=192.168.0.10;branch=z9hG4bK-d87543-216aba407d69f837-1--d87543-;rport=52584 Record-Route: sip:10.10.10.2;r2=on;lr=on Record-Route: sip:192.168.0.2;lr;r2=on Contact: sip:1000@10.10.10.3:28622;rinstance=5d88dda3f0385118 To: "toto"sip:1000@10.10.10.2;tag=3f57ae6d From: "Yo"sip:jimmy@10.10.10.2;tag=943cfb55 Call-ID: NzFiZGMxZjNmMTgxMmM4Y2NjOWQ3ODk5NGUxOGNlM2Y. CSeq: 2 INVITE User-Agent: X-Lite release 1006e stamp 34025 Content-Length: 0
SIP/2.0 200 OK Via: SIP/2.0/UDP 10.10.10.2;branch=z9hG4bK7fd9.5888b3b.0 Via: SIP/2.0/UDP 192.168.0.10:52584;received=192.168.0.10;branch=z9hG4bK-d87543-216aba407d69f837-1--d87543-;rport=52584 Record-Route: sip:10.10.10.2;r2=on;lr=on Record-Route: sip:192.168.0.2;lr;r2=on Contact: sip:1000@10.10.10.3:28622;rinstance=5d88dda3f0385118 To: "toto"sip:1000@10.10.10.2;tag=3f57ae6d From: "Yo"sip:jimmy@10.10.10.2;tag=943cfb55 Call-ID: NzFiZGMxZjNmMTgxMmM4Y2NjOWQ3ODk5NGUxOGNlM2Y. CSeq: 2 INVITE Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO Content-Type: application/sdp User-Agent: X-Lite release 1006e stamp 34025 Content-Length: 317
v=0 o=- 7 2 IN IP4 10.10.10.3 s=CounterPath X-Lite 3.0 c=IN IP4 10.10.10.3 t=0 0 m=audio 8660 RTP/AVP 107 119 0 98 8 3 101 a=alt:1 1 : imJYL+XY s2A1SzMz 10.10.10.3 8660 a=fmtp:101 0-15 a=rtpmap:107 BV32/16000 a=rtpmap:119 BV32-FEC/16000 a=rtpmap:98 iLBC/8000 a=rtpmap:101 telephone-event/8000 a=sendrecv PUBLISH sip:1000@10.10.10.2 SIP/2.0 Via: SIP/2.0/UDP 10.10.10.3:28622;branch=z9hG4bK-d87543-4641d301a1473b01-1--d87543-;rport Max-Forwards: 70 Contact: sip:1000@10.10.10.3:28622 To: "toto"sip:1000@10.10.10.2 From: "toto"sip:1000@10.10.10.2;tag=965f1d07 Call-ID: YTdhZWRhYmY3MmUwNWU3NWM5Nzk2OGQ2NmM4ZmNkMzE. CSeq: 1 PUBLISH Expires: 3600 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO Content-Type: application/pidf+xml User-Agent: X-Lite release 1006e stamp 34025 Event: presence Content-Length: 439
<?xml version='1.0' encoding='UTF-8'?><presence xmlns='urn:ietf:params:xml:ns:pidf' xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model' xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid' xmlns:c='urn:ietf:params:xml:ns:pidf:cipid' entity='pres:1000@10.10.10.2'><tuple id='tdc264870'><status><basic>open</basic></status></tuple>dm:person id='p3f027a37'rpid:activitiesrpid:busy/</rpid:activities>dm:noteBusy</dm:note></dm:person></presence>NOTIFY sip:jimmy@192.168.0.10:52584 SIP/2.0 Via: SIP/2.0/UDP 10.10.10.3:28622;branch=z9hG4bK-d87543-504d7f3c8964700d-1--d87543-;rport Max-Forwards: 70 Route: sip:10.10.10.2;lr;r2=on Route: sip:192.168.0.2;r2=on;lr=on Contact: sip:1000@10.10.10.3:28622;rinstance=5d88dda3f0385118 To: "Yo"sip:jimmy@10.10.10.2;tag=7508dc58 From: sip:1000@10.10.10.2;tag=56391077 Call-ID: MmFjNmVkZGFkYmU4MWNjY2RmNWMxYzQwMzQ0Y2M1MGQ. CSeq: 5 NOTIFY Content-Type: application/pidf+xml User-Agent: X-Lite release 1006e stamp 34025 Subscription-State: active;expires=3009 Event: presence Content-Length: 439
<?xml version='1.0' encoding='UTF-8'?><presence xmlns='urn:ietf:params:xml:ns:pidf' xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model' xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid' xmlns:c='urn:ietf:params:xml:ns:pidf:cipid' entity='pres:1000@10.10.10.2'><tuple id='tdc264870'><status><basic>open</basic></status></tuple>dm:person id='p3f027a37'rpid:activitiesrpid:busy/</rpid:activities>dm:noteBusy</dm:note></dm:person></presence>SIP/2.0 407 Proxy Authentication Required Via: SIP/2.0/UDP 10.10.10.3:28622;branch=z9hG4bK-d87543-4641d301a1473b01-1--d87543-;rport=28622 To: "toto"sip:1000@10.10.10.2;tag=f8f2ab2c1295e90ed7dbb499b30f44b2.0da5 From: "toto"sip:1000@10.10.10.2;tag=965f1d07 Call-ID: YTdhZWRhYmY3MmUwNWU3NWM5Nzk2OGQ2NmM4ZmNkMzE. CSeq: 1 PUBLISH Proxy-Authenticate: Digest realm="10.10.10.2", nonce="4a0d64b600000018e1dc3a1e2ee16f487b68f0bbd387ec1b" Server: Kamailio (1.5.0-notls (x86_64/linux)) Content-Length: 0
SIP/2.0 200 OK Via: SIP/2.0/UDP 10.10.10.3:28622;received=10.10.10.3;branch=z9hG4bK-d87543-504d7f3c8964700d-1--d87543-;rport=28622 Contact: sip:jimmy@192.168.0.10:52584 To: "Yo"sip:jimmy@10.10.10.2;tag=7508dc58 From: sip:1000@10.10.10.2;tag=56391077 Call-ID: MmFjNmVkZGFkYmU4MWNjY2RmNWMxYzQwMzQ0Y2M1MGQ. CSeq: 5 NOTIFY User-Agent: X-Lite release 1006e stamp 34025 Content-Length: 0
PUBLISH sip:1000@10.10.10.2 SIP/2.0 Via: SIP/2.0/UDP 10.10.10.3:28622;branch=z9hG4bK-d87543-c80eab632b537155-1--d87543-;rport Max-Forwards: 70 Contact: sip:1000@10.10.10.3:28622 To: "toto"sip:1000@10.10.10.2 From: "toto"sip:1000@10.10.10.2;tag=965f1d07 Call-ID: YTdhZWRhYmY3MmUwNWU3NWM5Nzk2OGQ2NmM4ZmNkMzE. CSeq: 2 PUBLISH Expires: 3600 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO Content-Type: application/pidf+xml Proxy-Authorization: Digest username="1000",realm="10.10.10.2",nonce="4a0d64b600000018e1dc3a1e2ee16f487b68f0bbd387ec1b",uri="sip:1000@10.10.10.2",response="b2540bad76983836124434ca6f8a28ff",algorithm=MD5 User-Agent: X-Lite release 1006e stamp 34025 Event: presence Content-Length: 439
<?xml version='1.0' encoding='UTF-8'?><presence xmlns='urn:ietf:params:xml:ns:pidf' xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model' xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid' xmlns:c='urn:ietf:params:xml:ns:pidf:cipid' entity='pres:1000@10.10.10.2'><tuple id='tdc264870'><status><basic>open</basic></status></tuple>dm:person id='p3f027a37'rpid:activitiesrpid:busy/</rpid:activities>dm:noteBusy</dm:note></dm:person></presence>SIP/2.0 404 Not here Via: SIP/2.0/UDP 10.10.10.3:28622;branch=z9hG4bK-d87543-c80eab632b537155-1--d87543-;rport=28622 To: "toto"sip:1000@10.10.10.2;tag=f8f2ab2c1295e90ed7dbb499b30f44b2.7897 From: "toto"sip:1000@10.10.10.2;tag=965f1d07 Call-ID: YTdhZWRhYmY3MmUwNWU3NWM5Nzk2OGQ2NmM4ZmNkMzE. CSeq: 2 PUBLISH Server: Kamailio (1.5.0-notls (x86_64/linux)) Content-Length: 0
ACK sip:1000@10.10.10.3:28622;rinstance=5d88dda3f0385118 SIP/2.0 Via: SIP/2.0/UDP 10.10.10.2;branch=z9hG4bK7fd9.5888b3b.2 Via: SIP/2.0/UDP 192.168.0.10:52584;received=192.168.0.10;branch=z9hG4bK-d87543-f620c054d1462614-1--d87543-;rport=52584 Max-Forwards: 69 Contact: sip:jimmy@192.168.0.10:52584 To: "toto"sip:1000@10.10.10.2;tag=3f57ae6d From: "Yo"sip:jimmy@10.10.10.2;tag=943cfb55 Call-ID: NzFiZGMxZjNmMTgxMmM4Y2NjOWQ3ODk5NGUxOGNlM2Y. CSeq: 2 ACK Proxy-Authorization: Digest username="jimmy",realm="10.10.10.2",nonce="4a0d64ae0000001719f1b94b7bc7458a5467b3b3ea53507a",uri="sip:1000@10.10.10.2",response="eebf1cb9ef7f04162511243bf70c72e2",algorithm=MD5 User-Agent: X-Lite release 1006e stamp 34025 Content-Length: 0
################################################# cheers,
Karhu
Hello,
have you provided the right parameters to nathelper functions for bridging? Have a look at: http://openser.svn.sourceforge.net/viewvc/openser/trunk/modules/nathelper/ex...
Cheers, Daniel
On 05/15/2009 04:11 PM, karhu wrote:
Hi,
First of all the rtpproxy command must be like that : rtpptoxy -l 192.168.0.2/10.10.10.2 -s udp:127.0.0.1:7890 :)
I don't know if it is important but when i run rtpproxy and start wireshark on localhost, there is UDP checksum on UDP messages (with 7890 port) so i don't really know what does it mean ..
In my kamailio log file there is no error about rtpproxy, i get : INFO:nathelper:rtpp_test: rtpproxy udp:127.0.0.1:7890 found, support for it enabled.
I don't know where to find an issue, maybe on my .conf there is route mistakes, i don't really know !!
Below is what the callee receive (it doesn't seem that rtpproxy modify the sdp pararameters...)
############################################################# NOTIFY sip:1000@10.10.10.3:28622 SIP/2.0 Via: SIP/2.0/UDP 10.10.10.2;branch=z9hG4bK32a6.59d2c88.0 Via: SIP/2.0/UDP 192.168.0.10:52584;received=192.168.0.10;branch=z9hG4bK-d87543-0077b61ebc07ec6c-1--d87543-;rport=52584 Max-Forwards: 69 Contact: sip:jimmy@192.168.0.10:52584;rinstance=8085570d8870a91d To: "toto"sip:1000@10.10.10.2;tag=88747918 From: sip:jimmy@10.10.10.2;tag=592de522 Call-ID: NDg4NTQyNWZlZjdjM2U0YjJjZmRhZWZiN2YwMTA1ODk. CSeq: 5 NOTIFY Content-Type: application/pidf+xml User-Agent: X-Lite release 1006e stamp 34025 Subscription-State: active;expires=3017 Event: presence Content-Length: 456
<?xml version='1.0' encoding='UTF-8'?><presence
xmlns='urn:ietf:params:xml:ns:pidf' xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model' xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid' xmlns:c='urn:ietf:params:xml:ns:pidf:cipid' entity='pres:jimmy@10.10.10.2'><tuple id='t2b5a3154'><status><basic>open</basic></status></tuple>dm:person id='p827b2116'rpid:activitiesrpid:on-the-phone/</rpid:activities>dm:noteOn the Phone</dm:note></dm:person></presence>INVITE sip:1000@10.10.10.3:28622;rinstance=5d88dda3f0385118 SIP/2.0 Record-Route: sip:10.10.10.2;r2=on;lr=on Record-Route: sip:192.168.0.2;r2=on;lr=on Via: SIP/2.0/UDP 10.10.10.2;branch=z9hG4bK7fd9.5888b3b.0 Via: SIP/2.0/UDP 192.168.0.10:52584;received=192.168.0.10;branch=z9hG4bK-d87543-216aba407d69f837-1--d87543-;rport=52584 Max-Forwards: 69 Contact: sip:jimmy@192.168.0.10:52584 To: "toto"sip:1000@10.10.10.2 From: "Yo"sip:jimmy@10.10.10.2;tag=943cfb55 Call-ID: NzFiZGMxZjNmMTgxMmM4Y2NjOWQ3ODk5NGUxOGNlM2Y. CSeq: 2 INVITE Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO Content-Type: application/sdp User-Agent: X-Lite release 1006e stamp 34025 Content-Length: 376
v=0 o=- 1 2 IN IP4 192.168.0.10 s=CounterPath X-Lite 3.0 c=IN IP4 192.168.0.10 t=0 0 m=audio 40576 RTP/AVP 107 119 0 98 8 3 101 a=alt:1 2 : qYRR6+kO KIe+GIui 10.193.15.206 40576 a=alt:2 1 : 9vpxIra9 F/yz8wCU 192.168.0.10 40576 a=fmtp:101 0-15 a=rtpmap:107 BV32/16000 a=rtpmap:119 BV32-FEC/16000 a=rtpmap:98 iLBC/8000 a=rtpmap:101 telephone-event/8000 a=sendrecv SIP/2.0 200 OK Via: SIP/2.0/UDP 10.10.10.2;branch=z9hG4bK32a6.59d2c88.0 Via: SIP/2.0/UDP 192.168.0.10:52584;received=192.168.0.10;branch=z9hG4bK-d87543-0077b61ebc07ec6c-1--d87543-;rport=52584 Contact: sip:1000@10.10.10.3:28622 To: "toto"sip:1000@10.10.10.2;tag=88747918 From: sip:jimmy@10.10.10.2;tag=592de522 Call-ID: NDg4NTQyNWZlZjdjM2U0YjJjZmRhZWZiN2YwMTA1ODk. CSeq: 5 NOTIFY User-Agent: X-Lite release 1006e stamp 34025 Content-Length: 0
SIP/2.0 180 Ringing Via: SIP/2.0/UDP 10.10.10.2;branch=z9hG4bK7fd9.5888b3b.0 Via: SIP/2.0/UDP 192.168.0.10:52584;received=192.168.0.10;branch=z9hG4bK-d87543-216aba407d69f837-1--d87543-;rport=52584 Record-Route: sip:10.10.10.2;r2=on;lr=on Record-Route: sip:192.168.0.2;lr;r2=on Contact: sip:1000@10.10.10.3:28622;rinstance=5d88dda3f0385118 To: "toto"sip:1000@10.10.10.2;tag=3f57ae6d From: "Yo"sip:jimmy@10.10.10.2;tag=943cfb55 Call-ID: NzFiZGMxZjNmMTgxMmM4Y2NjOWQ3ODk5NGUxOGNlM2Y. CSeq: 2 INVITE User-Agent: X-Lite release 1006e stamp 34025 Content-Length: 0
SIP/2.0 200 OK Via: SIP/2.0/UDP 10.10.10.2;branch=z9hG4bK7fd9.5888b3b.0 Via: SIP/2.0/UDP 192.168.0.10:52584;received=192.168.0.10;branch=z9hG4bK-d87543-216aba407d69f837-1--d87543-;rport=52584 Record-Route: sip:10.10.10.2;r2=on;lr=on Record-Route: sip:192.168.0.2;lr;r2=on Contact: sip:1000@10.10.10.3:28622;rinstance=5d88dda3f0385118 To: "toto"sip:1000@10.10.10.2;tag=3f57ae6d From: "Yo"sip:jimmy@10.10.10.2;tag=943cfb55 Call-ID: NzFiZGMxZjNmMTgxMmM4Y2NjOWQ3ODk5NGUxOGNlM2Y. CSeq: 2 INVITE Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO Content-Type: application/sdp User-Agent: X-Lite release 1006e stamp 34025 Content-Length: 317
v=0 o=- 7 2 IN IP4 10.10.10.3 s=CounterPath X-Lite 3.0 c=IN IP4 10.10.10.3 t=0 0 m=audio 8660 RTP/AVP 107 119 0 98 8 3 101 a=alt:1 1 : imJYL+XY s2A1SzMz 10.10.10.3 8660 a=fmtp:101 0-15 a=rtpmap:107 BV32/16000 a=rtpmap:119 BV32-FEC/16000 a=rtpmap:98 iLBC/8000 a=rtpmap:101 telephone-event/8000 a=sendrecv PUBLISH sip:1000@10.10.10.2 SIP/2.0 Via: SIP/2.0/UDP 10.10.10.3:28622;branch=z9hG4bK-d87543-4641d301a1473b01-1--d87543-;rport Max-Forwards: 70 Contact: sip:1000@10.10.10.3:28622 To: "toto"sip:1000@10.10.10.2 From: "toto"sip:1000@10.10.10.2;tag=965f1d07 Call-ID: YTdhZWRhYmY3MmUwNWU3NWM5Nzk2OGQ2NmM4ZmNkMzE. CSeq: 1 PUBLISH Expires: 3600 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO Content-Type: application/pidf+xml User-Agent: X-Lite release 1006e stamp 34025 Event: presence Content-Length: 439
<?xml version='1.0' encoding='UTF-8'?><presence
xmlns='urn:ietf:params:xml:ns:pidf' xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model' xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid' xmlns:c='urn:ietf:params:xml:ns:pidf:cipid' entity='pres:1000@10.10.10.2'><tuple id='tdc264870'><status><basic>open</basic></status></tuple>dm:person id='p3f027a37'rpid:activitiesrpid:busy/</rpid:activities>dm:noteBusy</dm:note></dm:person></presence>NOTIFY sip:jimmy@192.168.0.10:52584 SIP/2.0 Via: SIP/2.0/UDP 10.10.10.3:28622;branch=z9hG4bK-d87543-504d7f3c8964700d-1--d87543-;rport Max-Forwards: 70 Route: sip:10.10.10.2;lr;r2=on Route: sip:192.168.0.2;r2=on;lr=on Contact: sip:1000@10.10.10.3:28622;rinstance=5d88dda3f0385118 To: "Yo"sip:jimmy@10.10.10.2;tag=7508dc58 From: sip:1000@10.10.10.2;tag=56391077 Call-ID: MmFjNmVkZGFkYmU4MWNjY2RmNWMxYzQwMzQ0Y2M1MGQ. CSeq: 5 NOTIFY Content-Type: application/pidf+xml User-Agent: X-Lite release 1006e stamp 34025 Subscription-State: active;expires=3009 Event: presence Content-Length: 439
<?xml version='1.0' encoding='UTF-8'?><presence
xmlns='urn:ietf:params:xml:ns:pidf' xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model' xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid' xmlns:c='urn:ietf:params:xml:ns:pidf:cipid' entity='pres:1000@10.10.10.2'><tuple id='tdc264870'><status><basic>open</basic></status></tuple>dm:person id='p3f027a37'rpid:activitiesrpid:busy/</rpid:activities>dm:noteBusy</dm:note></dm:person></presence>SIP/2.0 407 Proxy Authentication Required Via: SIP/2.0/UDP 10.10.10.3:28622;branch=z9hG4bK-d87543-4641d301a1473b01-1--d87543-;rport=28622 To: "toto"sip:1000@10.10.10.2;tag=f8f2ab2c1295e90ed7dbb499b30f44b2.0da5 From: "toto"sip:1000@10.10.10.2;tag=965f1d07 Call-ID: YTdhZWRhYmY3MmUwNWU3NWM5Nzk2OGQ2NmM4ZmNkMzE. CSeq: 1 PUBLISH Proxy-Authenticate: Digest realm="10.10.10.2", nonce="4a0d64b600000018e1dc3a1e2ee16f487b68f0bbd387ec1b" Server: Kamailio (1.5.0-notls (x86_64/linux)) Content-Length: 0
SIP/2.0 200 OK Via: SIP/2.0/UDP 10.10.10.3:28622;received=10.10.10.3;branch=z9hG4bK-d87543-504d7f3c8964700d-1--d87543-;rport=28622 Contact: sip:jimmy@192.168.0.10:52584 To: "Yo"sip:jimmy@10.10.10.2;tag=7508dc58 From: sip:1000@10.10.10.2;tag=56391077 Call-ID: MmFjNmVkZGFkYmU4MWNjY2RmNWMxYzQwMzQ0Y2M1MGQ. CSeq: 5 NOTIFY User-Agent: X-Lite release 1006e stamp 34025 Content-Length: 0
PUBLISH sip:1000@10.10.10.2 SIP/2.0 Via: SIP/2.0/UDP 10.10.10.3:28622;branch=z9hG4bK-d87543-c80eab632b537155-1--d87543-;rport Max-Forwards: 70 Contact: sip:1000@10.10.10.3:28622 To: "toto"sip:1000@10.10.10.2 From: "toto"sip:1000@10.10.10.2;tag=965f1d07 Call-ID: YTdhZWRhYmY3MmUwNWU3NWM5Nzk2OGQ2NmM4ZmNkMzE. CSeq: 2 PUBLISH Expires: 3600 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO Content-Type: application/pidf+xml Proxy-Authorization: Digest username="1000",realm="10.10.10.2",nonce="4a0d64b600000018e1dc3a1e2ee16f487b68f0bbd387ec1b",uri="sip:1000@10.10.10.2",response="b2540bad76983836124434ca6f8a28ff",algorithm=MD5 User-Agent: X-Lite release 1006e stamp 34025 Event: presence Content-Length: 439
<?xml version='1.0' encoding='UTF-8'?><presence
xmlns='urn:ietf:params:xml:ns:pidf' xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model' xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid' xmlns:c='urn:ietf:params:xml:ns:pidf:cipid' entity='pres:1000@10.10.10.2'><tuple id='tdc264870'><status><basic>open</basic></status></tuple>dm:person id='p3f027a37'rpid:activitiesrpid:busy/</rpid:activities>dm:noteBusy</dm:note></dm:person></presence>SIP/2.0 404 Not here Via: SIP/2.0/UDP 10.10.10.3:28622;branch=z9hG4bK-d87543-c80eab632b537155-1--d87543-;rport=28622 To: "toto"sip:1000@10.10.10.2;tag=f8f2ab2c1295e90ed7dbb499b30f44b2.7897 From: "toto"sip:1000@10.10.10.2;tag=965f1d07 Call-ID: YTdhZWRhYmY3MmUwNWU3NWM5Nzk2OGQ2NmM4ZmNkMzE. CSeq: 2 PUBLISH Server: Kamailio (1.5.0-notls (x86_64/linux)) Content-Length: 0
ACK sip:1000@10.10.10.3:28622;rinstance=5d88dda3f0385118 SIP/2.0 Via: SIP/2.0/UDP 10.10.10.2;branch=z9hG4bK7fd9.5888b3b.2 Via: SIP/2.0/UDP 192.168.0.10:52584;received=192.168.0.10;branch=z9hG4bK-d87543-f620c054d1462614-1--d87543-;rport=52584 Max-Forwards: 69 Contact: sip:jimmy@192.168.0.10:52584 To: "toto"sip:1000@10.10.10.2;tag=3f57ae6d From: "Yo"sip:jimmy@10.10.10.2;tag=943cfb55 Call-ID: NzFiZGMxZjNmMTgxMmM4Y2NjOWQ3ODk5NGUxOGNlM2Y. CSeq: 2 ACK Proxy-Authorization: Digest username="jimmy",realm="10.10.10.2",nonce="4a0d64ae0000001719f1b94b7bc7458a5467b3b3ea53507a",uri="sip:1000@10.10.10.2",response="eebf1cb9ef7f04162511243bf70c72e2",algorithm=MD5 User-Agent: X-Lite release 1006e stamp 34025 Content-Length: 0
################################################# cheers,
Karhu
Hi,
Well it is almost working ;) thanks daniel. The only problem is, i am using kamailio 1.5 and there are no : location_internal and location_external tables in mysql. So it is working from 192.168.0.0/24 to 10.10.10.0/24 network but not in the other way.. I changed (location_internal and location_external) by location table in my .cfg file. I guess it's the problem. Here are the call Flow and my .cfg file.
http://www.nabble.com/file/p23632701/callOk.jpg
http://www.nabble.com/file/p23632701/callNoOk.jpg
And my .cfg file.
# $Id$ # # Simple application level gateway config script. # # Assumes that SER/rtpproxy run on a machine, which connected to # two non-routable letworks: 192.168.0.0/24 and 192.168.1.1/24. # # Correspondingly, this machine has two IP addresses: 192.168.0.1 # and 192.168.1.1. # # 192.168.0.0/24 - "internal" network # 192.168.1.0/24 - "external" network # # rtpproxy started with `-l 192.168.0.1/192.168.1.1' option. #
####### Global Parameters #########
debug=4 log_stderror=yes log_facility=LOG_LOCAL7
fork=yes children=4
/* uncomment the following lines to enable debugging */ #debug=9 #fork=no #log_stderror=no
/* uncomment the next line to disable TCP (default on) */ #disable_tcp=yes
/* uncomment the next line to enable the auto temporary blacklisting of not available destinations (default disabled) */ #disable_dns_blacklist=no
/* uncomment the next line to enable IPv6 lookup after IPv4 dns lookup failures (default disabled) */ #dns_try_ipv6=yes
/* uncomment the next line to disable the auto discovery of local aliases based on revers DNS on IPs (default on) */ #auto_aliases=on #alias=l-at9875.rd.francetelecom.fr:5060
/* uncomment the following lines to enable TLS support (default off) */ #disable_tls = no #listen = tls:your_IP:5061 #tls_verify_server = 1 #tls_verify_client = 1 #tls_require_client_certificate = 0 #tls_method = TLSv1 #tls_certificate = "/usr/local/etc/kamailio/tls/user/user-cert.pem" #tls_private_key = "/usr/local/etc/kamailio/tls/user/user-privkey.pem" #tls_ca_list = "/usr/local/etc/kamailio/tls/user/user-calist.pem"
port=5060
/* uncomment and configure the following line if you want Kamailio to bind on a specific interface/port/proto (default bind on all available) */ listen=udp:192.168.0.2 listen=udp:10.10.10.2
# ------------------ module loading ----------------------------------
#set module path mpath="/usr/local/lib64/kamailio/modules/"
/* uncomment next line for MySQL DB support */ loadmodule "db_mysql.so" loadmodule "mi_fifo.so" loadmodule "sl.so" loadmodule "tm.so" loadmodule "rr.so" loadmodule "pv.so" loadmodule "maxfwd.so" loadmodule "usrloc.so" loadmodule "registrar.so" loadmodule "textops.so" loadmodule "uri_db.so" loadmodule "siputils.so" loadmodule "xlog.so" loadmodule "acc.so" loadmodule "auth.so" loadmodule "auth_db.so" loadmodule "domain.so" loadmodule "presence.so" loadmodule "presence_xml.so" loadmodule "nathelper.so"
/* uncomment next line for aliases support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule "alias_db.so"
# ----------------- setting module-specific parameters ---------------
# ----- mi_fifo params ----- modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
# ----- rr params ----- # add value to ;lr param to cope with most of the UAs modparam("rr", "enable_full_lr", 1) # do not append from tag to the RR (no need for this script) modparam("rr", "append_fromtag", 0)
# ----- rr params ----- modparam("registrar", "method_filtering", 1) /* uncomment the next line to disable parallel forking via location */ modparam("registrar", "append_branches", 0) /* uncomment the next line not to allow more than 10 contacts per AOR */ modparam("registrar", "max_contacts", 10)
# ----- uri_db params ----- /* by default we disable the DB support in the module as we do not need it in this configuration */ modparam("uri_db", "use_uri_table", 0) modparam("uri_db", "db_url", "")
# ----- acc params ----- /* what sepcial events should be accounted ? */ modparam("acc", "early_media", 1) modparam("acc", "report_ack", 1) modparam("acc", "report_cancels", 1) /* by default ww do not adjust the direct of the sequential requests. if you enable this parameter, be sure the enable "append_fromtag" in "rr" module */ modparam("acc", "detect_direction", 0) /* account triggers (flags) */ modparam("acc", "failed_transaction_flag", 3) modparam("acc", "log_flag", 1) modparam("acc", "log_missed_flag", 2) modparam("acc", "log_extra", "src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd") /* uncomment the following lines to enable DB accounting also */ #c#modparam("acc", "db_flag", 1) #c#modparam("acc", "db_missed_flag", 2) #c#modparam("domain", "db_url", #c# "mysql://openser:openserrw@localhost/openser") #c#modparam("acc", "db_extra", #c# "src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
# ----- usrloc params ----- /* uncomment the following lines if you want to enable DB persistency for location entries */ modparam("usrloc", "db_mode", 3) modparam("usrloc", "db_url", "mysql://openser:openserrw@localhost/openser")
# ----- auth_db params ----- /* uncomment the following lines if you want to enable the DB based authentication */ modparam("auth_db", "calculate_ha1", yes) modparam("auth_db", "password_column", "password") modparam("auth_db", "db_url", "mysql://openser:openserrw@localhost/openser") modparam("auth_db", "load_credentials", "")
# ----- alias_db params ----- /* uncomment the following lines if you want to enable the DB based aliases */ #modparam("alias_db", "db_url", # "mysql://openser:openserrw@localhost/openser")
# ----- domain params ----- /* uncomment the following lines to enable multi-domain detection support */ modparam("domain", "db_url", "mysql://openser:openserrw@localhost/openser") modparam("domain", "db_mode", 1) # Use caching
# ----- multi-module params ----- /* uncomment the following line if you want to enable multi-domain support in the modules (dafault off) */ modparam("alias_db|auth_db|usrloc|uri_db", "use_domain", 1)
# ----- presence params ----- /* uncomment the following lines if you want to enable presence */ modparam("presence|presence_xml", "db_url", "mysql://openser:openserrw@localhost/openser") modparam("presence_xml", "force_active", 1) modparam("presence", "server_address", "sip:10.10.10.2:5060")
# -- nathelper modparam("nathelper", "rtpproxy_sock", "udp:127.0.0.1:7890") modparam("nathelper", "natping_interval", 15)
#--------xlog params--------- modparam("xlog","buf_size",8192)
# ------------------ main fun below ----------------------------------
route { # initial sanity checks -- messages with # max_forwars == 0, or excessively long requests, # or those that don't addressed to us if (!mf_process_maxfwd_header("10")) { sl_send_reply("483", "Too Many Hops"); exit; }; if (msg:len > max_len) { sl_send_reply("513", "Message too big"); exit; }; if (!(uri == myself) && method == "INVITE") { sl_send_reply("403", "Call cannot be served here"); exit; };
##### if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if (loose_route()) {
if (is_method("SUBSCRIBE") && uri == myself) { # in-dialog subscribe requests route(3); exit; } if ( is_method("ACK") ) { if ( t_check_trans() ) { # non loose-route, but stateful ACK; must be an ACK after a 487 or e.g. 404 from upstream server t_relay(); exit; } else { # ACK without matching transaction ... ignore and discard.\n"); exit; } } sl_send_reply("404","Not here"); } exit; }
#### Request with no Username in RURI #### # if ($rU==NULL) { # sl_send_reply("484","Address Incomplete"); # exit; # }
##### REGISTER ###### if (method == "REGISTER") { route(2); };
#### BYE CANCEL #### if (method == "BYE" || method == "CANCEL") unforce_rtp_proxy();
##### Do strict routing if pre-loaded route headers present #### if (loose_route()) { t_relay(); exit; };
##### INVITE ###### if (is_method("INVITE")){ route(2); record_route();
} #### PUBLISH/SUBSCRIBE #### if (is_method("PUBLISH|SUBSCRIBE")){ xlog("L_INFO", "SUBSCRIBE: method [$rm] from [$fu]\n"); route(3); };
if (!t_relay()) sl_reply_error();
}
#################### ROUTES ##############################
######### Rtpproxy Bridge mode REGISTER/INVITE methods ########### route[2] { if(is_method("REGISTER")) { if (dst_ip == 10.10.10.2) { save("location"); xlog("L_INFO","REGISTER [$ru] SIP Request: method [$rm] from [$fu] at [$Tf]\n"); } else if (dst_ip == 192.168.0.2) { save("location"); } else { sl_send_reply("403", "Call cannot be served here"); } exit; } if(is_method("INVITE")) { if (lookup("location")) { if (dst_ip == 10.10.10.2) if (force_rtp_proxy("FAII")) t_on_reply("1"); if (dst_ip == 192.168.0.2) if (force_rtp_proxy("FAEI")) t_on_reply("1"); } else if (lookup("location")) { if (dst_ip == 10.10.10.2) if (force_rtp_proxy("FAIE")) t_on_reply("1"); if (dst_ip == 192.168.0.2) if (force_rtp_proxy("FAEE")) t_on_reply("1"); } else { sl_send_reply("403", "Call cannot be served here"); exit; } } return; }
############## Presence ################ route[3] { if (!t_newtran()) { sl_reply_error(); exit; };
if(is_method("PUBLISH")) { handle_publish(); t_release(); } else if( is_method("SUBSCRIBE")) { handle_subscribe(); t_release(); } exit; # if presence enabled, this part will not be executed if (is_method("PUBLISH") || $rU==null) { sl_send_reply("404", "Not here"); exit; } xlog("L_INFO","TestRoute [$fu] est rentre ici a [$Tf]\n"); return; }
onreply_route[1] { if (!(status=~"183" || status=~"200")) exit; force_rtp_proxy("FA"); }
Any idea ?
Cheers, Karhu
On Mittwoch, 20. Mai 2009, karhu wrote:
The only problem is, i am using kamailio 1.5 and there are no : location_internal and location_external tables in mysql. [..]
Hi Karhu,
i can't comment on the rtpproxy stuff at the moment, but for the location table problem you can just create two new tables for this:
CREATE TABLE IF NOT EXISTS location_internal LIKE location;
or something like this, then it should work.
Cheers,
Henning
Thanks Hennings :)
Now it is working fine with new tables location_internal and location_exernal.
Cheers,
Karhu