asterisk2billing.org
http://forum.asterisk2billing.org/

DTMF via FREEPBX is OK but via A2billing is PROBLEM
http://forum.asterisk2billing.org/viewtopic.php?f=14&t=8404
Page 1 of 1

Author:  tvambersky [ Wed Dec 08, 2010 10:40 am ]
Post subject:  DTMF via FREEPBX is OK but via A2billing is PROBLEM

Hi, I have problem with sending digits through OOH323 trunk via A2Billing. When I tried it via extension created in FreePbx everything is OK and called side accepted my DTMF digits. This also worked when I called from another Asterisk connected via SIP trunk to Asterisk with A2Billing. I´m using Asterisk2Billing - Version 1.3.4 (SeamRóg) - Release : 1 Oct 2008 and Asterisk Addons: asterisk-addons-1.4.10.

; Open H.323 driver configuration

[general]
port=1720
bindaddr=0.0.0.0
dtmfmode=h245alphanumeric
dtmfmode=h245signal
gatekeeper=0.0.0.0
h323id=..............
CallerID=.............
e164=.............
gateway=yes
disallow=all
;allow=all
allow=alaw
allow=ulaw
AllowGKRouted=yes
context=from-pstn
faststart=yes
h245tunneling=yes
h245inSetup=yes
mediawaitforconnect=yes
packetization=20

;dtmfmode=inband
dtmfmode=rfc2833
;rfc2833compensate=yes
;dtmfmode=info
;dtmf=rfc2833
;relaxdtmf=yes

additional_a2billing_sip.conf
[222286092]
type=friend
username=222286092
accountcode=222286092
regexten=222286092
callerid=222286092
amaflags=billing
secret=..........
nat=yes
dtmfmode=RFC2833
qualify=no
canreinvite=yes
disallow=all
allow=alaw
allow=ulaw
host=dynamic
context=a2billing
insecure=no
rtptimeout=30
rtpholdtimeout=60
regseconds=0
cancallforward=yes

sip_additional.conf
[222286095]
type=friend
secret=........
qualify=yes
port=5060
pickupgroup=
nat=yes
mailbox=222286095@device
host=dynamic
dtmfmode=rfc2833
dial=SIP/222286095
context=from-internal
canreinvite=no
callgroup=
callerid=device <222286095>
accountcode=
call-limit=50




Thanks you very much for some topic or advice to resolve this problem.
TV

Attachments:
File comment: Sending DTMF via A2Billing and called side don´t accepted my digits
via A2BILLING.txt [27.64 KiB]
Downloaded 1135 times
File comment: Sending DTMF without A2Billing and everything is OK
via FreePBX.txt [30.13 KiB]
Downloaded 1414 times

Author:  stavros [ Wed Dec 08, 2010 9:27 pm ]
Post subject:  Re: DTMF via FREEPBX is OK but via A2billing is PROBLEM

Perhaps this might be due to using 'RFC2833' in some places, rather than 'rfc2833'.

Author:  tvambersky [ Thu Dec 09, 2010 8:33 am ]
Post subject:  Re: DTMF via FREEPBX is OK but via A2billing is PROBLEM

Hi, thank you for advice. I tried it and no difference between using rfc or RFC...

Author:  [email protected] [ Thu Feb 17, 2011 10:36 pm ]
Post subject:  Re: DTMF via FREEPBX is OK but via A2billing is PROBLEM

We are also experiencing the same problem.

Setting the FreePBX outbound route to use the SIP trunk directly works but directing it via A2Billing and having it subsequently use the SIP trunk breaks DTMF.

asterisk-1.6.2.13-96.el5 (ATRPMS)
FreePBX 2.7.0.6
A2Billing 1.8.5 (1.7.1 was behaving the same way)

/etc/asterisk/extensions_custom.conf
[a2billing]
exten => _X.,1,Answer(1)
exten => _X.,n,DeadAGI(a2billing.php,1)
exten => _X.,n,Hangup
exten => h,1,Hangup

[custom-a2billing]
exten => _X.,1,Answer(1)
exten => _X.,n,DeadAGI(a2billing.php,1)
exten => _X.,n,Hangup
exten => h,1,Hangup

[a2billing-did]
exten => _X.,1,DeadAGI(a2billing.php,1,did)
exten => _X.,n,Hangup
exten => h,1,Hangup

[custom-a2billing-did]
exten => _X.,1,DeadAGI(a2billing.php,1,did)
exten => _X.,n,Hangup
exten => h,1,Hangup

