[Asterisk-Users] Using Asterisk as sip user agent with more than one device

Arvanitis Kostas arvanit at ellemedia.com
Wed Feb 9 09:45:00 MST 2005


Here is the situation at hand, awaiting input from the collective minds 
of the asterisk-users list:

1. I have Asterisk registered as a SIP user agent to another Asterisk 
(which stands for the real provider, to another location).
register => user:secret at 10.0.0.1

2. I have a peer section for the provider.
[provider]
type=peer
host=10.0.0.1
fromuser=user

3. I have two phones (FXS) on the Asterisk box. They work fine, and can 
call each other, as well as receive calls through SIP from other 
agents.

4. When I call from the phones through Asterisk to the (simulated) 
provider, I get "Failure to authenticate user". The line that places 
the call to the provider is:
exten => _4.,1,Dial(SIP/${EXTEN:1}@provider)

5. The problem seems to be that Asterisk sets the following as the 
"From:" line in the SIP packets:
From: "asterisk" <sip:user at 192.168.0.1>
And the (simulated by Asterisk) provider uses "asterisk" for the 
authentication and fails...

I have tried setting the CALLERID before the Dial, but the string 
remains the same. That is the following extension plan has no effect on 
the "From" header:
exten => _4.,1,SetGlobalVar(CALLERID=user)
exten => _4.,2,Dial(SIP/${EXTEN:1}@provider)

And here are my questions:

How can I force "asterisk" to be a string of my choosing instead of the 
original caller id? Is it even possible (without coding it)? Is it 
proper behaviour?

OR

Is the behaviour of Asterisk at 10.0.0.1 (simulating the provider's 
system) correct? In the 'From: "xxx" <sip:yyy at ip.address>', is "xxx" 
really to be used over "yyy"?



More information about the asterisk-users mailing list