Hi cynjut , I did the modification in the conf file :
exten => s,1,Goto(from-trunk,00334XXXXXXX0,1)
exten => s,n,Goto(from-trunk,00334XXXXXXX1,1)
exten => s,n,Goto(from-trunk,00334XXXXXXX2,1)
exten => s,n,Goto(from-trunk,00334XXXXXXX3,1)
But when I try to call all the numbers except the first one , the first one keeps ringing… I’ll try to learn the syntax of the file to make thinks work but a little help would be so nice ! 
Thanks , have a nice day
Edit : Priority letter nPriority numbers can also be simplified by using the letter n in place of the priority numbers greater than one. The letter n stands for next, and when Asterisk sees priority n it replaces it in memory with the previous priority number plus one. Note that you must still explicitly declare priority number one.
So , I’m forced to retrieve the DID Number in a dynamic way right ? But there is my question , if the function PJSIP_HEADER requires a name as it is told in the error , what I have to put ?
Or do I have to do a PJSIPAddHeader first ?
Edit 2 :
I know some stuff in programming but I have to
say that I don’t really understand what this line really return ( this
is provide by my sip provider for chan_sip :
exten => s,1,Goto(from-trunk,${CUT(CUT(SIP_HEADER(To),@,1),:,2)},1) --> provide by sip provider
exten => s,1,Goto(from-trunk,${CUT(CUT(PJSIP_HEADER(To),@,1),:,2)},1) --> to match my case
Because when I take my SIP packet :
Retransmitting #3 (NAT) to X.X.X.X:5060:
REGISTER sip:mytrunk SIP/2.0
Via: SIP/2.0/UDP X.X.X.X:5060;branch=z9hG4bK51c03678;rport
Max-Forwards: 70
From: ;tag=as61398322
**To: sip:[email protected] **
Call-ID: [email protected][::1]
CSeq: 102 REGISTER
Supported: replaces, timer
User-Agent: FPBX-13.0.119(13.7.1)
Expires: 3600
Contact:
Content-Length: 0
-I understand that in that way : Take the “To” line
To:
-Then
cut with the “@” as the seperate char and take the first column so you
get sip:00334XXXXXXXX , then recut with the “:” as the seperate char and
take the 2nd colum so you retrieve the DID number, but the function in
Chan_SIP and Chan_PJSIP don’t have the same comportement because
Chan_PJSIP needs a name ?
I saw the syntax PJSIP_HEADER(action,name[,number]) and the source code of the error :
if (ast_strlen_zero(args.header_name)) {
ast_log(AST_LOG_ERROR, “This function requires a header name.\n”);
return -1;
}
But I can’t see what I’m missing ( a header name , but what ? …)
I think that the problem is all in the syntax of the extensions.conf
line but I don’t still have the knowledge to correct myself.
Edit 3 : I finally did it ! I can retrieve my DID with :
exten => s,1,Goto(from-trunk,${CUT(CUT(PJSIP_HEADER(read,To),@,1),:,2)},1)
Thank you all for your support 