Page 1 of 1

carrier entry populated in database...

PostPosted: Tue Mar 17, 2015 5:59 pm
by THUFIR
when I run
Code: Select all
sip show peers
it doesn't show the carrier. Granted, I'm coming back to this after a hiatus, but I think I'm repeating the same steps, and am following the manual, of course. The carrier (flawed) carrier entry is in the database:

I've looked through sip-vicidial.conf as well, no luck.


Code: Select all

MariaDB [asterisk]>
MariaDB [asterisk]> select * from vicidial_server_carriers where carrier_id like 'babytel';
+------------+----------------------+-------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+--------+---------------------+------------+
| carrier_id | carrier_name         | registration_string                 | template_id | account_entry                                                                                                                                                                                             | protocol | globals_string                 | dialplan_entry                                                                                                                                             | server_ip    | active | carrier_description | user_group |
+------------+----------------------+-------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+--------+---------------------+------------+
| BABYTEL    | babytel sip trunking |  register => user:test@provider.com | SIP_generic | [testcarrier]
type=peer
host=sip.babytel.ca
username=243465652
secret=jklsdfdhvhsv
qualify=yes
allow=all
canreinvite=no
dtmfmode=rfc2833
rfc2833compensate=yes
insecure=port,invite
trustrpid=yes
context=default  | SIP      | TESTSIPTRUNK = SIP/testcarrier | exten => _91999NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91999NXXXXXX,2,Dial(${TESTSIPTRUNK}/${EXTEN:2},,To)
exten => _91999NXXXXXX,3,Hangup
 | 192.168.0.21 | Y      |                     | ---ALL---  |
+------------+----------------------+-------------------------------------+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+--------+---------------------+------------+
1 row in set (0.00 sec)

MariaDB [asterisk]>





which I entered through the web interface as per the manual.


Also, how do I specify

Code: Select all
SIP Proxy:    sip.babytel.ca
SIP Proxy port:   5060
Outbound Proxy:3    nat5.babytel.ca
Outbound Proxy port:   5065


I added this entry to /etc/hosts:

Code: Select all
198.38.7.34     sip.babytel.ca


as well, but I'm not sure that's necessary. I'm more focused on why the carrier isn't showing in Asterisk. I've waited more than a few minutes for it to load.

Re: carrier entry populated in database...

PostPosted: Tue Mar 17, 2015 6:54 pm
by williamconley
Not for nuthin', but I think you're too smart for your system.

Step back a moment and try showing us the entire carrier setup as it appears in the gui. All the entries. Mostly, of course, the "Active" value and the Account Entry value. But the rest for posterity. 8-)

If you want (at that point) to step back into smart mode, you can check sip-vicidial.conf and see if those values appear (properly).

Re: carrier entry populated in database...

PostPosted: Tue Mar 17, 2015 7:28 pm
by THUFIR
williamconley wrote:Not for nuthin', but I think you're too smart for your system.


Thanks, because I'm feeling quite, well, not that. Ok, here are the parameters from the GUI:


Code: Select all

registration string:               register => 1234567890:fdjskldsfdsvshfdnhl@sip.babytel.ca


 ID:                            BABYTEL
Carrier Name :          baby tel sip trunking
Carrier Description:  free trial
Admin User group:    All
Template_ID:           SIP_generic


[testcarrier]
type=peer
host=sip.babytel.ca
username=1234567890
secret=jfklflbfhvvnsvsh;lghlv;sdvd;sldslfdsl;
qualify=yes
allow=all
canreinvite=no
dtmfmode=rfc2833a
rfc2833compensate=yes
insecure=port,invite
trustrpid=yes
context=default


protocol:  SIP

Global String:   TESTSIPTRUNK = SIP/testcarrier

Dialplan Entry:

exten => _91999NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91999NXXXXXX,2,Dial(${TESTSIPTRUNK}/${EXTEN:2},,To)
exten => _91999NXXXXXX,3,Hangup


server ip:  192.168.0.21

Active:  y





The global string and registration string are the greatest suspects in my mind. thanks for making me just write them out carefully :)


and for posterity ;)

Re: carrier entry populated in database...

PostPosted: Tue Mar 17, 2015 7:31 pm
by williamconley
So ... does the "Account Entry" show in the sip-vicidial.conf file?

Re: carrier entry populated in database...

PostPosted: Tue Mar 17, 2015 7:33 pm
by THUFIR
no.


Code: Select all


tleilax:~ #
tleilax:~ # cat /etc/asterisk/sip-vicidial.conf
; WARNING- THIS FILE IS AUTO-GENERATED BY VICIDIAL, ANY EDITS YOU MAKE WILL BE LOST



[201]
username=201
secret=czCR5FkSlgCA20u
accountcode=201
callerid="jitsi201" <16046289850>
mailbox=201
context=default
type=friend
host=dynamic

[gs102]
username=gs102
secret=czCR5FkSlgCA20u
accountcode=gs102
callerid="Test Admin Phone" <>
mailbox=102
context=default
type=friend
host=dynamic


; END OF FILE    Last Forced System Reload: 2015-02-22 17:28:40
tleilax:~ #
tleilax:~ #





It's a "clean" install of vicibox redux. I can upgrade, or do another clean install, but want to avoid those for right now if possible. Even the upgrade. I have a dummy system I want to practice the upgrade on a bit. (dummy system has bad connectivity.)

Re: carrier entry populated in database...

PostPosted: Tue Mar 17, 2015 7:40 pm
by williamconley
If they do not show in sip-vicidial.conf, try changing the admin->servers "reload configuration files" to Y and see if that causes it to rebuild the files at the next minute mark.

And check your Database for errors and verify that your HD is not full (which will crash your DB, of course).

Code: Select all
mysql asterisk -e "show table status where comment like '%crashed%'" --user=cron -p1234

Re: carrier entry populated in database...

PostPosted: Tue Mar 17, 2015 7:48 pm
by THUFIR
Code: Select all


tleilax:~ #
tleilax:~ # df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       230G  2.4G  216G   2% /
devtmpfs        3.9G   32K  3.9G   1% /dev
tmpfs           4.0G     0  4.0G   0% /dev/shm
tmpfs           4.0G   15M  3.9G   1% /run
tmpfs           4.0G     0  4.0G   0% /sys/fs/cgroup
tmpfs           4.0G   15M  3.9G   1% /var/run
tmpfs           6.0G     0  6.0G   0% /var/spool/asterisk/monitor
tmpfs           4.0G   15M  3.9G   1% /var/lock
tleilax:~ #
tleilax:~ # mysql asterisk -e "show table status where comment like '%crashed%'" --user=cron -p1234
tleilax:~ #



Re: carrier entry populated in database...

PostPosted: Tue Mar 17, 2015 7:58 pm
by williamconley
Does the "reload configuration files" value change from Y to N? Or does it stay at "Y" indicating that it never finished?

Consider running the keepalive script in debug mode to see "whassup".

Re: carrier entry populated in database...

PostPosted: Tue Mar 17, 2015 8:13 pm
by THUFIR
Hmm, I click "y" for:

Code: Select all
Rebuild conf files -If you want to force a rebuilding of the Asterisk conf files or if any of the phones or carrier entries have changed then this should be set to Y. After the conf files have been generated and Asterisk has been reloaded then this will be changed to N. Default is Y.


and then submit. It stays on the page, stays at "y". It should change to N when submit is clicked? Hmm. rebooting server, that's easy. I'll have to find the keepalive script.

Is there a log which would show activity on this?

Re: carrier entry populated in database...

PostPosted: Tue Mar 17, 2015 8:22 pm
by williamconley
Nope. That changes to "N" after it rebuilds the files. This should occur "on the minute" (:00). You can also run keepalive in debug mode, you can see what's happening. Just be sure YOU run it before it runs itself at the :00 after making that setting change.

If it's failing, you should see why. If it claims it's succeeding, there should be some indication of what happens with the file.

Re: carrier entry populated in database...

PostPosted: Tue Mar 17, 2015 8:48 pm
by THUFIR
Code: Select all
tleilax:/ #
tleilax:/ # find -name *keepalive*
./proc/sys/net/ipv4/tcp_keepalive_intvl
./proc/sys/net/ipv4/tcp_keepalive_probes
./proc/sys/net/ipv4/tcp_keepalive_time
./root/subversion/trunk/bin/ADMIN_keepalive_ALL.pl
./var/lib/ntp/proc/sys/net/ipv4/tcp_keepalive_intvl
./var/lib/ntp/proc/sys/net/ipv4/tcp_keepalive_probes
./var/lib/ntp/proc/sys/net/ipv4/tcp_keepalive_time
./usr/src/astguiclient/trunk/bin/ADMIN_keepalive_ALL.pl
./usr/share/astguiclient/ADMIN_keepalive_ALL.pl
tleilax:/ #



/usr/share/astguiclient/Admin_keepalive_all.pl ? run in debug?

Re: carrier entry populated in database...

PostPosted: Tue Mar 17, 2015 8:57 pm
by THUFIR
Code: Select all
VARserver_ip => 192.168.1.3


in astguiclient.conf


that ip address is wrong. I need to config this router to always give same ip address to server based on mac. Ok, going off topic, but found something, definitely, to fix ASAP.


I'll keep looking for the keepalive script, well, looking through it and will google on how to run.

I think, not positive, end of this thread.

Re: carrier entry populated in database...

PostPosted: Tue Mar 17, 2015 9:02 pm
by williamconley
THUFIR wrote:
Code: Select all
/usr/share/astguiclient/ADMIN_keepalive_ALL.pl


Any of the scripts in that folder (AFAIK) can be executed with --help to get options. Such as "--debugX" which is a nice option for that one.

Re: carrier entry populated in database...

PostPosted: Tue Mar 17, 2015 9:08 pm
by williamconley
THUFIR wrote:
Code: Select all
VARserver_ip => 192.168.1.3


in astguiclient.conf


that ip address is wrong. I need to config this router to always give same ip address to server based on mac. Ok, going off topic, but found something, definitely, to fix ASAP.


I'll keep looking for the keepalive script, well, looking through it and will google on how to run.

I think, not positive, end of this thread.

You need to run the IP Update Script to fix that. And then, yes, change the IP to static.

Re: carrier entry populated in database...

PostPosted: Tue Mar 17, 2015 9:52 pm
by THUFIR
getting off topic now, but I see:


Code: Select all
tleilax:/ #
tleilax:/ # find -name ADMIN_update_server_ip.pl
./root/subversion/trunk/bin/ADMIN_update_server_ip.pl
./usr/src/astguiclient/trunk/bin/ADMIN_update_server_ip.pl
./usr/share/astguiclient/ADMIN_update_server_ip.pl
tleilax:/ #
tleilax:/ #



I'd naively expect the subversion one to be the best to run, it gets updated. (I need to upgrade at some point.)

Re: carrier entry populated in database...

PostPosted: Wed Mar 18, 2015 12:50 am
by williamconley
naive=true

the fact that the svn updates is cool, don't get me wrong. but you want to use the scripts that match your running system. the /trunk/ folder is merely a staging point for where the files are "held" prior to install (via install.pl). then they distribute to their Live locations.

oddly enough, there's one in the same folder as the prior perl script.

/usr/share/astguiclient/ contains your active perl scripts. test their options with --help (as previousl mentioned)

Re: carrier entry populated in database...

PostPosted: Wed Mar 18, 2015 2:35 pm
by THUFIR
perfect, script runs now:

viewtopic.php?f=4&t=34251&p=116702#p116702


As always, thanks for your help :)


Not only that, but the original problem was solved in record time! What a coincidence ;)

In all seriousness, thanks for the help guiding me through how to navigate the system. Babytel shows up:


Code: Select all
tleilax:~ #
tleilax:~ # cat /etc/asterisk/sip-vicidial.conf
; WARNING- THIS FILE IS AUTO-GENERATED BY VICIDIAL, ANY EDITS YOU MAKE WILL BE LOST
 register => 16046289850:4rszUyk9@sip.babytel.ca

; VICIDIAL Carrier: BABYTEL - babytel sip trunking
[testcarrier]
type=peer
host=sip.babytel.ca
username=1234567890
secret=234589fggbfvnhjg
qualify=yes
allow=all
canreinvite=no
dtmfmode=rfc2833
rfc2833compensate=yes
insecure=port,invite
trustrpid=yes
context=default
type=friend
host=dynamic
canreinvite=no
context=default


[201]
username=201
secret=czCR5FkSlgCA20u
accountcode=201
callerid="jitsi201" <16046289850>
mailbox=201
context=default
type=friend
host=dynamic

[gs102]
username=gs102
secret=czCR5FkSlgCA20u
accountcode=gs102
callerid="Test Admin Phone" <>
mailbox=102
context=default
type=friend
host=dynamic


; END OF FILE    Last Forced System Reload: 2015-02-22 17:28:40
tleilax:~ #
tleilax:~ #





The entry itself is wrong, but at least its there :)