I have configured my Fritz!Box to use Asterisk as a trunk, which means Fritz!Box maintains several phone numbers in one user account.
On Asterisk side with chan_sip I was able to call the different numbers using Dial(SIP/number3!account) where number is one of the additional phone numbers configured in the Fritz!Box’s trunk and account is the peer’s name in sip.conf
host = dynamic
Phone Numbers: number1, number2, number3
How can I achieve the same behavior with chan_pjsip?
Actually I need to call an pjsip endpoint using a different user field than the endpoints name.
When I Dial(PJSIP/account) only the phones associated to number1 will ring.
Dial(PJSIP/number3@account) or Dial(PJSIPemail@example.com) will lead to errors like entpoint not found, no route or simply timeout.
Any help appreciated.
The “PJSIP/number3@account” should lead to the request URI and I believe the to URI changing the user portion to number3. There is no ability to alter just the To user when dialing from the dialplan. Have you compared the SIP INVITE between chan_sip and chan_pjsip to see if it just wants the To user changed and nothing else?
Thanks for your reply. When I try this dial syntax using the endpoints usual username as account (PJSIP/22222@123 instead of usual PJSIP/123) the Invites end up in a timeout, the Fritzbox doesn’t even respond. Next I tried to set up an additional endpoint more or less the same like my external providers, but without authentification. The result is the same, I can see Asterisk send Invites to the Fritzbox’s IP address with no response and finally timeout.
The Invites look pretty the same as they did with chan_sip, at least regarding the fields which seem to be important for call establishment.
After I got tired of trying without a real clue what to do I simply set up a second user account in Asterisk and according “phone number” in the Fritzbox. At least this works after all, although I liked the other way better. Maybe I take another approach in the next winter holiday.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.