Generate Random channel for each call

Hi, my system generate calls for marketing campaigns.

All the calls are been generated from the same Channel, is there a way to generate random channels for each call that the system generate?

Thanks

You haven’t given us any information about your environment to help answer your question.

Typically each channel has a unique ID if that is what you are asking?

Tks for answering!
My environment is almost default environment, I think its using a default Channel, because the verbose shows the same Channel for every call.

There is no ‘default’ environment.

There are two sets of configuration files packed with Asterisk, the ‘basicpbx’ and ‘samples’ either of which you can install but if my memory is correct neither of those configurations are complete to the point of offering PSTN connectivity.

The question would only make sense in the context of DAHDI. The only reason for randomising would be because there is a caller ID associated with each circuit and the OP wants to avoid caller ID blocking! At least, in the UK, there is an agreement that telemarketers present a caller ID identifies them.

Thanks but Im not tlaking about the Caller ID… they are all different,
yes. the problem that the channel is all the same, see below a verbose
example:

asterisk -x “core show channels verbose”

Channel Context Extension Prio State Application Data CallerID Duration Accountcode PeerAccount BridgeID
SIP/usts2-002f public 1 Up Playback audio_mkt1 5882xxxxxxx 00:01:36
SIP/usts2-002f public 1 Up Playback audio_mkt2 5874xxxxxxx 00:02:28
SIP/usts2-002f public 1 Up Playback audio_mkt3 5882xxxxxxx 00:02:00
SIP/usts2-002f public 1 Up Playback audio_mkt4 5882xxxxxxx 00:02:48
SIP/usts2-002f public 1 Up Playback audio_mkt3 5882xxxxxxx 00:1:10
SIP/usts2-002f public 1 Up Playback audio_mkt4 5882xxxxxxx 00:1:35
SIP/usts2-002f public 1 Down AppDial2 (Outgoing Line) 5844xxxxxxx 00:00:03
SIP/usts2-002f public 1 Ringing AppDial2 (Outgoing Line) 58741xxxxxxx 00:00:0

The problem for me is that sometimes I need to run hangup command

asterisk -x "channel request hangup SIP/usts2-002f, but that is not
possible, because all the calls has the same channel…

Thanks

I’m not aware that chan_sip ever generated four digit instance IDs. All currently supported versions, as well as ones back to 1.6, use an 8 digit, hex, serial number:

07865 tmp = ast_channel_alloc(1, state, i->cid_num, i->cid_name, i->accountcode, i->exten, i->context, assignedids, requestor, i->amaflags, “SIP/%s-%08x”, my_name, (unsigned)ast_atomic_fetchadd_int((int *)&chan_idx, +1));

1.4 (which hit end of life 5 years ago) used the internal data structure address, which could cause duplication, but that couldn’t be as low as 0x002f, and was still 8 digits.

tmp = ast_channel_alloc(1, state, i->cid_num, i->cid_name, i->accountcode, i->exten, i->context, i->amaflags, “SIP/%s-%08x”, my_name, (int)(long) i);

You are either using a version that is more than half a decade beyond end of life, and so old that I don’t know what it did, or you are using a forked version, and need to take this up with the person that forked it.

Try ‘core show channels verbose’ or ‘core show channels concise’

The output is truncated if you do not specify one of the other options.

1 Like

Thanks, The version I’ve is, Asterisk 13.13.1, I believe is not that old…

Thanks!! I was using ‘core show channels verbose’ , but the ‘core show channels concise’ show me all the right channels!! , thanks again!!