endpoint_configuration modified.

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#1
I don't where i post this information. So.... :dry:

I modified the endpoint_configuration's module. Because this module by default scan the 192.168.1.0/24 and not the true network!

So, into index.php, i add this:



  • function network()
    {
    $ip=$_SERVER['SERVER_ADDR'];
    list($oc1, $oc2, $oc3, $oc4)=explode(".",$ip);
    return $oc1.".".$oc2.".".$oc3.".0/24";
    }
    echo network();


and replace this 2 lines:

$endpoint_mask = isset($_POST['endpoint_mask'])?$_POST['endpoint_mask']:"192.168.1.0/24";
$endpoint_mask = isset($_POST['endpoint_mask'])?$_POST['endpoint_mask']:'192.168.1.0/24';


by

$endpoint_mask = isset($_POST['endpoint_mask'])?$_POST['endpoint_mask']:network();
$endpoint_mask = isset($_POST['endpoint_mask'])?$_POST['endpoint_mask']:network();


And now, if your network is 10.1.50.0, you have no problem to scan directly your extension!!

Cool no?
 

rafael

Joined
May 14, 2007
Messages
1,454
Likes
1
Points
0
#2
Thanks a lot Danardf, I would make sure the devel people put this on the next release.

BTW I moved to tip and tricks as I believe is the best place for this kind of posts.

Regards,

Rafael
 

bmacias

Joined
Sep 27, 2007
Messages
205
Likes
0
Points
0
#3
Thank you danardf:

Our go to add this source.
In next version elastix 1.3 is posible.
;)
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#4
ok thanks. But, you must test with another network before include this code.

Normally it's good.
 

rafael

Joined
May 14, 2007
Messages
1,454
Likes
1
Points
0
#5
I think it should work find as long as the networks are allways /24. It works find for my 192.168.2.0/24 net.

Regards,

Rafael
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#6
Ok! Good news. :)

Regards
 

paulsoddy

Joined
Sep 9, 2008
Messages
12
Likes
0
Points
0
#7
Thanks for this great TIP.
 

sskiba

Joined
Aug 4, 2008
Messages
45
Likes
0
Points
0
#8
Hey danardf,

I tried your fix & it worked great. I've been spending a lot of time going in and out of our endpoint config page & it was a little annoying to have to type in our address everytime. Thanks for your cool fix.

Steve
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#9
Cool. :woohoo:
 

paulsoddy

Joined
Sep 9, 2008
Messages
12
Likes
0
Points
0
#10
Hello danardf,

Endpoint Configuration tool works like a charm for SPA922 and SPA942 but 1 extension setup only. I couldn't setup polycom 501's et al yet and I was wondering if you can give us some pointers for how to setup Polycom 501's.

I can't see what are the errors because simply I don't know where to look for tftp log. I tried to monitor 'less /var/log/messages' but there is no tftp error recorded. How can I turn on TFTP logging so I can see what kind of setup file these Polycoms are looking for.

Next step after that is how can we setup 942 and polycom phone with multiple extensions.

Thanks.
 

rafael

Joined
May 14, 2007
Messages
1,454
Likes
1
Points
0

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#12
Hello.
All your extension are recognised?
If no, I would like to know what MAC address is not recognised?

for your tftp info, 2 solutions.

into your /var/log/messages, you must be something kike that:

xinetd[2456]: START: tftp pid=20581 from=x.x.x.x

or one process appears (different of "in.tftpd -s /tftpboot") and look by command:

>ps -ef | grep tftp

To do when reset your extension.
 

dard

Joined
Sep 18, 2008
Messages
16
Likes
0
Points
0
#13
Hello,
I'm the one who recently added a lot of Cisco phone MACs to the wiki. Thank you for including them in the 1.3 beta release. I setup one phone and the .cnf file that Elastix made has a lot of info in it but it doesn't include the extension/line info for the phone that's needed to populate the phone's SIP configuration line settings. Is there something I'm not doing correctly in Elastix? I've attached a printscreen of my endpoint confuration page which shows my test phone and extension, the 000b5faaba2b.cnf file Elastix made without the extension/line info and my working SIP000B5FAABA2B.cnf file with the extension line info. Also, the Elastix made .cnf file has a /trixbox path for the logo_url.
Thanks,
Darlene
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#14
Good works. ;)

On this logo's sujest. It's true that's the same file as Trixbox. :angry:


  • # URL for external Phone Services
    services_url: "http://X.X.X.X/xmlservices/index.php"

    # URL for external Directory location
    directory_url: "http://X.X.X.X/xmlservices/PhoneDirectory.php"

    # URL for branding logo
    logo_url: "http://X.X.X.X/cisco/bmp/trixbox.bmp"


And, for this logo_url's line, don't works.
You can try it for exemple with this url:
http://asterisk.agmp.org/images/asterisk-tux.bmp

I think that they must to make 2 files.
SIPDefault.cnf
SIP001./mac/..E.cnf

The first file, will be the common file (with all the common parameters connexion...Etc). Exemple:

  • # Image Version
    image_version: "P0S3-08-4-00"

    # Proxy Server
    proxy1_address: "193.107.20.38"
    proxy2_address: ""
    proxy3_address: ""
    proxy4_address: ""
    proxy5_address: ""
    proxy6_address: ""

    # Proxy Server Port (default - 5060)
    proxy1_port:"5060"
    ...

    ...



The second file, only one extension lines. Exemple:

  • # Cisco SIP Configuration

    phone_label: "Poste Etage"
    line1_name: "104"
    line1_authname: "104"
    line1_shortname: "L1"
    line1_displayname: "104"
    line1_password: "****"
    line2_name: "104"
    line2_authname: "104"
    line2_shortname: "L2"
    line2_displayname: "104"
    line2_password: "****"

It is important that we can inform some data's configuration file, as for example, the hour's format (12 - 24h).
Also, the binary file's version.

If you need a binary file, I have one. ;)


  • -rw-r--r-- 1 root root 93 Apr 4 12:46 dialplan.xml
    -rw-r--r-- 1 root root 9570 Apr 4 12:46 merlin2.pcm
    -rw-r--r-- 1 root root 14 Apr 4 12:46 OS79XX.TXT
    -rw-r--r-- 1 root root 459 Apr 4 12:46 P0S3-08-4-00.loads
    -rw-r--r-- 1 root root 752508 Apr 4 12:47 P0S3-08-4-00.sb2
    -rw-r--r-- 1 root root 26 Apr 4 12:46 RINGLIST.DAT
 

dard

Joined
Sep 18, 2008
Messages
16
Likes
0
Points
0
#15
Sorry. My attachments didn't attach before, I am trying to attach again. I already have working Cisco phones with my attached SIP000B5FAABA2B.cnf. The Elastix generated 000b5faaba2b.cnf file needs the line/extension info. The Endpoint Configuration isn't including the extension info in the .cnf file so it will not work.

Thanks,
Darlene http://forum.elastix.org/old_files/cnfs.zip
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#16
Your logo image appear to your Cisco?
 

dard

Joined
Sep 18, 2008
Messages
16
Likes
0
Points
0
#17
Yes. Everything works. I attached the Endpoint Configuration print screen with the 3607 extension and my 000b5faaba2b MAC address Cisco 7960.
 

dard

Joined
Sep 18, 2008
Messages
16
Likes
0
Points
0

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#19
dard said:
The Endpoint Configuration isn't including the extension info in the .cnf file so it will not work.

Thanks,
The config don't work because, the binary version it's of base.
Put the same version

image_version: "P0S3-07-5-00"

For me, i put image_version: "P0S3-08-4-00"
If you put P0S3-07-5-00, you must have the same binary!
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#20

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,887
Members
17,567
Latest member
achilont13
Top