Call to Asterisk registered sofphone from an independent unregistered Endpoint

Home » Asterisk Users » Call to Asterisk registered sofphone from an independent unregistered Endpoint
Asterisk Users 2 Comments

Hi,
I have an Endpoint written in C, which simply sends out SIP invite to
another endpoint and also sets up media session after the call is
initiated. Now I am using this endpoint to call to the Asterisk PBX.
And the call is successfull.

Now, I have a softphone registered with asterisk with extension 1234,
and I want to call that softphone from my external endpoint which is
not resgistered with Asterisk. So I am sending an invite to the SIP
URI

sip:1234@:, however, this call does not ring the
Softphone with extension, and the call is auto answered by Asterisk.
How can I configure/enable Asterisk to forward that call to the
softphone, rather than answering itself.

2 thoughts on - Call to Asterisk registered sofphone from an independent unregistered Endpoint

  • Hi,
    The end-point which isn’t registered in asterisk will hit the “default”
    context in asterisk. This is the one which you’ve defined in sip.conf
    general section i.e

    [general]

    context=my-context

    Also, if your calls are successful from any unregistered endpoint then I
    think you’ve enable allowguest in sip.conf.

    So if you need to bridge the call to 1234 extension make sure you’ve a
    dialplan like this in extensions.conf

    [my-context]
    exten => 1234,1,Dial(SIP/1234)
    same => n,Hangup()
    OR
    exten => _X.,1,Dial(SIP/${EXTEN}) ;< == Security Warning, don't use in
    production server.

    Hope this helps,

  • Sammy, Thanks much.

    allowguest in sip.conf, is by default enabled, and I was not aware of
    this option. So you are correct, this is on.

    Yes, adding the rule in extensions works for me withslight
    modification to the context by changing the default behaviour.

    Thanks for the suggestion.