[macro-dialout-trunk-predial-hook]
exten => s,1,GotoIf($["${OUT_${DIAL_TRUNK}:4:4}" = "A2B/"]?custom-freepbx-a2billing,${OUTNUM},1:2)
exten => s,n,MacroExit

[custom-freepbx-a2billing]
exten => _X.,1,DeadAGI(a2billing.php,${OUT_${DIAL_TRUNK}:8})
exten => _X.,n,Hangup
exten => h,1,Hangup


FreePBX Custom Trunk:
A2B/1

Asterisk logging data:
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Using SIP VRTP TOS bits 136
== Using SIP VRTP CoS mark 6
-- Executing [0117211900@from-internal:1] Macro("SIP/8717847387-00000002", "user-callerid,SKIPTTL,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/8717847387-00000002", "AMPUSER=8717847387") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("SIP/8717847387-00000002", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("SIP/8717847387-00000002", "1?Set(REALCALLERIDNUM=8717847387)") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/8717847387-00000002", "AMPUSER=8717847387") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/8717847387-00000002", "AMPUSERCIDNAME=Syrex Intranets") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/8717847387-00000002", "0?report") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/8717847387-00000002", "AMPUSERCID=8717847387") in new stack
-- Executing [s@macro-user-callerid:8] Set("SIP/8717847387-00000002", "CALLERID(all)="Syrex Intranets" <8717847387>") in new stack
-- Executing [s@macro-user-callerid:9] ExecIf("SIP/8717847387-00000002", "0?Set(CHANNEL(language)=)") in new stack
-- Executing [s@macro-user-callerid:10] GotoIf("SIP/8717847387-00000002", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] Set("SIP/8717847387-00000002", "CALLERID(number)=8717847387") in new stack
-- Executing [s@macro-user-callerid:20] Set("SIP/8717847387-00000002", "CALLERID(name)=Syrex Intranets") in new stack
-- Executing [s@macro-user-callerid:21] NoOp("SIP/8717847387-00000002", "Using CallerID "Syrex Intranets" <8717847387>") in new stack
-- Executing [0117211900@from-internal:2] Set("SIP/8717847387-00000002", "_NODEST=") in new stack
-- Executing [0117211900@from-internal:3] Macro("SIP/8717847387-00000002", "record-enable,8717847387,OUT,") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("SIP/8717847387-00000002", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] ExecIf("SIP/8717847387-00000002", "0?MacroExit()") in new stack
-- Executing [s@macro-record-enable:5] GotoIf("SIP/8717847387-00000002", "0?Group:OUT") in new stack
-- Goto (macro-record-enable,s,15)
-- Executing [s@macro-record-enable:15] GotoIf("SIP/8717847387-00000002", "0?IN") in new stack
-- Executing [s@macro-record-enable:16] ExecIf("SIP/8717847387-00000002", "1?MacroExit()") in new stack
-- Executing [0117211900@from-internal:4] Macro("SIP/8717847387-00000002", "dialout-trunk,3,117211900,,") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("SIP/8717847387-00000002", "DIAL_TRUNK=3") in new stack
-- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/8717847387-00000002", "0?sub-pincheck,s,1") in new stack
-- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/8717847387-00000002", "0?disabletrunk,1") in new stack
-- Executing [s@macro-dialout-trunk:4] Set("SIP/8717847387-00000002", "DIAL_NUMBER=117211900") in new stack
-- Executing [s@macro-dialout-trunk:5] Set("SIP/8717847387-00000002", "DIAL_TRUNK_OPTIONS=tr") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("SIP/8717847387-00000002", "OUTBOUND_GROUP=OUT_3") in new stack
-- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/8717847387-00000002", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,9)
-- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/8717847387-00000002", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:10] Set("SIP/8717847387-00000002", "DIAL_TRUNK_OPTIONS=") in new stack
-- Executing [s@macro-dialout-trunk:11] Macro("SIP/8717847387-00000002", "outbound-callerid,3") in new stack
-- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/8717847387-00000002", "0?Set(CALLERPRES()=)") in new stack
-- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/8717847387-00000002", "0?Set(REALCALLERIDNUM=8717847387)") in new stack
-- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/8717847387-00000002", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,6)
-- Executing [s@macro-outbound-callerid:6] Set("SIP/8717847387-00000002", "USEROUTCID="Syrex Intranets" <0861179739>") in new stack
-- Executing [s@macro-outbound-callerid:7] Set("SIP/8717847387-00000002", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:8] Set("SIP/8717847387-00000002", "TRUNKOUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/8717847387-00000002", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,12)
-- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/8717847387-00000002", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/8717847387-00000002", "1?Set(CALLERID(all)="Syrex Intranets" <0861179739>)") in new stack
-- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/8717847387-00000002", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/8717847387-00000002", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
-- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/8717847387-00000002", "1?AGI(fixlocalprefix)") in new stack
-- Launched AGI Script /usr/share/asterisk/agi-bin/fixlocalprefix
== fixlocalprefix: Dialpattern 27+XXXXXXXXX matched. 117211900 -> 27117211900
-- <SIP/8717847387-00000002>AGI Script fixlocalprefix completed, returning 0
-- Executing [s@macro-dialout-trunk:13] Set("SIP/8717847387-00000002", "OUTNUM=27117211900") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("SIP/8717847387-00000002", "custom=AMP") in new stack
-- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/8717847387-00000002", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))") in new stack
-- Executing [s@macro-dialout-trunk:16] Macro("SIP/8717847387-00000002", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] GotoIf("SIP/8717847387-00000002", "1?custom-freepbx-a2billing,27117211900,1:2") in new stack
-- Goto (custom-freepbx-a2billing,27117211900,1)
== Channel 'SIP/8717847387-00000002' jumping out of macro 'dialout-trunk-predial-hook'
== Channel 'SIP/8717847387-00000002' jumping out of macro 'dialout-trunk'
-- Executing [27117211900@custom-freepbx-a2billing:1] DeadAGI("SIP/8717847387-00000002", "a2billing.php,1") in new stack
[Feb 18 00:33:14] WARNING[15807]: res_agi.c:3312 deadagi_exec: DeadAGI has been deprecated, please use AGI in all cases!
-- Launched AGI Script /usr/share/asterisk/agi-bin/a2billing.php
-- AGI Script Executing Application: (DIAL) Options: (SIP/ECN_JHB_CLI/0117211900,60,HRrL(2147483647:61000:30000))
-- Limit Data for this call:
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Using SIP VRTP TOS bits 136
== Using SIP VRTP CoS mark 6
-- Called ECN_JHB_CLI/0117211900
-- SIP/ECN_JHB_CLI-00000003 is making progress passing it to SIP/8717847387-00000002
[Feb 18 00:33:15] WARNING[15807]: dsp.c:1360 ast_dsp_process: Inband DTMF is not supported on codec g729. Use RFC2833
-- SIP/ECN_JHB_CLI-00000003 answered SIP/8717847387-00000002
-- Executing [h@custom-freepbx-a2billing:1] Hangup("SIP/8717847387-00000002", "") in new stack
-- <SIP/8717847387-00000002>AGI Script a2billing.php completed, returning -1

