Open Source Training Seminar FreePBX Paid Support

Ticket #766 (assigned Feature Requests)

Opened 2 years ago

Last modified 2 months ago

add prefix to inbound CID on per-trunk basis

Reported by: gvagenas@gmail.com Assigned to: RyanCourtnage (accepted)
Priority: minor Milestone: Cut Line
Component: Core Version: SVN-HEAD
Keywords: CallBack Number Cc:
Confirmation: Unreviewed SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

FreePBX Version 2.1Beta1 - SVN revision 1812

The CallBack module works only if you supply the callback number with the appropriate prefix (for outbounds). Otherwise, if the CallBack Number field is empty, it will read the incoming Caller ID number but will fail to dial since there is no way to access the outbound routes. For my case, i dial out with 9|. .

It would be useful to include an option for outgoing prefix.

Great Job!

Thanks

Change History

05/02/06 04:31:02 changed by wozto1s

This kinda fits in with a Feature Request I logged ages ago asking for a 'prefix' to be added to the trunk, which would be prefixed to all calls from that trunk.

05/02/06 07:49:44 changed by RyanCourtnage

  • owner set to RyanCourtnage.
  • status changed from new to assigned.

Trunks and Outbound Routes should already provide enough flexibility to meet your requirements for Callback. If for some reason they don't, then try a callback number like:

9${CALLERID(number)}

The callback number field will accept variables.

05/02/06 11:31:44 changed by gvagenas@gmail.com

Ryan,

The variable at the callback number worked fine, but then i get a call to the callback number for 2 seconds and then Asterisk hangup

05/02/06 12:07:56 changed by RyanCourtnage

Please send your * console output. Use the and wiki tags around your paste.

05/02/06 12:29:00 changed by anonymous

So here is the * console, i call from the number 6932111222, and i want a callback after 15 seconds. Everything fine and * call me back after 15, but the call is up only for 2 seconds (or so) and i don't have time to answer.

--


    -- Executing Set("SIP/i-call-b7c07870", "FROM_DID=s") in new stack
    -- Executing Set("SIP/i-call-b7c07870", "FAX_RX=disabled") in new stack
    -- Executing Goto("SIP/i-call-b7c07870", "callback|1|1") in new stack
    -- Goto (callback,1,1)
    -- Executing Set("SIP/i-call-b7c07870", "CALL=96932111222") in new stack
    -- Executing Set("SIP/i-call-b7c07870", "DESTINATION=ext-local.600.1") in new stack
    -- Executing Set("SIP/i-call-b7c07870", "SLEEP=15") in new stack
    -- Executing System("SIP/i-call-b7c07870", "/var/lib/asterisk/bin/callback 96932111222 ext-local.600.1 15 &") in new stack
    -- Executing Hangup("SIP/i-call-b7c07870", "") in new stack
  == Spawn extension (callback, 1, 5) exited non-zero on 'SIP/i-call-b7c07870'
  == Parsing '/etc/asterisk/manager.conf': Found
  == Parsing '/etc/asterisk/manager_custom.conf': Found
  == Manager 'admin' logged on from 127.0.0.1
    -- Executing Macro("Local/96932111222@from-internal-f6af,2", "dialout-trunk|2|6932111222||") in new stack
    -- Executing GotoIf("Local/96932111222@from-internal-f6af,2", "1?3:2") in new stack
    -- Goto (macro-dialout-trunk,s,3)
    -- Executing Macro("Local/96932111222@from-internal-f6af,2", "user-callerid") in new stack
    -- Executing GotoIf("Local/96932111222@from-internal-f6af,2", "1?report") in new stack
    -- Goto (macro-user-callerid,s,9)
    -- Executing NoOp("Local/96932111222@from-internal-f6af,2", "Using CallerID "Callback" <>") in new stack
    -- Executing Macro("Local/96932111222@from-internal-f6af,2", "record-enable||OUT") in new stack
    -- Executing GotoIf("Local/96932111222@from-internal-f6af,2", "0 > 0?2:4") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing AGI("Local/96932111222@from-internal-f6af,2", "recordingcheck|20060502-221920|1146597560.2") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
  recordingcheck|20060502-221920|1146597560.2: Outbound recording not enabled
    -- AGI Script recordingcheck completed, returning 0
    -- Executing NoOp("Local/96932111222@from-internal-f6af,2", "No recording needed") in new stack
    -- Executing Macro("Local/96932111222@from-internal-f6af,2", "outbound-callerid|2") in new stack
    -- Executing GotoIf("Local/96932111222@from-internal-f6af,2", "0?start") in new stack
    -- Executing Set("Local/96932111222@from-internal-f6af,2", "REALCALLERIDNUM=") in new stack
    -- Executing NoOp("Local/96932111222@from-internal-f6af,2", "REALCALLERIDNUM is ") in new stack
    -- Executing Set("Local/96932111222@from-internal-f6af,2", "USEROUTCID=") in new stack
    -- Executing Set("Local/96932111222@from-internal-f6af,2", "EMERGENCYCID=") in new stack
    -- Executing Set("Local/96932111222@from-internal-f6af,2", "TRUNKOUTCID=2118205022") in new stack
    -- Executing GotoIf("Local/96932111222@from-internal-f6af,2", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,11)
    -- Executing GotoIf("Local/96932111222@from-internal-f6af,2", "0?usercid") in new stack
    -- Executing Set("Local/96932111222@from-internal-f6af,2", "CALLERID(all)=2118205022") in new stack
    -- Executing GotoIf("Local/96932111222@from-internal-f6af,2", "1?report") in new stack
    -- Goto (macro-outbound-callerid,s,15)
    -- Executing NoOp("Local/96932111222@from-internal-f6af,2", "CallerID set to "" <2118205022>") in new stack
    -- Executing Set("Local/96932111222@from-internal-f6af,2", "GROUP()=OUT_2") in new stack
    -- Executing GotoIf("Local/96932111222@from-internal-f6af,2", "0?108") in new stack
    -- Executing Set("Local/96932111222@from-internal-f6af,2", "DIAL_NUMBER=6932111222") in new stack
    -- Executing Set("Local/96932111222@from-internal-f6af,2", "DIAL_TRUNK=2") in new stack
    -- Executing AGI("Local/96932111222@from-internal-f6af,2", "fixlo96932111222calprefix") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
    -- AGI Script fixlocalprefix completed, returning 0
    -- Executing Set("Local/96932111222@from-internal-f6af,2", "OUTNUM=6932111222") in new stack
    -- Executing Set("Local/96932111222@from-internal-f6af,2", "custom=SIP/iCall") in new stack
    -- Executing GotoIf("Local/96932111222@from-internal-f6af,2", "0?16") in new stack
    -- Executing Dial("Local/96932111222@from-internal-f6af,2", "SIP/iCall/6932111222|120|tr") in new stack
    -- Called iCall/6932111222
    -- SIP/iCall-7fa9 is making progress passing it to Local/96932111222@from-internal-f6af,2
  == Manager 'admin' logged off from 127.0.0.1
  == Spawn extension (macro-dialout-trunk, s, 14) exited non-zero on 'Local/96932111222@from-internal-f6af,2' in macro 'dialout-trunk'
  == Spawn extension (macro-dialout-trunk, s, 14) exited non-zero on 'Local/96932111222@from-internal-f6af,2'

