результат тот же.
Для SIP пользователей имя в текущей конференции отображается из users.conf
Для городских номеров --- Без имени.
Единственное, что менял в конфигах - /etc/asterisk/extensions.conf добавил две строчки для выхода в город (через dahdi pri)
Код: Выделить всё
[meetme_out]
exten => _XXXX,1,NoOP( ${CALLERID(name)} ${CALLERID(num)} )
exten => _XXXX,n,Dial(SIP/${EXTEN})
exten => _XXXXXXX,1,NoOP( ${CALLERID(name)} ${CALLERID(num)} )
exten => _XXXXXXX,n,Dial(Dahdi/g1/0${EXTEN})
exten => _83532XXXXXX,1,NoOP( ${CALLERID(name)} ${CALLERID(num)} )
exten => _83532XXXXXX,n,Dial(SIP/oren-kamailio/${EXTEN:5})
[meetme]
exten => s,1,MeetMe()
exten => h,1,ExecIf(0${MEETMEBOOKID}?NoOp(${CALLERID(name)}))
exten => h,n,Set(CDR(userfield)=${MEETMEBOOKID})
[inbound]
exten => _X!,1,GoSubIf(0${CALLERID(num)}?sub-cidlookup,s,1)
exten => _X!,n,NoOP( ${CALLERID(name)} ${CALLERID(num)} )
;exten => _X!,n,Playback(conf-getconfno,noanswer)
exten => _X!,n,Goto(meetme,s,1)
[sub-cidlookup]
exten => s,1,GotoIf($[ ${LEN(${CALLERID(num)})} = 10 ]?add8)
exten => s,n,GotoIf($[ $[ ${LEN(${CALLERID(num)})} = 11 ] & $[ "${CALLERID(num):0:1}" = "8" ] ]?end)
exten => s,n,ExecIf( $[${LEN(${CALLERID(num)})} = 6 ]?Set(CALLERID(num)=83532${CALLERID(num)}) )
exten => s,n,ExecIf( $[${LEN(${CALLERID(num)})} = 5 ]?Set(CALLERID(num)=835342${CALLERID(num)}) )
exten => s,n,Goto(end)
exten => s,n(add8),Set(CALLERID(num)=8${CALLERID(num)})
exten => s,n(end),Set(CALLERID(name)=${CALLERID(num)})
exten => s,n,MYSQL(Connect connid localhost meetme2 cn927hajr21KEFSJ meet2)
;exten => s,n,MYSQL(Query resultid ${connid} SET NAMES utf8)
exten => s,n,MYSQL(Query resultid ${connid} SELECT name,rx,tx FROM addressbook WHERE number = '${CALLERID(num)}' LIMIT 1)
exten => s,n,MYSQL(Fetch fetchid ${resultid} NAMETEMP VOLRX VOLTX)
exten => s,n,MYSQL(Clear ${resultid})
exten => s,n,MYSQL(Disconnect ${connid})
exten => s,n,ExecIf($["${VOLRX}" != "0"]?Set(VOLUME(RX)=${VOLRX}))
exten => s,n,ExecIf($["${VOLTX}" != "0"]?Set(VOLUME(TX)=${VOLTX}))
exten => s,n,ExecIf($["foo${NAMETEMP}" != "foo"]?Set(CALLERID(name)=${NAMETEMP}))
exten => s,n,Return()
В базе например есть запись
Код: Выделить всё
mysql> use meet2
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from addressbook
-> ;
+----+---------------------------+---------+----+----+
| id | name | number | rx | tx |
+----+---------------------------+---------+----+----+
| 1 | Test | 8113 | 6 | 6 |
| 3 | Test | 5068821 | 0 | 0 |
+----+---------------------------+---------+----+----+
2 rows in set (0.00 sec)
а в вебе Без имени.
В это время в логах
Код: Выделить всё
-- Executing [5068821@meetme_out:1] NoOp("Local/5068821@meetme_out-9a92;2", " Test 5068821 ") in new stack
-- Executing [5068821@meetme_out:2] Dial("Local/5068821@meetme_out-9a92;2", "Dahdi/g1/05068821") in new stack
-- Requested transfer capability: 0x00 - SPEECH
-- Called Dahdi/g1/05068821
-- DAHDI/i1/05068821-4 is proceeding passing it to Local/5068821@meetme_out-9a92;2
-- DAHDI/i1/05068821-4 is ringing
-- DAHDI/i1/05068821-4 answered Local/5068821@meetme_out-9a92;2
== Parsing '/etc/asterisk/meetme.conf': == Found
-- Created MeetMe conference 1023 for conference '5'
-- <Local/5068821@meetme_out-9a92;1> Playing 'conf-onlyperson.slin' (language 'en')
-- Started music on hold, class 'default', on Local/5068821@meetme_out-9a92;1
-- Stopped music on hold on Local/5068821@meetme_out-9a92;1
-- Started music on hold, class 'default', on Local/5068821@meetme_out-9a92;1
voip*CLI> meetme list 5 concise
1!!!Local/5068821@meetme_out-9a92;1!!!!!-1!00:00:12