Mismatch between the 200 Ok From CallerId(num) and the initial INVITE From CallerId(num))

Good morning, I am trying to register a new trunk in my system and a problem is occurring.

When I make an outgoing call, the trunk needs me to send the callerId(num) empty, leaving the FROM header in the following format “name” sip:domainname, however, when the trunk responds 200 Ok to the initial invite, it is modifying the header and placing in the following format "name"sip:@domainname. From what I managed to understand, that difference seems to be causing Asterisk not to recognize that 200 ok as a response… Am I correct? Thanks for the help.

I am using chan_psjip driver and the only difference between the FROM headers is that “@”.

Your uri doesn’t appear to mean URI, but rather domain name. The URI is the whole thing, including the SIP:.

In practice, only the tag is checked in responses, however your response has a syntax error. user is not allowed to be empty:

userinfo         =  ( user / telephone-subscriber ) [ ":" password ] "@"
user             =  1*( unreserved / escaped / user-unreserved )

This could well frustrate detection of the tag. I’m assuming that they are preserving the From tag.

You failed to say which channel driver was in use, and that might be significant when it comes to out of specification input.

You are absolutely correct, I edited the post according to the corrections. Yes, the tag is preserved, and I am using the chan_pjsip driver.

Looks like I need to have a little talk with the provider.