Asterisk 16.3 username and defaultuser sip.conf

trying to give a username or defaultuser to a peer and i reloaded sip.
but it seems like it is not being changed so how could i do it?

this is my peer configuration in sip.conf



trying now to call 8 but it is not being recognized

Define “trying now to call 8”. The entry would be referenced as “3” within Dial and such.

I got 2 linphones installed at 2 nanopis.
I tried to call the username 8 by:
Call 8
Instead of call 3 which was working fine.
But i am trying to make the call through the username.
So could i make the call through the username ?
And another question if i assigned 2 linphones with same username then could make a call to both at same time through this username since username could be the same but not the URI this is what sip protocol says. And this is called forking you know

The chan_sip module does not support multiple devices registered at the same time. The last one to register is called.

You would have multiple friends, one for each, and then would call them individually.

1 Like

Does this mean forking is not supported in asterisk ?
If yes i would appreciate leading me.
And if not then is there a way to be done.

And you still did not answer my question if i could make the call through the username
And how to choose a username or defaultuser
Which is located at sip.conf

The chan_sip module provides the ability to configure some stuff in the Dial line[1]. I’m still very much unclear on what you mean by “call through the username”. In chan_sip you call through a friend or peer which has configuration.

As for forking there is nothing built into chan_sip to do it. It’s done in the dialplan using the Dial application and dialing multiple targets.


1 Like

chan_sip does not do forking, chan_pjsip does if you use the PJSIP_DIAL_CONTACTS function.

1 Like

I will try to be clear.

For example if i have

The name of the peer is 123
So if want to call this peer then i must call from linphone :
Call 123
Where 123 is the peer name
So i am asking if i could do this
Call 333
Where 333 is the username
Or if i could do something like this
Where i choose an alias which could be used instead of the name of the peer

Aha thanks mate
So does this application support sequential and parrallel forking ?

The PJSIP channel driver supports parallel forking via dialing multiple contacts as I linked above.

If endpoint alice has multiple contacts registered to dial them in parallel do a dial

exten => 100,Dial(${PJSIP_DIAL_CONTACTS(alice)})

to do a sequential dial you’d just need to do multiple dial statements.

exten => 100,1,Dial(PJSIP/tom16)
exten => 100,n,Dial(PJSIP/dick,16)
exten => 100,n,Dial(PJSIP/harry,16)

1 Like

that was so helpful. i appreciate it.
one last question. how could i give alice for example multiple contacts ?
thanks in advance

Either define static AOR’s or have multiple endpoints register as Alice.

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