Asterisk 1.4.21.2 under uClinux on an ATCOM IP01. (EDIT: as an aside, I don't think it's possible to upgrade Asterisk to a newer version thatn 1.4 on uClinux, but if anyone knows a way, I'd be interested to know. But I don't think the issue is version-specific.)
The featuremap in features.conf is as follows, but pressing keys during a call has no effect.
[featuremap]
blindxfer => *# ; Blind transfer (default is #)
disconnect => ***0 ; Disconnect (default is *)
;automon => *1 ; One Touch Record a.k.a. Touch Monitor
atxfer => *0 ; Attended transfer
;parkcall => #72 ; Park call (one step parking)
The CLI shows that the configured featuremap has taken effect:
IP0x*CLI> feature show channels
No feature channels in use
IP0x*CLI> feature show
Builtin Feature Default Current
--------------- ------- -------
Pickup *8 *8
Blind Transfer # *#
Attended Transfer *0
One Touch Monitor
Disconnect Call * ***0
Park Call
Dynamic Feature Default Current
--------------- ------- -------
(none)
Call parking
------------
Parking extension : 700
Parking context : parkedcalls
Parked call extensions: 701-750
Various different phones in use (Grandstream BT-200, Panasonic KX-TGP500, X-Lite 4), but always same problem. All phones configured to use rfc2833, which is Asterisk's default DTMF mode; also tried explicitly setting dtmfmode=rfc2833 in sip.conf.
No keys pressed during a call ever get any response from Asterisk. The * and # keys are always recognized by Asterisk when not in a call (in the dialplan, or during voicemail).
If DTMF logging is turned on using full => verbose,debug,dtmf or full => verbose,error,warning,dtmf, no DTMF entries appear in the log despite hitting numerous keys during a call.
What could the problem be?
EDIT: additional info now follows, showing the Dial command used in the dialplan.
EDIT: I've found the issue still occurs without using that ael macro, simply by having exten=261,1,Dial(SIP/261) in extensions.conf. So I've removed the ael from the question to declutter it.
I've now tried adding canreinvite = no and relaxdtmf=yes in sip.conf, but the issue remains.
I've also now found that DTMF logging does happen during a call on a ZAP channel (as opposed to the SIP channels I tried before). But the DTMF still doesn't trigger the features. Example DTMF log follows.
[May 22 08:25:46] DTMF[474]: channel.c:2191 __ast_read: DTMF begin '*' received on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2201 __ast_read: DTMF begin passthrough '*' on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2116 __ast_read: DTMF end '*' received on SIP/251-01354004, duration 180 ms
[May 22 08:25:46] DTMF[474]: channel.c:2163 __ast_read: DTMF end accepted with begin '*' on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2179 __ast_read: DTMF end passthrough '*' on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2191 __ast_read: DTMF begin '*' received on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2201 __ast_read: DTMF begin passthrough '*' on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2116 __ast_read: DTMF end '*' received on SIP/251-01354004, duration 160 ms
[May 22 08:25:46] DTMF[474]: channel.c:2163 __ast_read: DTMF end accepted with begin '*' on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2179 __ast_read: DTMF end passthrough '*' on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2191 __ast_read: DTMF begin '*' received on SIP/251-01354004
[May 22 08:25:46] DTMF[474]: channel.c:2201 __ast_read: DTMF begin passthrough '*' on SIP/251-01354004
[May 22 08:25:47] DTMF[474]: channel.c:2116 __ast_read: DTMF end '*' received on SIP/251-01354004, duration 140 ms
[May 22 08:25:47] DTMF[474]: channel.c:2163 __ast_read: DTMF end accepted with begin '*' on SIP/251-01354004
[May 22 08:25:47] DTMF[474]: channel.c:2179 __ast_read: DTMF end passthrough '*' on SIP/251-01354004
[May 22 08:25:47] DTMF[474]: channel.c:2191 __ast_read: DTMF begin '0' received on SIP/251-01354004
[May 22 08:25:47] DTMF[474]: channel.c:2201 __ast_read: DTMF begin passthrough '0' on SIP/251-01354004
[May 22 08:25:47] DTMF[474]: channel.c:2116 __ast_read: DTMF end '0' received on SIP/251-01354004, duration 280 ms
[May 22 08:25:47] DTMF[474]: channel.c:2163 __ast_read: DTMF end accepted with begin '0' on SIP/251-01354004
[May 22 08:25:47] DTMF[474]: channel.c:2179 __ast_read: DTMF end passthrough '0' on SIP/251-01354004
IP0x*CLI>
Finally cracked this.
It's true that setting canreinvite=no does prevent the SIP phones from negotiating a direct connection between themselves after Asterisk's initially established the call, so keeps Asterisk in the media path (and thus aware of any DTMF they send).
But even so, for Asterisk to actually respond to the DTMF and invoke the configured transfer features, you must explicitly enable transfers, on a per-call basis, by passing the T and/or t options as Dial command parameters.
Newer versions of features.conf draw attention to this:
;atxfer => *2 ; Attended transfer -- Make sure to set the T and/or t option in the Dial() or Queue() app call!
So the fix was, I had to change my AEL code to add the T and/or t parameters wherever the code uses the Dial command.
The only remaining puzzle I was then left with was how to abort an attended transfer; for example if there was no reply, making it tedious to wait for the timeout, or the transfer had started to go to voicemail, potentially making it desirable to return to the other party instead. By experimentation, I eventually found that the feature for using a keypress to disconnect a call also works to abort a transfer:
;disconnect => *0 ; Disconnect (default is *)
Newer versions of features.conf contain an expanded comment, though not one related to transfers:
;disconnect => *0 ; Disconnect (default is *) -- Make sure to set the H and/or h option in the Dial() or Queue() app call!
What I discovered is that even without passing the H and/or h parameters to the Dial command, the disconnect feature can be used to abort an attended transfer. And there's no conflict between this and passing the H and/or h options to the Dial command: if you want to do this and use the feature for any kind of disconnect, it remains effective for aborting transfers without disconnecting the whole call (although using something other than the default of * may then become necessary, since any sequences starting * will now instead cut off the call!).
The Dial command in my AEL code for outgoing calls on Zap/1 is now:
Dial(Zap/1/${number},,T);
And all transfer functionality is now working fine.
Related
here is my Console log of asterisk server
[Feb 15 12:17:49] WARNING[3558][C-00000000]: res_rtp_asterisk.c:2141 dtlsetup: Could not set policies when setting up DTLS-SRTP on '0x7fd64400caa0
[Feb 15 12:17:49] WARNING[3558][C-00000000]: res_rtp_asterisk.c:4465 ast_d: RTP Read error: Unspecified. Hanging up.
Channel SIP/7005-00000000 left 'simple_bridge' basic-bridge <222810-4890-bedf-84d549cea2b0>
== Spawn extension (default, 7008, 1) exited non-zero on 'SIP/7005-0000
-- Channel SIP/7008-00000001 left 'simple_bridge' basic-bridge <222810-4890-bedf-84d549cea2b0>
IS Any changes needed in sip.conf ?
in sip.conf
[7005] ; This will be WebRTC client
type=peer ;
username=7005 ; The Auth user for SIP.js
host=dynamic ; Allows any host to register
secret=Z-jj! ; The SIP Password for SIP.js
encryption=yes ; Tell Asterisk to use encryption for this peer
avpf=yes ; Tell Asterisk to use AVPF for this peer
icesupport=yes ; Tell Asterisk to use ICE for this peer
context=default ; Tell Asterisk which context to use when this peer is dialing
directmedia=yes ; Asterisk will relay media for this peer
transport=udp,ws,wss,tcp ; Asterisk will allow this peer to register on UDP or WebSockets
dtlsenable=yes ; Tell Asterisk to enable DTLS for this peer
dtlsverify=no ; Tell Asterisk to not verify your DTLS certs
dtlscertfile=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS cert file is
dtlsprivatekey=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS private key is
dtlssetup=actpass ; Tell Asterisk to use actpass SDP parameter when setting up DTLS
disallow=all
disallow=all
allow=ulaw
allow=alaw
allow=speex
allow=gsm
dtlsverify=fingerprint
dtlscafile=/etc/asterisk/keys/ca.crt
dtlssetup=actpass
;nat=force_rport,comedia
force_avp=yes
Read error: Unspecified
Check your firewall and NAT settings.
I have already asterisk in my system then I have install freepbx.
Now I got following when try to start asterisk using -gc.
[May 26 01:10:09] NOTICE[31812]: loader.c:1170 load_modules: 2 modules will be loaded.
..[May 26 01:10:09] NOTICE[31812]: cdr.c:1607 do_reload: CDR simple logging enabled.
[May 26 01:10:09] NOTICE[31812]: loader.c:1170 load_modules: 198 modules will be loaded.
.[May 26 01:10:09] NOTICE[31812]: res_smdi.c:1418 load_module: No SMDI interfaces are available to listen on, not starting SMDI listener.
...........[May 26 01:10:09] NOTICE[31812]: config.c:2338 ast_config_engine_register: Registered Config Engine sqlite3
.[May 26 01:10:09] NOTICE[31812]: config.c:2338 ast_config_engine_register: Registered Config Engine curl
[May 26 01:10:09] WARNING[31812]: res_config_mysql.c:1487 load_mysql_config: MySQL RealTime: No database host found, using localhost via socket.
[May 26 01:10:09] WARNING[31812]: res_config_mysql.c:1499 load_mysql_config: MySQL RealTime: No database port found, using 3306 as default.
.[May 26 01:10:09] WARNING[31812]: res_config_mysql.c:1528 load_mysql_config: MySQL realtime: no requirements setting found, using 'warn' as default.
[May 26 01:10:09] NOTICE[31812]: config.c:2338 ast_config_engine_register: Registered Config Engine mysql
asterisk: src/hostapi/alsa/pa_linux_alsa.c:863: BuildDeviceList: Assertion `devIdx < numDeviceNames' failed.
........Aborted (core dumped)
When using asterisk -vr I got following error.
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
When using asterisk -vvvvc I got following error.
Asterisk Dynamic Loader Starting:
[May 26 02:10:56] NOTICE[23425]: loader.c:1170 load_modules: 2 modules will be loaded.
chan_local.so => (Local Proxy Channel (Note: used internally by other modules))
pbx_config.so => (Text Extension Configuration)
[May 26 02:10:56] NOTICE[23425]: cdr.c:1607 do_reload: CDR simple logging enabled.
Asterisk PBX Core Initializing
Registering builtin applications:
[Answer]
[BackGround]
[Busy]
[Congestion]
[ExecIfTime]
[Goto]
[GotoIf]
[GotoIfTime]
[ImportVar]
[Hangup]
[Incomplete]
[NoOp]
[Proceeding]
[Progress]
[RaiseException]
[ResetCDR]
[Ringing]
[SayAlpha]
[SayDigits]
[SayNumber]
[SayPhonetic]
[Set]
[MSet]
[SetAMAFlags]
[Wait]
[WaitExten]
Asterisk Dynamic Loader Starting:
[May 26 02:10:56] NOTICE[23425]: loader.c:1170 load_modules: 198 modules will be loaded.
res_monitor.so => (Call Monitoring Resource)
[May 26 02:10:56] NOTICE[23425]: res_smdi.c:1418 load_module: No SMDI interfaces are available to listen on, not starting SMDI listener.
res_http_websocket.so => (HTTP WebSocket Support)
res_crypto.so => (Cryptographic Digital Signatures)
res_stun_monitor.so => (STUN Network Monitor)
res_agi.so => (Asterisk Gateway Interface (AGI))
res_speech.so => (Generic Speech Recognition API)
res_fax.so => (Generic FAX Applications)
res_calendar.so => (Asterisk Calendar integration)
res_ael_share.so => (share-able code for AEL)
res_curl.so => (cURL Resource Module)
func_curl.so => (Load external URL)
[May 26 02:10:56] NOTICE[23425]: config.c:2338 ast_config_engine_register: Registered Config Engine sqlite3
res_config_sqlite3.so => (SQLite 3 realtime config engine)
[May 26 02:10:56] NOTICE[23425]: config.c:2338 ast_config_engine_register: Registered Config Engine curl
res_config_curl loaded.
res_config_curl.so => (Realtime Curl configuration)
[May 26 02:10:56] WARNING[23425]: res_config_mysql.c:1487 load_mysql_config: MySQL RealTime: No database host found, using localhost via socket.
[May 26 02:10:56] WARNING[23425]: res_config_mysql.c:1499 load_mysql_config: MySQL RealTime: No database port found, using 3306 as default.
[May 26 02:10:56] WARNING[23425]: res_config_mysql.c:1528 load_mysql_config: MySQL realtime: no requirements setting found, using 'warn' as default.
[May 26 02:10:56] NOTICE[23425]: config.c:2338 ast_config_engine_register: Registered Config Engine mysql
res_config_mysql.so => (MySQL RealTime Configuration Driver)
res_timing_pthread.so => (pthread Timing Interface)
res_timing_timerfd.so => (Timerfd Timing Interface)
res_format_attr_silk.so => (SILK Format Attribute Module)
res_format_attr_celt.so => (CELT Format Attribute Module)
res_musiconhold.so => (Music On Hold Resource)
res_rtp_asterisk.so => (Asterisk RTP Stack)
res_rtp_multicast.so => (Multicast RTP Engine)
chan_bridge.so => (Bridge Interaction Channel)
asterisk: src/hostapi/alsa/pa_linux_alsa.c:863: BuildDeviceList: Assertion `devIdx < numDeviceNames' failed.
Aborted
When I start asterisk service at that time asterisk shutdown is failed.
Can any one help me to fix this issue?
Any help/suggestion would be appreciable.
Also please check your ip tables is stop or not.
Try disable selinux or change to permissed mode.
Check owner of ctl file and compare with user in /etc/asterisk/asterisk.conf
The logs / CLI you posted clearly show that it is core-dumping on trying to load the ALSA module. That's likely a problem with the sound-card driver. In the short term, you can just delete that offending module and see if Asterisk will properly load without it.
Further Reading
Why are core dump files generated?
Please Note:
If this answer helped you solve your problem, please 'accept' it so that others with the same issue can find the solution more easily.
I have a continental calling card and I'm not sure how to make it possible to dial out with my asterisk server.
It is a VOIP prepaid card. I can call out on a softphone using their server address and my username and password.
I can't figure out my sip.conf or my dial plan.
Here is what I have.
sip.conf:
[continentalcard]
host=continental.com
defaultuser=username ;; user on continental's server
secret=password
register => username:password#continental.com
context=global
[frank]
type=friend
defaultuser=frank ;; user on my local asterisk server
secret=password
host=dynamic
context=internal
extensions.conf:
[global]
CARD=SIP/continentalcard
[internal]
exten => 100,1,Dial(SIP/frank)
same => n,Hangup()
include => continentalcard
[continentalcard] ;; outgoing
exten => _1NXXNXXXXXX,1,Dial(${CARD}/${EXTEN})
I get the following message on the CLI as I try to dial out 1-222-333-4444 (not the real number):
== Using SIP RTP CoS mark 5
-- Executing [12223334444#internal:1] Dial("SIP/frank-00000151", "SIP/continentalcard:12223334444") in new stack
== Using SIP RTP CoS mark 5
[Oct 3 04:02:57] ERROR[22923]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("continentalcard", "12223334444", ...): Servname not supported for ai_socktype
[Oct 3 04:02:57] WARNING[22923]: chan_sip.c:5866 create_addr: No such host: continentalcard:12223334444
[Oct 3 04:02:57] WARNING[22923]: app_dial.c:2345 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
== Everyone is busy/congested at this time (1:0/0/1)
-- Auto fallthrough, channel 'SIP/frank-00000151' status is 'CHANUNAVAIL'
Update: Filled sip.conf with the global context. Also just noticed your missing a / in extensions.conf. Please look below
You have your sip.conf formatted incorrectly.
[global]
register => username:password#continental.com
context=continentalcard
[continentalcard]
host=continental.com
defaultuser=username
secret=password
context=continentalcard
Registration should be placed under the [global] context in sip.conf.
Context should be continentalcard not global. When the softphone dials 1NXXNXXXXXX it should start using the continentalcard context from extensions and perform the Dial(${CARD}/${EXTEN})
I am trying to make a outgoing from an asterisk pbx using .call file but every time .call file is moved in outgoing folder my cli shows
[Jun 16 15:38:12] NOTICE[30435]: pbx_spool.c:372 attempt_thread: Call failed to go through, reason (1) Hangup
[Jun 16 15:38:12] NOTICE[30435]: pbx_spool.c:375 attempt_thread: Queued call to DAHDI/g0/09716927126 expired without completion after 0 attempts
-- Span 1: Channel 0/1 got hangup request, cause 16
-- Hungup 'DAHDI/i1/09711590094-103a'
[Jun 16 15:38:17] NOTICE[30434]: pbx_spool.c:372 attempt_thread: Call failed to go through, reason (1) Hangup
[Jun 16 15:38:17] NOTICE[30434]: pbx_spool.c:375 attempt_thread: Queued call to DAHDI/g0/09711590094 expired without completion after 0 attempts
-- Attempting call on DAHDI/g0/09711590094 for 4759509#outgoing1:1 (Retry 1)
-- Attempting call on DAHDI/g0/09716927126 for 4759509#outgoing1:1 (Retry 1)
-- Requested transfer capability: 0x00 - SPEECH
-- Requested transfer capability: 0x00 - SPEECH
-- Span 1: Channel 0/2 got hangup request, cause 31
-- Hungup 'DAHDI/i1/09716927126-103d'
my .call file
Channel: DAHDI/g0/09711590094
MaxRetries: 1
RetryTime: 600
WaitTime: 30
Context: outgoing1
Extension: 10
Priority: 1
The call could not be connected.Anybody knows what would be the possible reason for that?
Thanks in advance
This error mean you can't call as requested via dahdi/g0
Very likly you have configure correctly your dahdi card.
A user recently notified me that whenever they attempt to dial into a conference call at another company, the phone call would get dropped after 5 seconds or so. They also indicated that when the same number is called using a cell phone, there were no issues. I found the following entries in log file.
[May 4 11:58:20] VERBOSE[24063] app_dial.c: -- DAHDI/1-1 is ringing
[May 4 11:58:20] VERBOSE[24063] app_dial.c: -- DAHDI/1-1 answered SIP/145-00000005
[May 4 11:58:24] WARNING[24063] rtp.c: Don't know how to represent 'f'
[May 4 11:58:24] VERBOSE[24063] chan_dahdi.c: -- Redirecting DAHDI/1-1 to fax extension
[May 4 11:58:24] VERBOSE[24063] pbx.c: -- Executing [h#macro-dialout-trunk:1] Macro("SIP/145-00000005", "hangupcall,") in new stack
[May 4 11:58:24] VERBOSE[24063] pbx.c: -- Executing [s#macro-hangupcall:1] GotoIf("SIP/145-00000005", "1?theend") in new stack
I have not been able to determine a solution. Any insight or suggestions on solving this problem are appreciated.
(Using FreePBX v2.9; Asterisk v1.6.2.15.1; CentOS 5.5 (Final); Sangoma A102)
Try add into file
/etc/asterisk/sip_general_custom.conf
faxdetect=no
Also tried modiying chan_dahdi.conf, but that did not work.
Final solution was to modify these settings (changing from YES to NO) in /etc/wanrouter/wanpipe1.conf
TDMV_HW_DTMF = NO # YES: receive dtmf events from hardware
TDMV_HW_FAX_DETECT = NO # YES: receive fax 1100hz events from hardware