i try to place a call exten => _X.,1,Dial(SIP/${EXTEN}@foo:5061,60,Ttr) where sip.conf has an entry [foo] secret=torture callerid="local ext 103" <19146665555> type=friend fromuser=asterisk auth=both host=dynamic canreinvite=yes context=in-914 mailbox=001 i get May 22 23:11:31 WARNING[140400128]: chan_sip.c:902 create_addr: \ No such host: foo May 22 23:11:31 NOTICE[140400128]: app_dial.c:536 dial_exec: \ Unable to create channel of type 'SIP' the sip service is registered foo/foo 209.20.186.194 (D) 255.255.255.255 5060 Unmonitored and i get the same result if it is not dynamic foo/foo 209.20.186.194 255.255.255.255 5061 Unmonitored clues appreciated randy
Randy Bush wrote:> i try to place a call > > exten => _X.,1,Dial(SIP/${EXTEN}@foo:5061,60,Ttr) > > where sip.conf has an entry > > [foo] > secret=torture > callerid="local ext 103" <19146665555> > type=friend > fromuser=asterisk > auth=both > host=dynamic > canreinvite=yes > context=in-914 > mailbox=001 >Randy, Try the following: exten => _X.,1,Dial(SIP/foo:5061,60,Ttr) This will cause asterisk to send the call to sip peer "foo". If you're trying to send the call to a specific extension on host "foo.bar", you'll need to do something like this: exten => _X.,1,Dial(SIP/${EXTEN}@foo.bar:5061,60,Ttr) If the other side is an * box as well, I highly recommend you use IAX2 and not SIP. John
>>>>> "Randy" == Randy Bush <randy@psg.com> writes:Randy> i try to place a call Randy> exten => _X.,1,Dial(SIP/${EXTEN}@foo:5061,60,Ttr) Randy> where sip.conf has an entry Randy> [foo] Randy> type=friend I do not beleive that will work for type=friend. If you use separate type=peer and type=user blocks in sip.conf it may work. Expecially if you also specify a port in the Dial(). Else, use the hostname (or a const). -JimC
> i try to place a call > > exten => _X.,1,Dial(SIP/${EXTEN}@foo:5061,60,Ttr)^^^ That "foo" name needs to be changed to an IP address of whatever it is that is suppose to handle the call. Asterisk is doing a DNS name lookup and can't resolve it, therefore "no such host". Also, not sure what :5061 is suppose to represent in your example.> where sip.conf has an entry > > [foo] > secret=torture > callerid="local ext 103" <19146665555> > type=friend > fromuser=asterisk > auth=both > host=dynamic > canreinvite=yes > context=in-914 > mailbox=001 > > i get > > May 22 23:11:31 WARNING[140400128]: chan_sip.c:902 create_addr: \ > No such host: foo > May 22 23:11:31 NOTICE[140400128]: app_dial.c:536 dial_exec: \ > Unable to create channel of type 'SIP' > > the sip service is registered > > foo/foo 209.20.186.194 (D) 255.255.255.255 5060 Unmonitored > > and i get the same result if it is not dynamic > > foo/foo 209.20.186.194 255.255.255.255 5061 Unmonitored > > clues appreciated > > randy > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users---------------End of Original Message-----------------
>> [foo] >> type=friend > > I do not beleive that will work for type=friend. If you use separate > type=peer and type=user blocks in sip.conf it may work. Expecially > if you also specify a port in the Dial(). > > Else, use the hostname (or a const).hmmm. then, how do i let it be dynamic if it has two blocks in sip.conf, one for inbound and one for out? i.e, how does it register its ip address in both? randy