Author:  jroper [ Thu Feb 17, 2011 11:48 pm ]
Post subject:  Re: DTMF via FREEPBX is OK but via A2billing is PROBLEM

Could this be the issue?


[Feb 18 00:33:15] WARNING[15807]: dsp.c:1360 ast_dsp_process: Inband DTMF is not supported on codec g729. Use RFC2833


Joe

Author:  [email protected] [ Sat Feb 19, 2011 8:00 am ]
Post subject:  Re: DTMF via FREEPBX is OK but via A2billing is PROBLEM

No, I think that this is simply informational. As mentioned before, the trunk works perfectly when we select it directly in the outbound route. If we set the outbound route to use the custom 'A2B/1' trunk, which in turn uses the FreePBX configured SIP trunk DTMF does not work.

Author:  jroper [ Sat Feb 19, 2011 8:09 am ]
Post subject:  Re: DTMF via FREEPBX is OK but via A2billing is PROBLEM

Hi

For interest, make a call via FreePBX, and do sip show channels as you make the call, and note the codecs used, then repeat the experiment via A2Billing, just to confirm that this is not the problem.

Also in logger.conf, you can add DTMF as a debug item, and then tail the full log which contains far more information.

Joe

Author:  [email protected] [ Sun Feb 20, 2011 11:10 am ]
Post subject:  Re: DTMF via FREEPBX is OK but via A2billing is PROBLEM

I don't see a difference:

when setting outbound route to use trunk directly:
Peer User/ANR Call ID Format Hold Last Message Expiry
41.221.0.33 0117211900 509e78804306f56 0x100 (g729) No Tx: ACK
165.146.21.234 s 5936bffa04c6bfc 0x100 (g729) No Rx: ACK



when setting outbound route to use A2b/1 which then selects the trunk:
Peer User/ANR Call ID Format Hold Last Message Expiry
41.221.0.33 0117211900 03a28aed2880122 0x100 (g729) No Tx: ACK
165.146.21.234 s 304135b36981a2c 0x100 (g729) No Rx: ACK

