Архив рубрики: debian

sip.conf extensions.conf пример

/etc/asterisk# cat sip.conf
[general]
context=default 4 MAYO” ; Default context for incoming calls
bindport=5060 wholesale jerseys ; UDP Port to bind to (SIP standard port is move 5060)
bindaddr=0.0.0.0 wholesale mlb jerseys ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes wholesale nfl jerseys ; Enable DNS SRV lookups on outbound calls
register=login_na_sipnet:password_na_sipnet@sipnet.ru/sipnet_ID

[200] ; xlite phone
type=friend
host=dynamic
username=200
secret=123321
nat=no
canreinvite=no
context=office
callerid=»User1″
allow=gsm
allow=ulaw
allow=alaw
disallow=all
[201] ; xlite phone
type=friend
host=dynamic
username=201
secret=333333
nat=no
canreinvite=no
context=office
callerid=»User2″
allow=gsm
allow=ulaw
allow=alaw
disallow=all
[202] ; xlite phone
type=friend
host=dynamic
username=202
secret=3232323
nat=no
canreinvite=no
context=office
callerid=»User3″
allow=gsm
allow=ulaw
allow=alaw
disallow=all

[sipnet]
dtmfmode=rfc2833
type=peer
host=sipnet.ru
;fromuser=ID
fromdomain=sipnet.ru
secret=password_na_sipnet
username=login_na_sipnet
canreinvite=no
;insecure=very
context=local
disallow=all
allow=g729
allow=g723
allow=g723.1
allow=gsm
allow=ulaw

extensions.conf часть )
———————————————————————————
[office]
exten => 200,1, Macro(stdexten,200,SIP/200)
exten => user1, 1, Goto(200|1)
exten => 201,1, Macro(stdexten,201,SIP/201)
exten => user2, 1, Goto(201|1)
exten => 202,1, Macro(stdexten,202,SIP/202)
exten => user3, 1, Goto(202|1)

exten => 201,1, Dial(SIP/201,40)
exten => 201,2, Playback(vm-nobodyavail)
exten => 201,3, Voicemail(202@default)
exten => 201,4, Hangup
exten => ) _8./201,1,Dial(SIP/${EXTEN}@sipnet,40)

include => demo

[macro-stdexten]
exten => s, 1, Dial (${ARG2},20,t [4] )
exten => s, 2, Goto(s-$(DIALSTATUS),1)
exten => s-NOANSWER, 1, Voicemail(u${ARG1})
exten => s-NOANSWER, 2, (Goto(default,s,1))
exten => s-BUSY, 1, Voicemail(b,${ARG1})
exten => s-BUSY, 2, (Goto(default,s,1))
exten => _s-., 1, Goto(s-NOANSWER)
exten => a, 1, VoiceMailMain(${ARG1})

[Moscow]
exten => _7495XXXXXXX,1,Set(CALLERID(all)=”SipPhone” )
exten => _7495XXXXXXX,2,Dial(SIP/sipnet/${EXTEN},120)
exten => _7495XXXXXXX,3,PlayBack(noanswer)
exten => _7495XXXXXXX,4,HangUp
exten => для _7495XXXXXXX,305,PlayBack(busy)
exten => _7495XXXXXXX,306,HangUp

exten => _7952XXXXXXX,1,Set(CALLERID(all)=”SipPhone” )
exten Already => _7952XXXXXXX,2,Dial(SIP/sipnet/${EXTEN},120)
exten => _7952XXXXXXX,3,PlayBack(noanswer)
exten => _7952XXXXXXX,4,HangUp
exten => _7952XXXXXXX,305,PlayBack(busy)
exten => _7952XXXXXXX,306,HangUp

Астериск сдался )

На днях словил ошибку cheap nba jerseys при запуске cheap jerseys сервера с астериском

звонок шел с софтфона на cheap nfl jerseys мобильник через sipnet.ru но как только трубку снимаешь — шел отбой.

— SIP/sipnet-081a76e8 Only answered SIP/201-081a1db8
Apr 9 12:57:51 WARNING[10027]: channel.c:2752 cheap jerseys from China ast_channel_make_compatible: No path to translate from SIP/201-081a1db8(4) to SIP/sipnet-081a76e8(256)
Apr 9 12:57:51 WARNING[10027]: app_dial.c:1602 dial_exec_full: Had to drop call because I couldn’t make как…. SIP/201-081a1db8 compatible with SIP/sipnet-081a76e8
== Spawn extension (office, 88911ZZZZZZZ, 1) exited non-zero kde on Valentijnsactie! ‘SIP/201-081a1db8’
cheap nba jerseys parse_srv: SRV mapped to host sipnet.ru, port 5060

Решилось установкой кодека

debian Xhamster 4 asterisk 1.4

cd /usr/src
rm codec_g72*
wget http://asterisk.hosting.lv/bin/codec_g723-ast14-gcc4-glibc-pentium4.so
wget сантехнику http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-pentium4.so
mv /usr/src/codec_g723-ast14-gcc4-glibc-pentium4.so /usr/lib/asterisk/modules/codec_g723.so
mv /usr/src/codec_g729-ast14-gcc4-glibc-pentium4.so /usr/lib/asterisk/modules/codec_g729.so
chmod 777 /usr/lib/asterisk/modules/codec_g72*

/etc/init.d/asterisk restart

asterisk -vvvvrx ‘core show translation’