留下印象是在 多任务环境下任务间通信模型
原来是 进程间通信,一般建议就用socket方式,TCP、UDP都可以
然后今天看到 从技术问题变成RPWT
实在太有趣了
本书讨论的0bug,可能比大多数人讨论的严厉一点点,即产品卖出钱了,你把钱揣到包包里面,并且落袋为安,不会因为维护再花出去,这个叫做0bug。
不知道他为什么把这个认为更加严厉一点点
产品卖出钱了,你把钱揣到包包里面,并且落袋为安,不会因为维护再花出去
这个更大意义上是商务上的事情
如果商务搞定了,就做一个简单的玩意忽悠验收过去了,然后不用,那也是他声称的0BUG了
2010-01-26 23:25:42 肖舸
我的server在公网上正跑着呢,两年了,运维部门一个bug都没有报。这算不算0bug?
看了看他的网站 FREEPP
VOIP的,我很不厚道的搜索了几下
这是一个销售的简历
1、 普罗通信FREEPP BOX 产品
针对普罗通信新推出的 FREEPP 产品,进行销售策划,开辟网上销售渠道提高产品认知度,成功售出四套。
这是招聘信息
招聘职位: ASTERISK工程师
1、熟悉ASTERISK、在ASTERISK开发方面有1年以上工作经验;
莫非他说的SERVER就是这个?
20070107 Asterisk TAPI incoming call Inbound Calls
不明白ASTTAPI怎么处理呼入电话 LINEANSWER能够作什么呢
Asterisk signals Asttapi through the UserEvent command in the dialplan. Asttapi needs to be informed of call progress as originated and incoming calls are progressing. Partially a problem exists that as the calls are connected, two unique IDs are generated which means that some of the commands need to pass the old unique ID back to asttapi as well. To setup Asttapi properly in the dial plan, you need the following:
Inbound Calls
Ensure your TAPI driver is logging onto your Asterisk server. Because it is a TSP it is generally very quiet about problems like this (maybe there is a way round it). Ssh into your Asterisk box and "asterisk -gcvvvr" now run your TSP driver by loading whatever TAPI software you are using you should see your manager logon – or an error message. – If you do not see it log on then you may not be running your asterisk manager – if this is the case edit your manager.conf and reload.
If it logs on successfully then it could be you do not have your channel configured correctly. Ensure the channel in the AstTapi matches your channel defined in Asterisk � for example I use Sip/nick in both the sip.conf and in my TAPI driver. It is not case sensitive and can even be a little short!
The "Inbound channel" is usually the same as the "User channel", if you use the same phone for in- and outgoing calls (example: SIP/555 , where 555 is the extension of the phone). This is specifically of interest for people using Identafone\’s IdentaPop Pro
If you installed AstTapi on a PC behind a router, while your Asterisk runs off a server at a provider\’s site for example, make sure to set up your router to forward port 5038 (or whichever port you put in manager.conf, default is 5038) to the internal IP address of the computer you installed AstTapi on. Else the signalling of calls to your PC will never arrive.. This too is specifically of interest for people using Identafone\’s IdentaPop Pro
If this does not fix it then there is a bug � please send me the details.
Im having issues with the asttapi and Asterisk@Home, i installed it, i can make calls fine through outlook, but when i try to handle incomming calls using the tapi drivers, i cant get the events to trigger, i even tried using IdentaPop pro, and it doesnt show incomming calls nomatter what i try, has anyone got any ideas as what i need to do.
I wasnt aware that ast tapi could actually do incoming. Look around for Asterisk SNAP. It should be able to do what your looking for.
mm so there is no tapi drivers that will work with asterisk, thing is developed an app that used avaya ip tapi which worked now need to port to asterisk, I just got xtelsio_TAPI_for_Asterisk which handles the incoming calls fine but still doesnt seem to work, so my chances of an easy port from avaya tapi to my asterisk server are minimal?
X-Pro TAPI Integrates VoIP with Outlook
BY JOHANNE TORRES
Global IP Telecommunications, a development partner of softphone manufacturer Xten Networks Inc., introduced the X-Pro TAPI, a TAPI (Telephony API)-compliant software telephone which can be integrated with Microsoft Outlook.
Titanium Soft.
Snap is a cutting edge dialer and call pop up application for Asterisk that is flexible and powerful.
Snap works by sending the phone number you wish to dial to your PBX and initiating a call back to your phone. Once your phone rings you pick it up and it will be connected to the number you dialed.
For Outlook users, the call pop-ups are tightly integrated with your contacts and will show their picture (if available) and display name.
The flexibility comes from it\’s Multi-Connection technology. If you travel between work and home, or would like to have seperate settings for different situations then this feature will be extremely useful for you. You simply dial via a different connection by using the "arrow" to the right of the Dial button to access these connections.
Snap integrates with Outlook, Excel, Powerpoint, and Thunderbird. The Firefox and Thunderbird plugin\’s automatically detect phone numbers on webpages and make them dialable by simply clicking.
Snap comes in a Basic (free) and a Pro version. A free trial of the Pro version is included with your download for 30-days. After that some features will be limited.
Caller ID Software For Windows
Our Caller ID Software products instantly identify your callers using screen pops, speech, MS Outlook Contacts, Caller ID over network plus paging, mobile phone and email alerts.
Maximize your Caller ID service with any Windows PC and either a modem, TAPI phone system or MultiLine Caller ID box.
Call blocking software will forever end disruptions from sales callers by creating your own do-not-call list. Do not rely on legislation that only applies to telemarketers while politicians and non-profit organizations are exempt.
Track and control your calls with screen pops, email/pager alerts, speech and call blocking using the Caller ID from your TelCo. Detailed caller logs and caller history. Block any caller and send call blocking tones that instruct automated dialers to take you off their call list. Requires a Caller ID capable modem and Caller ID service.
We are currently experimenting with the AstTAPI driver for desktop
integration. For outgoing calls, it seems to work exactly as expected.
For incoming call alerting on the other hand, I am struggling a bit.
I am using IdentaPop Pro as suggested in the Wiki, and if I enable
debug, I can see "TAPI OnCallerID" events arriving okay, but nothing
pops-up.
I BELIEVE that what is happening is that the callerID is send
correctly at first, but when the next TAPI "Ringing" indicator is
sent, the callerID is empty in the TAPI data, which suppresses the
popup.
Can anyone shed any light on this if they have it working?
[Asterisk-Users] AstTAPI – Incoming Calls
The manager logs in just fine using the Windows 2000 Dialer App and does
logout until I exit the application. I can dial out, using the context
defined in Dial by Context.
However, after specifying the inbound channel, no more calls get thru to
the Sip/22 extension. Here is an extract of the log:
== Parsing \’/etc/asterisk/manager.conf\’: Found
== Manager \’pos\’ logged on from 10.1.3.68
== Manager \’pos\’ logged off from 10.1.3.68
== Parsing \’/etc/asterisk/manager.conf\’: Found
== Manager \’pos\’ logged on from 10.1.3.68
— Executing NoOp("CAPI[contr3/123]/204", "") in new stack
— Executing Dial("CAPI[contr3/123]/204", "SIP/22&line;20&line;t") in new stack
— Called 22
— SIP/22-4eec is ringing
== No one is available to answer at this time
— Executing VoiceMail2("CAPI[contr3/123]/204", "su22") in new stack
— Playing \’voicemail/default/22/unavail\’ (language \’en\’)
== Spawn extension (default, 123, 3) exited non-zero on
\’CAPI[contr3/123]/204\’
The phone rings once. Nobody used the phone at that time, but the call
gets directed into voice mail and no pop up happens on the Windows client.
Using Outlook 2000 the manager does not log in unless I want to
Dial-Out. And it logs out right after completing the call successfully.
Any and all help is greatly appreciated.
标签:api, asterisk, call, com, tapi1130 asterisk tapi sip asttapi 3
Once installed and rebooted you need to ensure that you have a Asterisk Manager account setup, this is done on the Asterisk server, in your Asterisk configuration directory there is a file manager.conf, you need to add a line for every user who wants to log onto the server in this fashion.
An excerpt of my manager.conf
;
; Asterisk Call Management support
;
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
[nick]
secret = mysecret
permit = 10.20.1.0/255.255.255.0
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user
When you reload then the Asterisk manager will be available to the network.
Next configuring the TAPI driver, this has to be done from your TAPI application – I use Outlook so for the purpose of getting up and running will explain my steps.
In Outlook go into your contacts folder. Right click one of your contacts and select “call contact”. The window which appears now has fields filled in with which number to call and the name of the contact. Select the button for "dialling options" underneath this, and when this window appears at the bottom there should be “Connect using line” use the pull down list to select “Asterisk”, then you can select “Line Properties”, here we need to fill out a few fields.
Host – this is the host name or IP address of the server running the Asterisk manager
Port – 5038 – default
User – the user you set-up in manager.conf
Password – the users secret you set-up in manager.conf
User Channel – this is the your extension, it terms of the channel name in my case it is Sip/nick
Outgoing Chan – this is the channel which external calls are placed over, you can get this information from extensions.conf, in here you will find a section which defines external calls, in the top of my file I have “TRUNK=CAPI/870582:” AstTAPI will use this and append the number to the end of this channel to place the call. In my case I place “CAPI/870582:” into this field.
host SIP SRV
PORT 5038
USER SF
PWD SF
USER CHANNEL SIP/8560
LINE NAME [hide] [/hide]
dial by context
context from-internal
callerid 8560
attenmpt to set outgoing id
dial out bu using the dial application
outgoing channel
exten => s,1,UserEvent(TAPI&line;TAPIEVENT: LINE_NEWCALL $&leftsign;ARG2&rightsign;)
exten => s,n,UserEvent(TAPI&line;TAPIEVENT: LINE_CALLSTATE LINECALLSTATE_OFFERING)
exten => s,n,UserEvent(TAPI&line;TAPIEVENT: SET CALLERID $&leftsign;CALLERID&rightsign;)
exten => s,n,UserEvent(TAPI&line;TAPIEVENT: LINE_CALLINFO LINECALLINFOSTATE_CALLERID)
exten => s,n,Dial($&leftsign;ARG2&rightsign;,20,rtM(tapi^$&leftsign;UNIQUEID&rightsign;&line;$&leftsign;ARG2&rightsign;))
exten => s,n,Goto(s-$&leftsign;DIALSTATUS&rightsign;,1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
;exten => s,104,Goto(s-BUSY,1)
exten => s-NOANSWER,1,Voicemail(u$&leftsign;ARG1&rightsign;) ; If unavailable, send to voicemail w/ unavail announce
exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start
exten => s-BUSY,1,Voicemail(b$&leftsign;ARG1&rightsign;) ; If busy, send to voicemail w/ busy announce
exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start
exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer
exten => a,1,VoicemailMain($&leftsign;ARG1&rightsign;) ; If they press *, send the user into VoicemailMain
exten => h,1,UserEvent(TAPI&line;TAPIEVENT: LINE_CALLSTATE LINECALLSTATE_IDLE)
To initiate screen popping (which by the way Outlook on its own is not capable of) you also need to enter the line name. The line name is the identifier which we recognize the call is intended for us. The line name has to be placed into the dial plan.
The line name could be a string you define yourself to track calls, or it could be something like the channel name. Using the channel name you could use string formatting in Asterisk to handle a lot of users simply.
The dial plan is now used to signal TAPI events, there were several reasons for this:
Different applications required different events – it is a very open standard!
It is quite difficult to map manager events effectively to TAPI events
It simplifies the TSP enormously, now it doesn’t have to track the state of a call, this is now only handled in one place – in Asterisk
We use the UserEvent function of Asterisk to signal the event to our TAPI driver. The event takes on the form
UserEvent(TAPI&line;TAPIEVENT: <event data>)
The event data is recognisable to any TAPI programmer. We use the following events to signal a new inbound call to the application:
LINE_NEWCALL line_1
LINE_CALLSTATE LINECALLSTATE_OFFERING
SET CALLERID $&leftsign;CALLERID&rightsign;
LINE_CALLINFO LINECALLINFOSTATE_CALLERID
The phone rings for a while (note the line_1 is the identifier which is configured in AstTapi)
LINE_CALLSTATE LINECALLSTATE_CONNECTED
You talk for a while
LINE_CALLSTATE LINECALLSTATE_HANGUP
LINE_CALLSTATE LINECALLSTATE_IDLE
A word about LINE_NEWCALL
LINE_NEWCALL has extra meaning in AstTapi. In normal TAPI it should only ever be presented when a new call comes in that the TAPI application does not now about. The AstTapi TSP filters this, so that if it is received regarding calls the application initiated we will filter it out. This is intended to make the dial plan slightly simpler to implement.
AstTapi also uses this event, to track calls with, once it receives this event it uses Asterisk’s unique id’s to track the call.
It also uses the event LINE_CALLSTATE LINECALLSTATE_IDLE to remove this call from its list of calls to track. If you do not enter this into the dial plan, then not only is your application not going to now when the line is idle again, but also you will have a slow memory leak in the TSP as it will not know when to free memory allocated to a call initiated earlier.
A word about LINE_CALLSTATE LINECALLSTATE_CONNECTED
This event tells the TAPI application that the call is connected. But from a dial plan point of view is quite tricky to get in a place when the call is truly connected. We also have to manage calls which are one to many, that is 1 call comes in and 2 phones ring. For example we may have in our dial plan
exten => 100,1,dial(sip/bob&sip/bobbett)
First off we handle sending the LINECALLSTATE_CONNECTED event in this fashion:
exten => 100,1,dial(sip/bob&sip/bobbett&line;&line;M(tapi^$&leftsign;UNIQUEID&rightsign;))
We have to pass the unique ID across to the macro which is called when the call is connected, as the macro is run as the second leg of the call which has a new unique id.
[macro-tapi]
exten => s,1,UserEvent(TAPI&line;TAPIEVENT: [~$&leftsign;ARG1&rightsign;&sip/bob] LINE_CALLSTATE LINECALLSTATE_CONNECTED)
exten => s,1,UserEvent(TAPI&line;TAPIEVENT: [~$&leftsign;ARG1&rightsign;&!sip/bob] LINE_CALLSTATE LINECALLSTATE_HANGUP)
You will note a few things here:
Our TAPI events are sent by way of a specially formatted UserEvent
We can simply send the TAPI command, and AstTapi will track the call for you
Or we can signal AstTapi which call it is referring to
We can also describe which line we intend the call for if the call is being tracked by a number of lines.
After the TAPI&line;TAPIEVENT string we can optionally place a [] which the contents take on the format:
If the character ‘~’ is used the string following it is the Asterisk unique ID we intend the signal for (by default AstTapi traces the Asterisk unique ID generated when the NEWCALL is signalled).
Any string which is a line identifier means that this TAPI event is specifically for that line.
Any string proceeded by a ‘!’ means that this event is specifically excluded for that line (and by default intended for all others if a line is not specified – see the previous comment).
We can have multiple definitions here which are separated by the ‘&’ character.
Putting it all together
For inbound calls we will extend the standard extension macro to include our TAPI events
[macro-tapi]
exten => s,1,UserEvent(TAPI&line;TAPIEVENT [~$&leftsign;ARG1&rightsign;&sip/bob] LINE_CALLSTATE LINECALLSTATE_CONNECTED)
exten => s,1,UserEvent(TAPI&line;TAPIEVENT [~$&leftsign;ARG1&rightsign;&!sip/bob] LINE_CALLSTATE LINECALLSTATE_HANGUP)
[macro-stdexten]
;Our TAPI events
exten => s,1,UserEvent(TAPI&line;TAPIEVENT: LINE_NEWCALL $&leftsign;ARG3&rightsign;)
exten => s,n,UserEvent(TAPI&line;TAPIEVENT: LINE_CALLSTATE LINECALLSTATE_OFFERING)
exten => s,n,UserEvent(TAPI&line;TAPIEVENT: SET CALLERID $&leftsign;CALLERID&rightsign;)
exten => s,n,UserEvent(TAPI&line;TAPIEVENT: LINE_CALLINFO LINECALLINFOSTATE_CALLERID)
;The normal macro
exten => s,n,Dial($&leftsign;ARG1&rightsign;,20,TM(tapi^$&leftsign;UNIQUEID&rightsign;))
exten => s,2,Goto(s-$&leftsign;DIALSTATUS&rightsign;,1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
exten => s-NOANSWER,1,Voicemail(u$&leftsign;ARG1&rightsign;) ; If unavailable, send to voicemail w/ unavail announce
exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start
exten => s-BUSY,1,Voicemail(b$&leftsign;ARG1&rightsign;) ; If busy, send to voicemail w/ busy announce
exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start
exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer
exten => a,1,VoicemailMain($&leftsign;ARG1&rightsign;) ; If they press *, send the user into VoicemailMain
We also have to remember to have the ‘h’ extension in the context the call came in on:
exten => h,1,UserEvent(TAPI&line;TAPIEVENT: LINE_CALLSTATE LINECALLSTATE_IDLE)
We also have to remember that Outlook and other diallers expect to see events to know about the progress of the call they have requested. Here we have to modify the way outgoing calls are made:
[trunklocal]
;
; Local seven digit dialling accessed through the trunk interface
;
exten => _9NXXXXXX,1,UserEvent(TAPI&line;TAPIEVENT: LINE_NEWCALL line_1)
exten => _9NXXXXXX,n,UserEvent(TAPI&line;TAPIEVENT: LINE_CALLSTATE LINECALLSTATE_DIALTONE)
exten => _9NXXXXXX,n,UserEvent(TAPI&line;TAPIEVENT: LINE_CALLSTATE LINECALLSTATE_DIALING)
exten => _9NXXXXXX,n,UserEvent(TAPI&line;TAPIEVENT: LINE_CALLSTATE LINECALLSTATE_PROCEEDING)
exten => _9NXXXXXX,1,Dial($&leftsign;TRUNK&rightsign;/$&leftsign;EXTEN:$&leftsign;TRUNKMSD&rightsign;&rightsign;&line;&line;M(tapi^$&leftsign;UNIQUEID&rightsign;))
Notes:
Because the TSP filters the LINE_NEWCALL event, this means this can be used in the situation where either the TAPI application initiates the call, or if it is a call which is initiated by the actual phone
Remember this must also pick up on the ‘h’ extension to signal when the call is idle again
1129 asterisk tapi sip asttapi 2
Asterisk Call Manager/1.0
Action: Login
UserName: sf
Secret: sf
Response: Success
Message: Authentication accepted
Action: Originate
Channel: SIP/8560
Exten: 8558
Priority: 1
Context: from-internal
Response: Success
Message: Originate successfully queued
Event: Newchannel
Privilege: call,all
Channel: SIP/8560-9651
State: Down
CallerID: <unknown>
CallerIDName: <unknown>
Uniqueid: 1164111462.8
Event: Newcallerid
Privilege: call,all
Channel: SIP/8560-9651
CallerID: <Unknown>
CallerIDName: <Unknown>
Uniqueid: 1164111462.8
CID-CallingPres: 0 (Presentation Allowed, Not Screened)
Event: Newchannel
Privilege: call,all
Channel: SIP/8560-9651
State: Ringing
CallerID: <unknown>
CallerIDName: <unknown>
Uniqueid: 1164111462.8
Event: ExtensionStatus
Privilege: call,all
Exten: 8560
Context: ext-local
Status: 8
Event: Newstate
Privilege: call,all
Channel: SIP/8560-9651
State: Up
CallerID: <unknown>
CallerIDName: <unknown>
Uniqueid: 1164111462.8
Event: ExtensionStatus
Privilege: call,all
Exten: 8560
Context: ext-local
Status: 1
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: from-internal
Extension: 8558
Priority: 1
Application: Macro
AppData: exten-vm&line;novm&line;8558
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-exten-vm
Extension: s
Priority: 1
Application: Macro
AppData: user-callerid
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-user-callerid
Extension: s
Priority: 1
Application: DBget
AppData: AMPUSER=DEVICE//user
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-user-callerid
Extension: s
Priority: 2
Application: DBget
AppData: AMPUSERCIDNAME=AMPUSER//cidname
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-user-callerid
Extension: s
Priority: 3
Application: GotoIf
AppData: 1?5
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-user-callerid
Extension: s
Priority: 5
Application: NoOp
AppData: Using CallerID
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-exten-vm
Extension: s
Priority: 2
Application: SetVar
AppData: FROMCONTEXT=exten-vm
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-exten-vm
Extension: s
Priority: 3
Application: Macro
AppData: record-enable&line;8558&line;IN
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-record-enable
Extension: s
Priority: 1
Application: GotoIf
AppData: 0 > 0?2:4
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-record-enable
Extension: s
Priority: 4
Application: AGI
AppData: recordingcheck&line;20061121-201745&line;1164111462.8
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-record-enable
Extension: s
Priority: 5
Application: NoOp
AppData: No recording needed
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-exten-vm
Extension: s
Priority: 4
Application: DBget
AppData: forwardValue=CFNA/8558
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-exten-vm
Extension: s
Priority: 5
Application: NoOp
AppData:
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-exten-vm
Extension: s
Priority: 6
Application: GotoIf
AppData: 1?s&line;10:s&line;7
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-exten-vm
Extension: s
Priority: 10
Application: Set
AppData: TESTTIMER=45
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-exten-vm
Extension: s
Priority: 11
Application: Macro
AppData: dial&line;45&line;tr&line;8558
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-dial
Extension: s
Priority: 1
Application: GotoIf
AppData: 0?4:2
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-dial
Extension: s
Priority: 2
Application: GotoIf
AppData: 0?5:4
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-dial
Extension: s
Priority: 4
Application: AGI
AppData: dialparties.agi
Uniqueid: 1164111462.8
Event: Newexten
Privilege: call,all
Channel: SIP/8560-9651
Context: macro-dial
Extension: s
Priority: 10
Application: Dial
AppData: sip/8558&line;45&line;tr
Uniqueid: 1164111462.8
Event: Newchannel
Privilege: call,all
Channel: SIP/8558-0c38
State: Down
CallerID: <unknown>
CallerIDName: <unknown>
Uniqueid: 1164111466.9
Event: Dial
Privilege: call,all
Source: SIP/8560-9651
Destination: SIP/8558-0c38
CallerID: <unknown>
CallerIDName: <unknown>
SrcUniqueID: 1164111462.8
DestUniqueID: 1164111466.9
Event: Newcallerid
Privilege: call,all
Channel: SIP/8558-0c38
CallerID: 8558
CallerIDName: <Unknown>
Uniqueid: 1164111466.9
CID-CallingPres: 0 (Presentation Allowed, Not Screened)
Event: Newchannel
Privilege: call,all
Channel: SIP/8558-0c38
State: Ringing
CallerID: 8558
CallerIDName: <unknown>
Uniqueid: 1164111466.9
Event: ExtensionStatus
Privilege: call,all
Exten: 8558
Context: ext-local
Status: 8
Event: Newstate
Privilege: call,all
Channel: SIP/8558-0c38
State: Up
CallerID: 8558
CallerIDName: <unknown>
Uniqueid: 1164111466.9
Event: Link
Privilege: call,all
Channel1: SIP/8560-9651
Channel2: SIP/8558-0c38
Uniqueid1: 1164111462.8
Uniqueid2: 1164111466.9
CallerID1: (null)
CallerID2: 8558
Event: ExtensionStatus
Privilege: call,all
Exten: 8558
Context: ext-local
Status: 1
Event: Unlink
Privilege: call,all
Channel1: SIP/8560-9651
Channel2: SIP/8558-0c38
Uniqueid1: 1164111462.8
Uniqueid2: 1164111466.9
CallerID1: (null)
CallerID2: 8558
Event: Hangup
Privilege: call,all
Channel: SIP/8558-0c38
Uniqueid: 1164111466.9
Cause: 16
Cause-txt: Normal Clearing
Event: ExtensionStatus
Privilege: call,all
Exten: 8558
Context: ext-local
Status: 0
Event: Hangup
Privilege: call,all
Channel: SIP/8560-9651
Uniqueid: 1164111462.8
Cause: 16
Cause-txt: Normal Clearing
Event: ExtensionStatus
Privilege: call,all
Exten: 8560
Context: ext-local
Status: 0
== Manager \’sf\’ logged off from 192.168.35.151
== Parsing \’/etc/asterisk/manager.conf\’: Found
== Parsing \’/etc/asterisk/manager_custom.conf\’: Found
== Connect attempt from \’192.168.35.151\’ unable to authenticate
== Parsing \’/etc/asterisk/manager.conf\’: Found
== Parsing \’/etc/asterisk/manager_custom.conf\’: Found
== Manager \’sf\’ logged on from 192.168.35.151
— Attempting native bridge of SIP/8560-9651 and SIP/8558-0c38
== Spawn extension (macro-dial, s, 10) exited non-zero on \’SIP/8560-9651\’ in macro \’dial\’
== Spawn extension (macro-dial, s, 10) exited non-zero on \’SIP/8560-9651\’ in macro \’exten-vm\’
== Spawn extension (macro-dial, s, 10) exited non-zero on \’SIP/8560-9651\’
[hide]== Manager \’sf\’ logged off from 192.168.35.151 [/hide]
标签:api, asterisk, asttapi, sip, tapi1128 asterisk tapi sip asttapi 1
下载:
AstTapi, an opensource Asterisk Tapi driver for windows. This allows users of TAPI compliant applications such as Outlook and Act to dial contacts directly from the application using an Asterisk PBX Server.
http://sourceforge.net/project/showfiles.php?group_id=106482&package_id=114736
运行,安装,装上TSP驱动
修改
;
; Asterisk Call Management support
;
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
[sf] //控制者
secret=sf
deny=0.0.0.0/0.0.0.0
permit=192.168.35.0/255.255.255.0
Read=system,call,log,verbose,command,agent,user
write=system,call,log,verbose,command,agent,user
[admin]
secret = amp111
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user
#include manager_custom.conf
概念
TAPI通过ASTTAPI TSP 通过SOCKET和服务器5038端口通讯,因此完成一次呼叫控制
本地运行两个客户端
如果直接TELNET服务器AMI端口,输入如下命令即可让双方建立呼叫
Action: Login
UserName: sf
Secret: sf
Action: Originate
Channel: SIP/8560
Exten: 8558
Priority: 1
[hide]Context: from-internal
也就是说TAPI实际上也只是一个控制者,还是需要客户端软件[/hide]
Install the TAPI driver onto your workstation.
To configure it, open your control panel, Phone and Modem Options, Advanced, Select AstTapi, then configure.
You can now enter the host, user name and password as you have just configured above.
Enter the user channel, this is the phone which will get called when you wish to initiate a call – your phone.
Make sure at this point you have the Asterisk manager window running; you can see manager’s logging on and problems which occur here easily.
This is now set up to make calls – from Outlook for example. The application now needs configuring; just choose the Asterisk line in the application.
To initiate screen popping (which by the way Outlook on its own is not capable of) you also need to enter the line name. The line name is the identifier which we recognize the call is intended for us. The line name has to be placed into the dial plan.
The line name could be a string you define yourself to track calls, or it could be something like the channel name. Using the channel name you could use string formatting in Asterisk to handle a lot of users simply.
The dial plan is now used to signal TAPI events, there were several reasons for this:
Different applications required different events – it is a very open standard!
It is quite difficult to map manager events effectively to TAPI events
It simplifies the TSP enormously, now it doesn’t have to track the state of a call, this is now only handled in one place – in Asterisk
We use the UserEvent function of Asterisk to signal the event to our TAPI driver. The event takes on the form
1125 Asterisk TAPI
http://www.omniis.com/ntsgr/cms/page.asp?688
http://www.kirkhamsystems.com/asttapi
http://voip-info.org/wiki/view/Asterisk+TAPI
http://chaz6.com/?cat=5
http://voip.stepdev.org/category/asterisk/
http://www.asterisktapi.eu
The TSP for Asterisk® integrates your Asterisk®-based PBX into virtually any customer-relationship-management system or your ERP-System by using the Microsoft TAPI Interface. You can initiate your calls directly from any contact within Microsoft Outlook® or ACT®.
In connection with an Astimax® VoIP PBX and TapiCall® you can also display incoming calls within your application within Microsoft Outlook and let your pbx open existing contacts upon receiving the call.
System Requirements
To use the TSP for Asterisk® you have to meet the following requirements:
Network interface card with installed TCP/IP Stack to connect to your Asterisk Server
Microsoft Windows 2000® or Windows XP® operating systems
Asterisk® based PBX with modified extensions.conf
AstMan Proxy (Open Source) to connect more than 5 clients
To work asttapi properly withe Asterisk 1.2 you must use the o-flag with the Dial-command. Else asttapi shows the local extension then the Callerid.
Ecco una descrizione sommaria di come emulare le funzionalita’ di “google clik to talk” .
creare una pagina web, con un form per inserire un numero di telefono.
AstTAPI is a useful piece of software which allows you to initiate outbound calls from any TAPI-enabled application, for example Microsoft® Outlook™. It works by initiating a call to a phone of your choice, then making the outbound call.
The Asterisk TAPI driver is a TAPI Service Provider for Asterisk, it interprets windows commands from programs such as Outlook and ACT to Asterisk instructions on the Asterisk Manager console.
Current state, it can perform call origination. That is from Outlook you can click on a contact and select call contact, your phone will ring and when you pick up Asterisk will call the number requested.
So you want it?
Simple, go to the AstTAPI download page –
https://sourceforge.net/project/showfiles.php?group_id=106482 and run the installer, it will ask you for a reboot at the end so make sure all your work is saved. It is a very simple process there are no hard questions at this point.
Once installed and rebooted you need to ensure that you have a Asterisk Manager account setup, this is done on the Asterisk server, in your Asterisk configuration directory there is a file manager.conf, you need to add a line for every user who wants to log onto the server in this fashion.
An excerpt of my manager.conf
;
; Asterisk Call Management support
;
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
[nick]
secret = mysecret
permit = 10.20.1.0/255.255.255.0
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user
When you reload then the Asterisk manager will be available to the network.
Next configuring the TAPI driver, this has to be done from your TAPI application – I use Outlook so for the purpose of getting up and running will explain my steps.
In Outlook go into your contacts folder. Right click one of your contacts and select “call contact”. The window which appears now has fields filled in with which number to call and the name of the contact. Select the button for "dialling options" underneath this, and when this window appears at the bottom there should be “Connect using line” use the pull down list to select “Asterisk”, then you can select “Line Properties”, here we need to fill out a few fields.
Host – this is the host name or IP address of the server running the Asterisk manager
Port – 5038 – default
User – the user you set-up in manager.conf
Password – the users secret you set-up in manager.conf
User Channel – this is the your extension, it terms of the channel name in my case it is Sip/nick
Outgoing Chan – this is the channel which external calls are placed over, you can get this information from extensions.conf, in here you will find a section which defines external calls, in the top of my file I have “TRUNK=CAPI/870582:” AstTAPI will use this and append the number to the end of this channel to place the call. In my case I place “CAPI/870582:” into this field.
Asttapi for Asterisk 1.2
I\’ve patched Asttapi 0.10 to work with Asterisk 1.2. This requires things to be properly setup in your dial plan per the Asttapi 0.10 documentation, which admittedly is pretty poor. I\’ll try to simplify that a bit here.
Asterisk signals Asttapi through the UserEvent command in the dialplan. Asttapi needs to be informed of call progress as originated and incoming calls are progressing. Partially a problem exists that as the calls are connected, two unique IDs are generated which means that some of the commands need to pass the old unique ID back to asttapi as well. To setup Asttapi properly in the dial plan, you need the following:
Prior to the Dial() command, you need to send some UserEvents to Asttapi to let it know there\’s a call coming into your phone. I\’ve modified my stdexten macro to look like this:
The Asterisk TAPI project
Open source project – Asterisk TAPI driver for Win32. Adds functionality to any TAPI compliant application for click to dial and screen popping on inbound calls.
Outlook can perform click to dial natively but has no inbuilt support for screen popping – this can be added with a utility such as IdentaFone\’s IdentaPop Pro
0208 sip rtcsample asterisk pc2phone debug ok
看来把微软的RTC放到最后是明智的,否则就没有什么耐心去搞LINUX那些开源东西了。总算编译运行PASS,可以PC2PC,PC2PHONE,应该视频也没有什么问题。服务器是用的asterisk NOt LCS
参考资料:
用微软的实时通信API集成丰富的客户端通信
使用 Microsoft 实时通信 API 增强多客户端通信
RTC 客户端 API 用于可缩放的应用程序
在应用程序中集成 Windows 实时通信
Integrating Rich Client Communications with Microsoft Real-Time Communications API
Enhancing Rich Client Communications with the Microsoft* Real-Time Communications API
Integrating Windows Real-Time Communications into Applications
Media Support in the Microsoft Windows Real-Time Communications Client(英文)
Integrating Rich Client Communications with the Microsoft Real-Time Communications API(英文)
Microsoft\’s real-time communication (RTC) API encapsulates some remarkable PC based communication innovations. The RTC API enables developers to enhance the communication capabilities of any Microsoft Windows XP* based application. It provides the developer with the building blocks to add instant messaging, voice and video-conferencing, and application sharing/collaboration capabilities to their application.
期间出现一些错误信息:
wsprintf(szBuf,
"<provision key=\\"%s\\" name=\\"AVDConf_2\\">"
"<user uri=\\"%s\\" account=\\"\\" password=\\"\\" realm=\\"%s\\" />"
"<sipsrv addr=\\"%s\\" protocol=\\"%s\\" %s role=\\"proxy\\">"
"<session party=\\"first\\" type=\\"pc2pc\\" />"
"</sipsrv>"
"<sipsrv addr=\\"%s\\" protocol=\\"%s\\" %s role=\\"registrar\\"/>"
"</provision>",
szKey,
szURIBuf, szRealm,
szSIPIP, szTransport, bBasicAuth ? "auth=\\"basic\\"" : "",
szSIPIP, szTransport, bBasicAuth ? "auth=\\"basic\\"" : ""
);
where szTransport="UDP" bBasicAuth=0 and Sip server requires no
authentication. I turned on tracing and found that the app poped up a dialog
saying"logon failed! Err=0×80ee001a) when calling
IRTCClientProvisining::EnableProfile() method ( CreateProfile( ) method
rerurned successfully.) . What might be pointed out is that I did not enable
the presence information . Now I am totally confused and wonder if you could
help figure out the reason why I couldn\’t logon on.
//
// MessageId: RTC_E_SIP_REQUEST_DESTINATION_ADDR_NOT_PRESENT
//
// MessageText:
//
// The Request destination address is not known
//
#define RTC_E_SIP_REQUEST_DESTINATION_ADDR_NOT_PRESENT ((HRESULT)0×80EE001AL)
//
// MessageId: RTC_E_DUPLICATE_REALM
//
// MessageText:
//
// Duplicate realm exists in an enabled profile
//
#define RTC_E_DUPLICATE_REALM ((HRESULT)0×80EE0043L)
//
// MessageId: RTC_E_UDP_NOT_SUPPORTED
//
// MessageText:
//
// This feature is not supported when one of the server in profile has UDP transport
//
#define RTC_E_UDP_NOT_SUPPORTED ((HRESULT)0×80EE007EL)
//
// MessageId: RTC_E_SIP_TCP_FAIL
//
// MessageText:
//
// Fails to make a TCP connection
//
#define RTC_E_SIP_TCP_FAIL ((HRESULT)0×80EE0067L)
Asterisk install
download : http://www.asterisk.org/ http://www.asterisk.org/index.php?menu=download
install:
1. tar -xzvf
2.make
3. su
4.make install
5.make samples
6../asterisk -vvvc
+——— Asterisk Build Complete ———+
+ Asterisk has successfully been built, but +
+ cannot be run before being installed by +
+ running: +
+ +
+ make install +
+——————————————-+
mkdir -p /var/lib/asterisk/sounds/digits
mkdir: 无法创建目录‘/var/lib/asterisk’: 权限不够
+—- Asterisk Installation Complete ——-+
+ +
+ YOU MUST READ THE SECURITY DOCUMENT +
+ +
+ Asterisk has successfully been installed. +
+ If you would like to install the sample +
+ configuration files (overwriting any +
+ existing config files), run: +
+ +
+ make samples +
+ +
+—————– or ———————+
+ +
+ You can go ahead and install the asterisk +
+ program documentation now or later run: +
+ +
+ make progdocs +
+ +
+ **Note** This requires that you have +
+ doxygen installed on your local system +
+——————————————-+
+ +
+ ** NOTE FOR DOWNGRADING FROM CVS HEAD ** +
+ +
+ If you are downgrading from CVS HEAD to +
+ a stable release, remember to delete +
+ everything from your asterisk modules +
+ directory (/usr/lib/asterisk/modules/) +
+ and the asterisk header directory +
+ (/usr/include/asterisk/) +
+ before doing a \’make install\’. +
+ +
+——————————————-+
Asterisk Ready.
*CLI> Beginning asterisk shutdown….
Executing last minute cleanups
== Destroying any remaining musiconhold processes
Asterisk cleanly ending (2).