Author:  [email protected] [ Mon Feb 21, 2011 11:24 am ]
Post subject:  Re: DTMF via FREEPBX is OK but via A2billing is PROBLEM

Nothing usefull in the DTMF logs, appears that it should simply be working:

[Feb 21 13:16:39] DTMF[30640] channel.c: DTMF begin '8' received on SIP/8717847387-00000020
[Feb 21 13:16:39] DTMF[30640] channel.c: DTMF begin passthrough '8' on SIP/8717847387-00000020
[Feb 21 13:16:39] DTMF[30640] channel.c: DTMF end '8' received on SIP/8717847387-00000020, duration 180 ms
[Feb 21 13:16:39] DTMF[30640] channel.c: DTMF end accepted with begin '8' on SIP/8717847387-00000020
[Feb 21 13:16:39] DTMF[30640] channel.c: DTMF end passthrough '8' on SIP/8717847387-00000020

Author:  [email protected] [ Tue Feb 22, 2011 2:34 pm ]
Post subject:  Re: DTMF via FREEPBX is OK but via A2billing is PROBLEM

Combing through a wireshark capture shows the SSRC changing with each DTMF. Weird that this doesn't happen when selecting the SIP trunk directly but this is a bug that was introduced in Asterisk 1.6.2.11.

NB: Herewith clarification that an Asterisk installation was sending calls to our setup (A2Billing + FreePBX + Asterisk 1.6.2.13-96) which was sending it on using a SIP trunk. If we set FreePBX to use the SIP trunk directly for these destinations everything worked. When selecting the FreePBX custom trunk 'A2B/1' the DTMF was not working.

Patch detailed here is confirmed to have fixed the issue:
http://svnview.digium.com/svn/asterisk? ... w=revision

from:
main/channel.c
ast_indicate(c0, AST_CONTROL_SRCCHANGE);
ast_indicate(c1, AST_CONTROL_SRCCHANGE);


to:
main/channel.c
ast_indicate(c0, AST_CONTROL_SRCUPDATE);
ast_indicate(c1, AST_CONTROL_SRCUPDATE);

Author:  jroper [ Wed Feb 23, 2011 7:45 am ]
Post subject:  Re: DTMF via FREEPBX is OK but via A2billing is PROBLEM

Hi

That looks like a nasty, and difficult little bug to find, good effort on your perseverance.

Joe

Author:  tvambersky [ Fri Feb 25, 2011 9:53 am ]
Post subject:  Re: DTMF via FREEPBX is OK but via A2billing is PROBLEM

Hi guys,
I´m solve problem by setting RFC2833 for extensions in SIP.CONF and for OOH323 trunk, but on SIP equipment I need to set INBand for DTMF and now sending DTMF is OK.

Author:  berkin [ Fri Jun 03, 2011 6:20 pm ]
Post subject:  Re: DTMF via FREEPBX is OK but via A2billing is PROBLEM

Hi,

Is it enough to just change those two lines (by manually editing) in /main/channel.c ?

I have done that and did not observe any change.

Please advise.

Burak

Author:  berkin [ Fri Jun 03, 2011 8:37 pm ]
Post subject:  Re: DTMF via FREEPBX is OK but via A2billing is PROBLEM

Hi

I have Asterisk 1.4.38 and A2Billing 1.8.5

I always thought RFC2833 would be the best method but after not being able to send dtmf with the above configuration, I have spent quite some time to figure out and tested all dtmfmodes (rfc2833|info|inband|auto).

Also, I found the below two sources valuable

http://www.voip-info.org/wiki/view/Asterisk+DTMF
http://www.voip-info.org/wiki/view/Aste ... p+dtmfmode

Considering above, I figured dtmfmode=rfc2833 or dtmfmode=info would be the best choices.

The first one is the default everywhere and was not working for me (there seems to be asterisk patches, etc, but ...)

So I used dtmfmode=info on the trunks (or in sip_general_custom_conf) and voila! (Do not forget to reload asterisk, if you put it in the conf file).

Out of band works!

My devices and A2Billing VoIP Settings are all at their defaults Normally RFC2833.

Thought might help.

Burak

Author:  Karrahahu1 [ Thu Feb 04, 2016 8:06 am ]
Post subject:  Re: DTMF via FREEPBX is OK but via A2billing is PROBLEM

This also worked when I called from another Asterisk connected via SIP trunk to Asterisk with A2Billing. I´m using Asterisk2Billing - Version 1.3.4 (SeamRóg) - Release :????




Ali

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/