Get user_agent PJSIP_CONTACT with two aors

I have a problem getting the value of the contact, because when I execute a Dial call the function returns the value of two contacts, since I have two endpoints logged in, but I need to know which is the contact of the recurring channel.

I would like to get this information from the recurring channel and not from all aors connected to that aor.

With this not get value user_agent this below function :

Does anyone have any suggestions on how I could do this?

same => n,Set(pjsip_contact=${PJSIP_AOR(${CALLERID(number)},contact)})

Return " 8001;@c46825b4e2befd580750055f6461542a,8001;@c7368b015f5216fbcee02674a325df2e "

same => n,Set(pjsip_user_agent=${PJSIP_CONTACT(${pjsip_contact},user_agent)})

pjsip_contact_function_read: Unknown property ‘8001;@c7368b015f5216fbcee02674a325df2e,user_agent’ for PJSIP contact

You will have to explain what this means for an answer to be attempted.

Note you have 1 Endpoint, 1 AOR, and 2 Contacts.

1 Like

It means, when I for example initiate a call from 8000 to anywhere, I would like to get the current contact it is using.

I wanted to get the softphone’s user_agent, like this ${PJSIP_CONTACT(${pjsip_contact},user_agent)}.
But I discovered that I can access the value through the function ${PJSIP_HEADER(read,user-agent)}

Thanks for the help, I believe this would already solve my problem. =)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.