Force asterisk to Rename Local Channels

Hi everybody

is it possible to force a rename on localchannels ?
For example:

[doSomthing]
exten=> _X.,1,Agi(agi:async)

Originate this context with any Number:
Channel: XXX@doSomething
Exten: XXX
Context: international

Then the channels in asterisk are XXX@externprovider -> Local/XXX,2 <-> Local/XXX,1
If the Extern Answers the Call Local/XXX,1 enters Context doSomething and executes Agi
Normal Local/XXX,1 is then Renamed with XXX@externprovider and Local/XXX,2 will be hang up, but with an external SIP Trunk Local/XXX,1 and Local/XXX,2 will stay alive.

Is it possible to force asterisk to do the rename ?

Greetings and have a nice day
Dirk

I don’t understand the question.

XXX@externprovider is not a valid channel name, as it has no technology part.

SIP/DXXXXXXXX-0001 a normal sip trunk channel …

I think at the moment i must answer() the channel … in the dialplan to get the rename and then enter AsyncAgi …

Does anyone have an idea what to do to get the rename without an answer
With intern sip phones everything iss fine only a sip trunk of us have this behavior …

Example Originate:
Channel: Local/XXX@doSomething
Exten: 00XXX
Context: international

I think the only option is to Answer first in the context to get the right behavior for SIP Trunks :frowning:

Something like that:

exten => _X.,1,Answer()
exten => _X.,2,Wait(1)
exten => _X.,3,Agi(agi:async)

To get the Local Channel Renames …

Does asterisk 11 support local channel renaiming for trunks if I only exec Agi if the extern participant answers ?

For Example:
exten => _X.,1,Agi(agi:async)