LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-08-2014, 12:28 AM   #1
godfather9112
LQ Newbie
 
Registered: Oct 2014
Posts: 10

Rep: Reputation: Disabled
installation SIP protocol in NS2


i simulate a VOIP system on ns2 with SIP protocol

but when i run it this error has been occured
" invalid command name "Agent/SIPProxy"

how should i install SIP protocol on NS2?
 
Old 10-08-2014, 04:16 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

The "SIP and VOIP info" I have for ns2 is attached.
-
Attached Files
File Type: txt TextFile-Voip.txt (783 Bytes, 155 views)
File Type: txt SIP-info.txt (718 Bytes, 163 views)
 
1 members found this post helpful.
Old 10-15-2014, 04:43 AM   #3
godfather9112
LQ Newbie
 
Registered: Oct 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
modules in ns2.35

dear knudfl
I download the file from http://code.dma.unipi.it/projects/ns...nk/ns-2.29/sip
BUT how add them to ns2.35?
 
Old 10-15-2014, 05:45 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #3 .
Quote:
I download the file
Which file ? ?

" trunk-r104.zip " ?
 
Old 10-15-2014, 09:09 AM   #5
godfather9112
LQ Newbie
 
Registered: Oct 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
files

i download all .cc and .h files that were in this address http://code.dma.unipi.it/projects/ns...nk/ns-2.29/sip
and i dont know how should i add them to ns2.35.

Last edited by godfather9112; 10-15-2014 at 09:11 AM.
 
Old 10-15-2014, 12:44 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 5 .

This is the {ns-2.29 part of SIP} + {simulation = sim/}
http://code.dma.unipi.it/projects/ns.../browser/trunk
... You only got "ns-2.29/sip/{files*}"

Normally the first thing to do is : Setup ns-allinone-2.29(.3),
.. to find out if SIP works in the original environment.
* Else no reason to port the files to a later version.

"sim/ + sip-example-tcl/" : sip-examples-2014.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing

Note : You can have as many versions of ns-allinone-2.xx as you want,
installed at the same time. But do never add any *PATH text to .bashrc.

NS-2.29 + sip, example :
$ tar xvf ns-allinone-2.29.3.tar.gz
$ cd ns-allinone-2.29/
$ patch -p0 < sip-svn.r29__ns229.patch (I can't download trunk-r104.zip.)
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ export CC=gcc41 CXX=g++41 && ./install
$ cd ns-2.29/
# make install


NS-2.35 : Suggest → Voip++_ns235.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
-
Attached Files
File Type: txt sip_ns229_overview-diff-r.txt (4.8 KB, 81 views)

Last edited by knudfl; 10-15-2014 at 12:46 PM.
 
Old 10-16-2014, 03:33 AM   #7
godfather9112
LQ Newbie
 
Registered: Oct 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
I did all this works. i run patch an i install and edit .bashrc for ns2.29 file but when run the example.tcl that was in this address:

http://code.dma.unipi.it/projects/ns...trunk/sim/test

or when run my project this error occure again


mh@mh:~/Desktop$ ns example.tcl
invalid command name "Agent/SIPProxy"
while executing
"Agent/SIPProxy create _o245 atlanta.com"
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new Agent/SIPProxy atlanta.com"
invoked from within
"set sipATL [new Agent/SIPProxy atlanta.com]"
(file "example.tcl" line 75)
 
Old 10-16-2014, 04:14 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #7 .
Quote:
... I install and edit .bashrc
Please read post #6 : ".. do never add any *PATH text to .bashrc."

The text about .bashrc is to be used only with a University Computer,
with no write access to /usr/. (The text origins from year 1999 ?)
* I guess you can do # 'make install', to have /usr/local/bin/ns ?
The executable 'ns' is hard coded to know any library location.
So adding a text to .bashrc really makes no sense.

The valid SIP examples are in "sip-examples-2014.tar.gz": Read post #6.
`example.tcl´ from http://code.dma.unipi.it/projects/ns...tcl?format=txt
... is not a valid example (for r29), I think :
[knudfl@localhost]$ ./ns-sip-r29 example.tcl
invalid command name "Agent/OCProxy"
while executing
"Agent/OCProxy create _o247 biloxi.com"
"set sipBLX [new Agent/OCProxy biloxi.com]"
(file "example.tcl" line 79)

.... Don't know why you get {invalid command name "Agent/SIPProxy"}.
? A failed build of ns-2.29.3 + sip-svn.r29__ns229.patch ?
Or you may be using the 'ns' you have from ns-2.35 ?
→ An 'ns' with no "sip" will show `invalid command name "Agent/SIPProxy".

Any questions ? Then please specify your OS :
a) Show the reply from the command $ uname -m
b) OS name and version, please.

-

Last edited by knudfl; 10-16-2014 at 04:51 AM.
 
Old 10-16-2014, 05:18 AM   #9
godfather9112
LQ Newbie
 
Registered: Oct 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
my OS is ubuntu 14.04 LTS
x86-64

when i run ns without editing bash file, this error occure
"The program 'ns' is currently not installed. You can install it by typing:
sudo apt-get install ns2"


but when i write in terminal sudo gedit .bashrc and copy this address:

PATH=$PATH:/home/mh/ns229/bin:/home/mh/ns229/tcl8.4.11/unix:/home/mh/ns229/tk8.4.11/unix
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/mh/ns229/otcl-1.11/home/mh/ns229/lib
TCL_LIBRARY=$TCL_LIBRARY:/home/mh/ns229/tcl8.4.11/library
export PATH
export LD_LIBRARY_PATH
export TCL_LIBRARY

then $source .bashrc
and run ns myproject.tcl that error occur ("invalid command....")
 
Old 10-16-2014, 06:00 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #8.

Got the extra files for "rev 104" from ...
http://code.dma.unipi.it/projects/ns.../trunk/ns-2.29
.. and made an additional "patch package" ...
`sip_r104-adds-to-r29__ns229.tar.gz´, 44.6 kB :
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ cd ns-allinone-2.29/(patched-with-r29)
$ tar xvf sip_r104-adds-to-r29__ns229.tar.gz
$ cd ns-2.29/
$ make distclean
$ cd ../
$ export CC=gcc41 CXX=g++41 (My example ns229 compiler)
$ ./install
$ cd ns-2.29/
# make install
$ cp ns ns229-sip-r104
# cp ns229-sip-r104 /usr/local/bin/
.... And now the example.tcl works, with the r104 added "OCProxy" :
Code:
[knudfl@localhost sip-example-tcl]$ ./ns229-sip-r104 example.tcl


costruttore OCProxy
Default value for cluster_num set to 4

Default value for nodes_num set to 5

tasso di servizio a Tm= 1secondi pari a 0
OCProxy ha servito 0INVITE
tasso di servizio a Tm= 2secondi pari a 0
tasso di servizio a Tm= 3secondi pari a 0
tasso di servizio a Tm= 4secondi pari a 0
Node 1.1.2: initiating session 3 from alice@atlanta.com to bob@biloxi.com
__NS__	3	5
tasso di servizio a Tm= 5secondi pari a 0
OCProxy ha servito 0INVITE
Node 1.1.2: session 3 from alice@atlanta.com to bob@biloxi.com succeeded
__NS__	3	5.421
inviteServiceRate = 0.183211
sono in SIPTransLayer, inviteServiced = 1
inviteServiceRate = 0.181528
sono in SIPTransLayer, inviteServiced = 1
inviteServiceRate = 0.18031
sono in SIPTransLayer, inviteServiced = 1
tasso di servizio a Tm= 6secondi pari a 0
tasso di servizio a Tm= 7secondi pari a 0
tasso di servizio a Tm= 8secondi pari a 0
tasso di servizio a Tm= 9secondi pari a 0
il tasso di servizio a Tc10 secondi è0
Node 2.1.2: ending session 3 from bob@biloxi.com to alice@atlanta.com
tasso di servizio a Tm= 10secondi pari a 0
OCProxy ha servito 1INVITE
Node 2.1.2: session 3 from bob@biloxi.com to alice@atlanta.com terminated
tasso di servizio a Tm= 11secondi pari a 1
tasso di servizio a Tm= 12secondi pari a 1
tasso di servizio a Tm= 13secondi pari a 1
tasso di servizio a Tm= 14secondi pari a 1
tasso di servizio a Tm= 15secondi pari a 1
tasso di servizio a Tm= 16secondi pari a 1
tasso di servizio a Tm= 17secondi pari a 1
tasso di servizio a Tm= 18secondi pari a 1
tasso di servizio a Tm= 19secondi pari a 1
il tasso di servizio a Tc20 secondi è0
tasso di servizio a Tm= 20secondi pari a 1
tasso di servizio a Tm= 21secondi pari a 1
tasso di servizio a Tm= 22secondi pari a 1
tasso di servizio a Tm= 23secondi pari a 1
tasso di servizio a Tm= 24secondi pari a 1
tasso di servizio a Tm= 25secondi pari a 1
tasso di servizio a Tm= 26secondi pari a 1
tasso di servizio a Tm= 27secondi pari a 1
tasso di servizio a Tm= 28secondi pari a 1
tasso di servizio a Tm= 29secondi pari a 1
il tasso di servizio a Tc30 secondi è0
tasso di servizio a Tm= 30secondi pari a 1
tasso di servizio a Tm= 31secondi pari a 1
tasso di servizio a Tm= 32secondi pari a 1
tasso di servizio a Tm= 33secondi pari a 1
tasso di servizio a Tm= 34secondi pari a 1
tasso di servizio a Tm= 35secondi pari a 1
tasso di servizio a Tm= 36secondi pari a 1
tasso di servizio a Tm= 37secondi pari a 1
tasso di servizio a Tm= 38secondi pari a 1
tasso di servizio a Tm= 39secondi pari a 1
il tasso di servizio a Tc40 secondi è0
tasso di servizio a Tm= 40secondi pari a 1
tasso di servizio a Tm= 41secondi pari a 1
tasso di servizio a Tm= 42secondi pari a 1
tasso di servizio a Tm= 43secondi pari a 1
tasso di servizio a Tm= 44secondi pari a 1
tasso di servizio a Tm= 45secondi pari a 1
tasso di servizio a Tm= 46secondi pari a 1
tasso di servizio a Tm= 47secondi pari a 1
tasso di servizio a Tm= 48secondi pari a 1
tasso di servizio a Tm= 49secondi pari a 1
il tasso di servizio a Tc50 secondi è0
tasso di servizio a Tm= 50secondi pari a 1
tasso di servizio a Tm= 51secondi pari a 1
tasso di servizio a Tm= 52secondi pari a 1
tasso di servizio a Tm= 53secondi pari a 1
tasso di servizio a Tm= 54secondi pari a 1
tasso di servizio a Tm= 55secondi pari a 1
tasso di servizio a Tm= 56secondi pari a 1
tasso di servizio a Tm= 57secondi pari a 1
tasso di servizio a Tm= 58secondi pari a 1
tasso di servizio a Tm= 59secondi pari a 1
il tasso di servizio a Tc60 secondi è0
tasso di servizio a Tm= 60secondi pari a 1
tasso di servizio a Tm= 61secondi pari a 1
tasso di servizio a Tm= 62secondi pari a 1
tasso di servizio a Tm= 63secondi pari a 1
tasso di servizio a Tm= 64secondi pari a 1
tasso di servizio a Tm= 65secondi pari a 1
tasso di servizio a Tm= 66secondi pari a 1
tasso di servizio a Tm= 67secondi pari a 1
tasso di servizio a Tm= 68secondi pari a 1
tasso di servizio a Tm= 69secondi pari a 1
il tasso di servizio a Tc70 secondi è0
tasso di servizio a Tm= 70secondi pari a 1
tasso di servizio a Tm= 71secondi pari a 1
tasso di servizio a Tm= 72secondi pari a 1
tasso di servizio a Tm= 73secondi pari a 1
tasso di servizio a Tm= 74secondi pari a 1
tasso di servizio a Tm= 75secondi pari a 1
tasso di servizio a Tm= 76secondi pari a 1
tasso di servizio a Tm= 77secondi pari a 1
tasso di servizio a Tm= 78secondi pari a 1
tasso di servizio a Tm= 79secondi pari a 1
il tasso di servizio a Tc80 secondi è0
tasso di servizio a Tm= 80secondi pari a 1
tasso di servizio a Tm= 81secondi pari a 1
tasso di servizio a Tm= 82secondi pari a 1
tasso di servizio a Tm= 83secondi pari a 1
tasso di servizio a Tm= 84secondi pari a 1
tasso di servizio a Tm= 85secondi pari a 1
tasso di servizio a Tm= 86secondi pari a 1
tasso di servizio a Tm= 87secondi pari a 1
tasso di servizio a Tm= 88secondi pari a 1
tasso di servizio a Tm= 89secondi pari a 1
il tasso di servizio a Tc90 secondi è0
tasso di servizio a Tm= 90secondi pari a 1
tasso di servizio a Tm= 91secondi pari a 1
tasso di servizio a Tm= 92secondi pari a 1
tasso di servizio a Tm= 93secondi pari a 1
tasso di servizio a Tm= 94secondi pari a 1
tasso di servizio a Tm= 95secondi pari a 1
tasso di servizio a Tm= 96secondi pari a 1
tasso di servizio a Tm= 97secondi pari a 1
tasso di servizio a Tm= 98secondi pari a 1
tasso di servizio a Tm= 99secondi pari a 1
NS-simulation finished!

Last edited by knudfl; 10-16-2014 at 06:03 AM.
 
Old 10-16-2014, 06:12 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Your post #9 :

? Why can't you do $ cd ns-2.29/ && sudo make install
To avoid the unnecessary text adds to .bashrc ?
And to make sure you are using the right 'ns'.

Ubuntu 14.04 - x86_64 : ns2 is for a 32bits (i686).
However the most protocols will also work with a 64bits OS.
I will check with Ubuntu 14.04 (x86_64) and let you know the result.

-
 
1 members found this post helpful.
Old 10-16-2014, 07:44 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
SIP-r104 , Ubuntu 14.04 - 64bits.

← #9 .

Download the compilers :
compat-gcc34 https://drive.google.com/file/d/0B7S...ew?usp=sharing
→ compat-gcc34-3.4.6-ubuntu1204-1_amd64.deb
compat-g++34 https://drive.google.com/file/d/0B7S...ew?usp=sharing
→ compat-gcc-34-c++_3.4.6-20_amd64.deb
Download nam https://drive.google.com/file/d/0B7S...ew?usp=sharing
→ nam_1.15-10-ubuntu14_amd64.deb
..... Click the three packages, and they will be installed.

$ tar xvf ns-allinone-2.29.3.tar.gz
$ cd ns-allinone-2.29/
$ patch -p0 < sip-svn.r29__ns229.patch
$ tar xvf sip_r104-adds-to-r29__ns229.tar.gz
$ export CC=gcc34 CXX=g++34
$ ./install
$ cd ns-2.29/
$ sudo make install
$ cp ns ns229-sip-r104
$ sudo cp ns229-sip-r104 /usr/local/bin/

$ ns229-sip-r104 example.tcl : OK, the files out_sip_test.nam 29.6kB
... and out_sip_test.tr 12.5kB are created.

$ nam out_sip_test.nam : OK.

-
 
1 members found this post helpful.
Old 10-17-2014, 04:55 AM   #13
godfather9112
LQ Newbie
 
Registered: Oct 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thumbs up finish!!

Dear knudfl i just can say thank you very very very much!!!
i really appreciate your help.
your latest post was very helpful.
 
Old 02-17-2015, 09:02 AM   #14
lilly sofhi
LQ Newbie
 
Registered: Feb 2015
Posts: 7
Blog Entries: 2

Rep: Reputation: Disabled
Sip query

sir i want sip for 2.34 in fedora enviroment. do anyone have it?plz hepl me i am in need of it?
I also need the steps to install it
if anyone have programs regarding sip ..plz help me
 
Old 02-17-2015, 11:06 AM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← ref. #14, @lilly sofhi.

First : http://www.linuxquestions.org/questi...-4175525085/#8
* Duplicate posts are not allowed at LQ.
* And you hijacked another member´s thread for an off topic question.
→ Read this http://www.linuxquestions.org/linux/rules.html
* Text speak, read http://en.wikipedia.org/wiki/Etiquet...ogy#Netiquette
* What do you mean by `urgent´ ?
We are volunteers, answering in our spare time. Not urgent to us.


Now to SIP : The Voip / sip available for ns-2.34 is Voip++
. http://network-simulator-ns-2.7690.n...28.html#a29630
. https://groups.google.com/forum/?fro...Y/YRqq_w6-CfkJ
. https://groups.google.com/forum/?fro...I/Nji2_9CX5DoJ
→ 01 Oct 2014 → Voip++_ns234_gcc-4.4.patch


-
 
  


Reply

Tags
g++34-compat64, ns2, sip-ns2, voip-ns2



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LEACH protocol installation on NS2.27 lubelube Linux - Software 50 04-18-2013 05:02 AM
LEACH protocol installation on NS2.27 Scofield Linux - General 255 03-08-2012 05:19 PM
weight throwing protocol using ns2 code,diffusion based protocol using ns2 code rajrupa Linux - Networking 1 05-27-2010 03:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 07:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration