creating users and phones; dialplan

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

creating users and phones; dialplan

Postby THUFIR » Sat Feb 21, 2015 11:28 pm

I'm trying to take a closer look at some users and phones. I copied user 101 to 102..104 through the GUI:


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



[101]
username=101
secret=password
accountcode=101
callerid="piter devries" <101>
mailbox=101
context=default
type=friend
host=dynamic

[102]
username=102
secret=password
accountcode=102
callerid="baron harkonnen" <102>
mailbox=102
context=default
type=friend
host=dynamic

[103]
username=103
secret=password
accountcode=103
callerid="lady jessica" <103>
mailbox=103
context=default
type=friend
host=dynamic

[104]
username=104
secret=password
accountcode=104
callerid="paul atreides" <104>
mailbox=104
context=default
type=friend
host=dynamic


; END OF FILE    Last Forced System Reload: 2015-02-20 16:49:28
tleilax:~ #



where it says "accountcode" that's the user id?

Some user and phone combinations work, but others don't. For simplicity, the user number maps to the phone extension. As far as I can tell, the only distinction between the users is the extension, caller id, etc. Similarly, the phones are exactly the same, permissions and group wise, with corresponding user numbers.

Code: Select all
tleilax*CLI>
tleilax*CLI> dialplan show 101@default
[ Included context 'vicidial-auto-phones' created by 'pbx_config' ]
  '101' =>          1. Dial(SIP/101,60,)                          [pbx_config]
                    2. Goto(default,85026666666666101,1)          [pbx_config]
                    3. Hangup()                                   [pbx_config]

-= 1 extension (3 priorities) in 1 context. =-
tleilax*CLI>
tleilax*CLI> dialplan show 102@default
[ Included context 'vicidial-auto-phones' created by 'pbx_config' ]
  '102' =>          1. Dial(SIP/102,60,)                          [pbx_config]
                    2. Goto(default,85026666666666102,1)          [pbx_config]
                    3. Hangup()                                   [pbx_config]

-= 1 extension (3 priorities) in 1 context. =-
tleilax*CLI>
tleilax*CLI> dialplan show 103@default
[ Included context 'vicidial-auto-phones' created by 'pbx_config' ]
  '103' =>          1. Dial(SIP/103,60,)                          [pbx_config]
                    2. Goto(default,85026666666666103,1)          [pbx_config]
                    3. Hangup()                                   [pbx_config]

-= 1 extension (3 priorities) in 1 context. =-
tleilax*CLI>
tleilax*CLI> dialplan show 104@default
[ Included context 'vicidial-auto-phones' created by 'pbx_config' ]
  '104' =>          1. Dial(SIP/104,60,)                          [pbx_config]
                    2. Goto(default,85026666666666104,1)          [pbx_config]
                    3. Hangup()                                   [pbx_config]

-= 1 extension (3 priorities) in 1 context. =-
tleilax*CLI>
tleilax*CLI> sip show users
Username                   Secret           Accountcode      Def.Context      ACL  Forcerport
104                        password         104              default          No   Yes       
101                        password         101              default          No   Yes       
102                        password         102              default          No   Yes       
103                        password         103              default          No   Yes       
tleilax*CLI>
tleilax*CLI> sip show user 101


  * Name       : 101
  Secret       : <Set>
  MD5Secret    : <Not set>
  Context      : default
  Language     : en
  Accountcode  : 101
  AMA flags    : Unknown
  Netborder CPD: No
  Transfer mode: open
  MaxCallBR    : 384 kbps
  CallingPres  : Presentation Allowed, Not Screened
  Call limit   : 0
  Callgroup    :
  Pickupgroup  :
  Callerid     : "piter devries" <101>
  ACL          : No
  Sess-Timers  : Accept
  Sess-Refresh : uas
  Sess-Expires : 1800 secs
  Sess-Min-SE  : 90 secs
  RTP Engine   : asterisk
  Codec Order  : (ulaw:20,gsm:20)
  Auto-Framing:  No

tleilax*CLI>
tleilax*CLI> sip show user 103


  * Name       : 103
  Secret       : <Set>
  MD5Secret    : <Not set>
  Context      : default
  Language     : en
  Accountcode  : 103
  AMA flags    : Unknown
  Netborder CPD: No
  Transfer mode: open
  MaxCallBR    : 384 kbps
  CallingPres  : Presentation Allowed, Not Screened
  Call limit   : 0
  Callgroup    :
  Pickupgroup  :
  Callerid     : "lady jessica" <103>
  ACL          : No
  Sess-Timers  : Accept
  Sess-Refresh : uas
  Sess-Expires : 1800 secs
  Sess-Min-SE  : 90 secs
  RTP Engine   : asterisk
  Codec Order  : (ulaw:20,gsm:20)
  Auto-Framing:  No

