Zap Channel DIDs and Incoming DIDs with distinctive ring

I currently have a single FXO card setup as zap/1

I also have distinctive ring on this line for a fax machine

I can setup a zap channel DID for channel 1 with the main phone number and the maco inserts the DID for channel 1 and that works fine

my question is how can i insert the DID for the 2nd phone number for the distinctive ring?

So i would have channel1/pattern 1 and channel1/pattern2

paste from my zapata.conf file

[channels]

language=en
signalling=fxs_ks
rxwink=300 ; Atlas seems to use long (250ms) winks

usedistinctiveringdetection=yes

usecallerid=no
hidecallerid=no
callwaiting=no
usecallingpresno
callwaitingcallerid=no
threewaycalling=no
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
;echotraining=800
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
immediate=no

dring1=187,0,0
dring1context=from-zaptel
dring2=374,339,128
dring2context=from-ptsn-XXXxxxXXXX < sends direct to a fax answer command
context=from-zaptel

;faxdetect=both
faxdetect=incoming
;faxdetect=outgoing
;faxdetect=no

;Include genzaptelconf configs
#include zapata-auto.conf

and from my zapata-auto.conf file

; Span 1: WCFXO/0 “Wildcard X100P Board 1” (MASTER)
;;; line="1 WCFXO/0/0"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-zaptel
channel => 1
context=default

so I need to know if it is possible to set a DID when using the 2nd phone number on a distinctive ring call

Thanks

anyone have a idea on how to get the zap did module working with distinctive ring?

I had it sort of working a year or so ago, but I found that the ring detection was not consistent and did not go any further. One of the things I think I remember about troubleshooting was that you turned distinctive ring detection on in Zapata.conf and then call your distinctive ring number while watching the CLI and Asterisk will give you the ring cadences.

correct, I have all that listed above

I do have it working with any did / any cid inbound routing

but it would be nice to detect dr1 pattern 1 and assign it a did number, and detect dr2 and do the same thing. makes it 10 times easier that way to use the CDR reporting by number etc

i can assign zap channel 1 the main did, but that does nothing for the dr2 situation

as far as the ring cadences, they do very a bit, but asterisk must be using a default +/- on them to catch them - sometimes they are off like by 50 or so and it still catches them

you will need to make a custom context for each distinctive ring (including the main ring) and jump into the ext-did context with the desired DID in each case. It’s the same channel in all 3 cases and the ZAP Channel table is just looking at channels. That also requires you specify each of those custom contexts in zapata.conf.

so in this situation - the zap DID channel module will do me no good?