Context for vtiger outbound call

Hi!

I’m trying to integrate asterisk with vtiger-crm, but i have an issue, dial only works for internal extensions. I need to dial to external numbers but when i try to dial an external number vtiger sends the number and asterisk tries to dial up as sip extension.

This is the context for vtiger:
[vtiger]
exten = x.,1,Set(CALLFILENAME=${STRFTIME(${EPOCH},OUT%d%m%y_%H-%M)}${CALLERID(num)}${EXTEN})
exten = _x.,2,MixMonitor(/var/spool/asterisk/monitor/${CALLFILENAME}.wav,b)
exten = _x.,3,Set(CDR(recordpath)=/var/spool/asterisk/monitor/${CALLFILENAME}.wav,b)
exten = _x.,4,Dial(SIP/${EXTEN}

This is the outbound call verbose:

-- SIP/2000-0000001d answered
-- Executing [00XXX135876125@vtiger:1] Set("SIP/2000-0000001d", "CALLFILENAM                                                                                                                                                             E=OUT_010824_10-52_2000_00XXX135876125") in new stack
-- Executing [00XXX135876125@vtiger:2] MixMonitor("SIP/2000-0000001d", "/var                                                                                                                                                             /spool/asterisk/monitor/OUT_010824_10-52_2000_00XXX135876125.wav,b") in new stac                                                                                                                                                             k

== Begin MixMonitor Recording SIP/2000-0000001d
– Executing [00XXX135876125@vtiger:3] Set(“SIP/2000-0000001d”, “CDR(recordp ath)=/var/spool/asterisk/monitor/OUT_010824_10-52_2000_00XXX135876125.wav,b”) in new stack
– Executing [00XXX35876125@vtiger:4] Dial(“SIP/2000-0000001d”, “SIP/00XXX1 35876125”) in new stack

On Thursday 01 August 2024 at 18:10:06, mazernetioto via Asterisk Community
wrote:

I’m trying to integrate asterisk with vtiger-crm, but i have an issue, dial
only works for internal extensions, when i try to dial an external number
vtiger sends the number and asterisk tries to dial up as sip extension.

What are you expecting it to do instead? That isn’t obvious to me from the
information you’ve given.

This is the context for vtiger:
[vtiger]

…skip…

exten = _x.,4,Dial(SIP/${EXTEN}

So, you’re telling Asterisk to dial to a local endpoint registered as
${EXTEN}, so that’s what it’s doing.

  1. What do you really want Asterisk to do with an external call?

  2. How do you identify the difference between an “internal” and an “external”
    call?

  3. I strongly suspect your pattern match _x. is causing the problem. I’ve not
    often come across dialplans using that where it’s correct.

  4. You do realise that chan_sip is deprecated and unsupported, I assume.

Antony.


“Linux is going to be part of the future. It’s going to be like Unix was.”

  • Peter Moore, Asia-Pacific general manager, Microsoft

                                                Please reply to the list;
                                                      please *don't* CC me.
    

Thanks for you reply!

I want to call costumers, that’s what i call an “external call”. I defference internal and external by the number, i think that i miss something in the context but i can’t see what it is.

SIP extension isn’t a term used by Asterisk.

Dial (SIP/xxxxx)

sets up a session to the endpoint named xxxxx in sip.conf. Whilst that could represent a provider, with providers you normally have to provide some digits, as well as the endpoint name, to enable them to route the call, so you would normally use Dial (SIP/ddddddd@pppppp), where dddddddd are the digits to send to the provider, and pppppp is the end point that represents the provider’s system.

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