tleilax*CLI>
tleilax*CLI> sip show user 104


  * Name       : 104
  Secret       : <Set>
  MD5Secret    : <Not set>
  Context      : default
  Language     : en
  Accountcode  : 104
  AMA flags    : Unknown
  Netborder CPD: No
  Transfer mode: open
  MaxCallBR    : 384 kbps
  CallingPres  : Presentation Allowed, Not Screened
  Call limit   : 0
  Callgroup    :
  Pickupgroup  :
  Callerid     : "paul atreides" <104>
  ACL          : No
  Sess-Timers  : Accept
  Sess-Refresh : uas
  Sess-Expires : 1800 secs
  Sess-Min-SE  : 90 secs
  RTP Engine   : asterisk
  Codec Order  : (ulaw:20,gsm:20)
  Auto-Framing:  No

tleilax*CLI>




I'm aware that some of this information is in extensions-vicidial.conf, but that file is hard to follow.

I can only guess that some some user/phone combinations have trouble logging in because of problems with the dialplan..but I'm not sure how to take a closer look at that.

How do I take a closer look at the dialplan for a specific user? Or, take a look at a specific user, in general?


I think some of this information is in the database:

Code: Select all
MariaDB [asterisk]>
MariaDB [asterisk]> select user_id,user,full_name,phone_login,active,user_code from vicidial_users;
+---------+---------+--------------------+-------------+--------+-----------+
| user_id | user    | full_name          | phone_login | active | user_code |
+---------+---------+--------------------+-------------+--------+-----------+
|       1 | 6666    | Admin              | NULL        | Y      |           |
|       2 | VDAD    | Outbound Auto Dial | NULL        | N      |           |
|       3 | VDCL    | Inbound No Agent   | NULL        | N      |           |
|       4 | 9999    | admin              |             | Y      |           |
|       5 | 101     | piter devries      | 101         | Y      |           |
|       7 | 102     | baron harkonnen    | 102         | Y      |           |
|       8 | 103     | lady jessica       | 103         | Y      |           |
|       9 | muaddib | paul atreides      | arrakis     | Y      |           |
+---------+---------+--------------------+-------------+--------+-----------+
8 rows in set (0.00 sec)

MariaDB [asterisk]>
MariaDB [asterisk]>
MariaDB [asterisk]> select extension,dialplan_number,voicemail_id,login,status,active,login_user,login_campaign from phones;
+-----------+-----------------+--------------+---------+--------+--------+------------+----------------+
| extension | dialplan_number | voicemail_id | login   | status | active | login_user | login_campaign |
+-----------+-----------------+--------------+---------+--------+--------+------------+----------------+
| callin    | 8300            | 8300         | callin  | ACTIVE | Y      | NULL       | NULL           |
| 103       | 103             | 103          | 103     | ACTIVE | Y      | NULL       | NULL           |
| 101       | 101             | 101          | 101     | ACTIVE | Y      |            |                |
| 102       | 102             | 102          | 102     | ACTIVE | Y      |            |                |
| 104       | 104             | 104          | muaddib | ACTIVE | Y      |            |                |
+-----------+-----------------+--------------+---------+--------+--------+------------+----------------+
5 rows in set (0.00 sec)

MariaDB [asterisk]>



What's the significance of extension 103 having "NULL" for login_user?


ViciBox Redux v.6.0.3-141118 from DVD
ViciBox Redux v.6.0.3-141118 from .iso | Single Server | No Digium/Sangoma Hardware | No Extra Software After Installation | AMD Phenom(tm) II X6 1090T Processor | 8GiB RAM
THUFIR
 
Posts: 109
Joined: Fri May 02, 2014 10:46 pm

Re: creating users and phones; dialplan

Postby bobchaos » Fri May 01, 2015 8:40 pm

I'd recommend you create your phones and users in the Vicidial admin interface, it will handle all the dialplan stuff for you. If you're unsure about what a field does or what goes in it, there's a convinient "?" button that provides help on each field.

As for tracking down the dialplan entries, Vicidial does some really fancy stuff in Asterisk, I'd recommend you don't look too closely at it unless you want to spend days tracking down references from dialplan to AGI script, back to dialplan, etc... o.O You can just trust that it's working fine. The only dial plans that are required of the user are for the outbound trunk when creating carriers, and there's commented examples in extensions.conf to help with that.

I also couldn't help but notice this must be the 5th post of yours I answer today... Have you read the manual? I bet a peek in there would save you lots of time, trouble and frustration messing with the back end. It has walkthroughs for all the common scenarios, including setting up users.
bobchaos
 
Posts: 171
Joined: Fri Jan 06, 2012 12:46 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 51 guests