Please let me know how i can add short code in from tag in header when sending the out bound
below is the current logs
I need like below
From: “6001” sip:192.168.244.153;transport=udp;user=phone
Asterisk does not allow this and generally works at a higher level.
What does “short code” mean? What is the scenario?
Please provide the complete request, as copied and pasted directly from the log file, as this is malformed (should not have the second @192.168.244.153.
This would be a fatal violation of the SIP standards, as tag= is a mandatory part of the From header in all requests and responses.
The From field MUST contain a new “tag” parameter, chosen by the UAC.
See Section 19.3 for details on choosing a tag.
Even ignoring the conflict between your example (no tag) and narrative (customised tag), the RFC also says:
When a tag is generated by a UA for insertion into a request or
response, it MUST be globally unique and cryptographically random
with at least 32 bits of randomness.
Whilst appending a non-unique, non-random, value doesn’t actually compromise the uniqueness and randomness, as long as it is independent of the unique and random part, it is clearly a breach of the spirit of how tag is intended to be used.
As Joshua says, please explain what you are trying to achieve at a very high level, not the fine details of how you thought you would achieve it.
can you show us your pjsip.conf
please find the below pjsip.conf
exten =>_X.,1,Verbose(1, In Predial)
exten =>_X.,1,Verbose(1, set headers)
This is not a valid value. 192.168.244.154 is a domain, not a user, and the remaining items are URI parameters, not parts of the user. Moreeover, user=phone indicates that the suer part is in the form of a phone number, which 192.168.244.145 clearly is not.
that is broken
to get the “user=phone” you need to use this option “user_eq_phone”
also transport=udp is a separate config option and do not belong in from_user
Thank you , now i am able to get the user=phone with caller id in From tag, but not able to get the transport=udp in From tag
below is the current pjsip.conf
by using abow pjsip.conf we are getting the below From tag
Because transport=udp is the default, so it doesn’t need to be included explicitly.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.