conf t
no ip nat service sip tcp port 5060
no ip nat service sip udp port 5060
exten => s,1,NoOp(IF Busy (100 OR 101) Goto)
same => n,NoOp(STATE 100: ${DEVICE_STATE(DAHDI/g1/100)})
same => n,GotoIf($[ ${REGEX("INUSE|BUSY|RINGING|RINGINUSE|ONHOLD" ${DEVICE_STATE(DAHDI/g1/100)})} ]?context,extension,1)
same => n,NoOp(STATE 101: ${DEVICE_STATE(DAHDI/g1/101)})
same => n,GotoIf($[ ${REGEX("INUSE|BUSY|RINGING|RINGINUSE|ONHOLD" ${DEVICE_STATE(DAHDI/g1/101)})} ]?context,extension,1)
same => n,Dial(DAHDI/g1/100&DAHDI/g1/101)
same => n,Hangup
exten => s,n,Set(CALLFILENAME=g${TEXTEN}-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${UNIQUEID})
exten => s,n,Set(CALLFILENAME=g${TEXTEN}-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${CALLERID(number)})
readsql=CALL Asterisk_SupportSessionStart(${ARG1},${ARG2})
*CLI> odbc read ODBC_QUEUE 12221 142342 exec
Action: login
Username: test
Secret: test
Events: on
Action: Originate
Channel: SIP/331
Application: Hangup
ActionID: adaff
Async: yes
Event: OriginateResponse
Privilege: call,all
ActionID: adaff
Response: Success
Channel: SIP/331-000003e0
Context:
Exten:
Reason: 4
Uniqueid: 1441039425.992
CallerIDNum: <unknown>
CallerIDName: <unknown>
localnet 192.168.0.0/24
localnet 192.168.4.0/24
localnet какие_ещё_сети_без_NAT
directmedia=no
[peer?][transport://]user[@domain][:secret[:authuser]]@host[:port][/extension][~expiry]
2345:password@sip_proxy/1234