Asterisk Call Forwarding

I try to configure call forwarding in PJSIP to a external phone 06XXXXXXXX
When i work on SIP the line Dial(SIP/06XXXXXXXX/${tete}) work
but Dial(PJSIP/06XXXXXXXX@${tete}) don’t work and i don’t understand why

Can you help me

You’d need to show the actual console output.

What is ${tete}?

See Dialing PJSIP Channels - Asterisk Project - Asterisk Project Wiki for dial string formats.

Hi,

I will explain better

TETE corresponds to the telephone number of my trunk
I need to forward incomming call to another external phone number
I try with :
exten = ${tete},1,GotoIf($[${messagerie} = custom1]?cus1)
same = n,GotoIf($[${messagerie} = custom2]?cus2)
same = n,GoToIfTime(09:00-12:00|mon-fri||?
${tete},ouvert)
same = n,GoToIfTime(14:00-18:00|mon-fri||?${tete},ouvert)
;same = n,GoToIfTime(14:00-17:00|wed||?
${tete},ouvert2)
;same = n,GoToIfTime(08:00-12:00|fri||?_${tete},ouvert2)

same = n,Playback(horaires)
same = n,Hangup

;same = n(ferme),answer()
;same = n,Playback(horaires)
;same = n,Voicemail(1000@default)
;same = n,Hangup

same = n(ouvert),answer()
same = n,Set(TIMEOUT(digit)=1)
same = n,Dial(PJSIP/06XXXXXXXX@${tete})
same = n,hangup

The log of asterisk:
– Executing [_09XXXXXXXX@DID_TETE:7] Answer(“PJSIP/09XXXXXXXX-00000003”, “”) in new stack
> 0x7f6fdc35c7f0 – Strict RTP learning after remote address set to: 85.31.193.197:23768
> 0x7f6fdc35c7f0 – Strict RTP switching to RTP target address 85.31.193.197:23768 as source
– Executing [_09XXXXXXXX@DID_TETE:8] Set(“PJSIP/09XXXXXXXX-00000003”, “TIMEOUT(digit)=1”) in new stack
– Digit timeout set to 1.000
– Executing [_09XXXXXXXX@DID_TETE:9] Dial(“PJSIP/09XXXXXXXX-00000003”, “PJSIP/06XXXXXXXX@09XXXXXXXX”) in new stack
– Called PJSIP/06XXXXXXXX@09XXXXXXXX
– PJSIP/09XXXXXXXX-00000003 requested media update control 26, passing it to PJSIP/09XXXXXXXX-00000004
== Everyone is busy/congested at this time (1:0/0/1)

Thanks for yours answers

I don’t see how that worked even in chan_sip, as that would have required either a domain name or peer name (form sip.conf).

It appears to me, from your log, that tete should be set to DID_TETE, but, as I can’t really understand why you put a phone number there, there may well be other details to consider

Does that work if you dial it directly? I mean, can you dial anything out with PJSIP? Or is this a chan_sip → chan_pjsip conversion process in the works, and only inbound calls are working at this time?

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