05/02/06 12:38:53 changed by RyanCourtnage

Please also paste your [callback] context from extensions_additional.conf.

Thanks.

05/02/06 12:44:08 changed by gvagenas

Here you are :

[callback]
include => callback-custom
exten => 1,1,Set(CALL=9${CALLERID(number)})
exten => 1,n,Set(DESTINATION=ext-local.600.1)
exten => 1,n,Set(SLEEP=15)
exten => 1,n,System(/var/lib/asterisk/bin/callback ${CALL} ${DESTINATION} ${SLEE
P} &)
exten => 1,n,Hangup

; end of [callback]

05/09/06 02:21:05 changed by vgster

I have a problem with callback when forwarding to DISA, where the disa script kicks off before the call has even been put through. By the time I answer the call the 'please enter your pin number...' has been played and shortly after I'm disconnected. I also have the problem of the line not being hungup properly. When I call into my system i hear the ringing but in the console I see hangup and the ringin channel is hungup. However the phone I'm using to call in is still ringing and a second later the channel is answered again etc...

[callback] include => callback-custom exten => 1,1,Set(CALL=907775706281) exten => 1,n,Set(DESTINATION=disa.1.1) exten => 1,n,Set(SLEEP=10) exten => 1,n,System(/var/lib/asterisk/bin/callback ${CALL} ${DESTINATION} ${SLEEP} &) exten => 1,n,Hangup

05/24/06 15:24:54 changed by wozto1s

  • milestone deleted.

07/24/06 16:02:10 changed by vgster

Could a timer please be put in for after the call has been made. An example would be when forwarding to my mobile, call takes around 5/6 seconds to be put through by which time its already kicked off whatever its supposed to do.

01/03/07 00:30:38 changed by vgster

Did it get decided to put a prefix on callbacks or should this be closed?

01/03/07 00:52:28 changed by gregmac

  • type changed from Bugs to Feature Requests.
  • component changed from Callback Module to Core.
  • summary changed from CallBack Module to add prefix to inbound CID on per-trunk basis.

The proper solution to this seems to be allowing a prefix to be added to the caller ID number for all incoming calls for a particular trunk. This may depend on #1021 to implement properly.

The workaround is to simply use pattern-based dialing instead of 9-prefix for outbound (it is 19902007, after all!)

01/03/07 00:54:55 changed by gregmac

See also #921

01/27/07 12:22:09 changed by wiseoldowl

  • engine_version changed.
  • svn_rev changed.

07/24/08 18:10:05 changed by ryppn

  • confirmation set to Unreviewed.
  • milestone set to Cut Line.
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads